2024-08-20 12:11:31 +00:00
|
|
|
<template>
|
|
|
|
|
<split-pane :min-percent="10" :default-percent="15" split="vertical" style="height: calc(100vh - 110px)">
|
|
|
|
|
<template slot="paneL">
|
|
|
|
|
<SideMenu @handleNodeClick="handleNodeClick"></SideMenu>
|
|
|
|
|
</template>
|
|
|
|
|
<template slot="paneR">
|
2024-08-21 01:17:14 +00:00
|
|
|
<RightList ref="listRef"></RightList>
|
2024-08-20 12:11:31 +00:00
|
|
|
</template>
|
|
|
|
|
</split-pane>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import { defineComponent, ref } from 'vue'
|
|
|
|
|
import SplitPane from 'vue-splitpane'
|
|
|
|
|
import SideMenu from './SideMenu.vue'
|
|
|
|
|
import RightList from './List.vue'
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
components: { SplitPane, SideMenu, RightList },
|
|
|
|
|
setup() {
|
|
|
|
|
const listRef = ref()
|
|
|
|
|
function handleNodeClick(node: any) {
|
2024-08-21 01:17:14 +00:00
|
|
|
const { type, id } = node
|
2024-08-20 12:11:31 +00:00
|
|
|
if (type === 'module') {
|
|
|
|
|
listRef.value.init(node)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
listRef,
|
2024-08-21 01:17:14 +00:00
|
|
|
handleNodeClick,
|
2024-08-20 12:11:31 +00:00
|
|
|
}
|
2024-08-21 01:17:14 +00:00
|
|
|
},
|
2024-08-20 12:11:31 +00:00
|
|
|
})
|
|
|
|
|
</script>
|