import { Transition, TransitionGroup, defineComponent, reactive, ref } from 'vue'; import styles from './index.module.less'; import { NIcon, NTree, NSpin, NScrollbar } from 'naive-ui'; export default defineComponent({ name: 'directory-main', setup() { const show = ref(true); const forms = reactive({ expandedKey: null, // 展开 selectKey: null // 选的 }); const treeList = ref([ { key: 1, label: '第一单元 我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里我愿住在童话里', selected: false, children: [ { key: 10, label: '【欣赏】永远住在童话里' }, { key: 11, label: '【欣赏】糖果仙子舞曲' }, { key: 12, label: '【知识】音的高低' }, { key: 13, label: '【唱歌】小红帽' } ] }, { key: 2, label: '第二单元 快乐游戏', selected: false, children: [ { key: 14, label: '【欣赏】永远住在童话里' } ] }, { key: 3, label: '第三单元 劳动最光荣', selected: false, children: [ { key: 15, label: '【欣赏】永远住在童话里' } ] }, { key: 4, label: '第四单元 音乐中的动物', selected: false, children: [ { key: 16, label: '【欣赏】永远住在童话里' } ] }, { key: 5, label: '第五单元 动画城', selected: false, children: [ { key: 17, label: '【欣赏】永远住在童话里' } ] }, { key: 6, label: '第六单元 下雪啦', selected: false, children: [ { key: 18, label: '【欣赏】永远住在童话里' } ] }, { key: 7, label: '我的音乐网页', selected: false, children: [ { key: 19, label: '【欣赏】永远住在童话里' } ] } ]); setTimeout(() => { show.value = false; }, 500); return () => (
{item.label}
{child.label}