CyTreeInputTest.vue 673 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <CyTreeInput width="220px" :tree-ref="treeRef">
  3. <template #default="{handelFilter}">
  4. <el-tree ref="treeRef"
  5. :data="jc"
  6. :filter-node-method="handelFilter">
  7. </el-tree>
  8. </template>
  9. </CyTreeInput>
  10. </template>
  11. <script setup lang="ts">
  12. import CyTreeInput from "@/components/cy/tree-input/src/CyTreeInput.vue";
  13. import {ElTree} from "element-plus";
  14. import {getJyJcZdTree} from "@/api/zhu-yuan-yi-sheng/jian-yan-jian-cha-shen-qing";
  15. const treeRef = ref()
  16. const jc = ref([])
  17. onMounted(() => {
  18. getJyJcZdTree().then(res => {
  19. console.log(res)
  20. jc.value = res.jc
  21. })
  22. })
  23. </script>
  24. <style scoped>
  25. </style>