<template>
  <ie-page>
    <ie-navbar title="定向刷题" />
    <uv-tabs :list="list" @click="click" :scrollable="false"></uv-tabs>
    <view class="h-16 bg-back"></view>
    <view class="px-40">
      <knowledgeTree :tree-data="treeData" />
    </view>
  </ie-page>
</template>

<script lang="ts" setup>
// import knowledgePageLayout from '@/pagesOther/pages/topic-center/index/components/knowledge-page-layout.vue';
import knowledgeTree from '@/pagesStudy/components/knowledge-tree.vue';
import { TreeData } from '@/types';

const list = [
  {
    name: '语文',
    value: 'all'
  },
  {
    name: '数学',
    value: 'special'
  },
  {
    name: '英语',
    value: 'special'
  },
  {
    name: '机电与制造类',
    value: 'special'
  }
]
const treeData = ref<TreeData[]>([
  {
    name: '语言知识和表达能力',
    value: 1591,
    children: [
      {
        name: '识记现代汉语普通话的字音',
        value: 187,
        children: [
          {
            name: '识记现代汉语普通话的字音',
            value: 187,
          }
        ]
      },
      {
        name: '正确使用词语',
        value: 374,
      },
      {
        name: '正确使用标点符号',
        value: 374,
      },
    ]
  },
  {
    name: '文学常识和名句名篇',
    value: 715,
    children: [
      {
        name: '文学常识',
        value: 386,
      },
      {
        name: '名句名篇',
        value: 329,
      },
    ]
  }
]);

const click = (item: any) => {
  console.log(item);
}
</script>

<style></style>
