|
20 | 20 | </div> |
21 | 21 |
|
22 | 22 | <!-- 下拉框 --> |
23 | | - <transition name="ctree-dropdown"> |
| 23 | + <transition name="vtree-dropdown"> |
24 | 24 | <div |
25 | 25 | ref="dropdownRef" |
26 | 26 | v-show="dropdownVisible" |
|
29 | 29 | height: `${dropHeight}px` |
30 | 30 | }" |
31 | 31 | > |
32 | | - <CTreeSearch |
| 32 | + <VTreeSearch |
33 | 33 | ref="treeSearchRef" |
34 | 34 | v-bind="props" |
35 | 35 | v-model="treeSearchValue" |
|
41 | 41 | <template v-for="(_, slot) in $slots" v-slot:[slot]="scope"> |
42 | 42 | <slot :name="slot" v-bind="scope"></slot> |
43 | 43 | </template> |
44 | | - </CTreeSearch> |
| 44 | + </VTreeSearch> |
45 | 45 | </div> |
46 | 46 | </transition> |
47 | 47 | </div> |
@@ -97,12 +97,12 @@ import { |
97 | 97 | watch, |
98 | 98 | nextTick, |
99 | 99 | } from 'vue' |
100 | | -import CTreeSearch, { DEFAULT_TREE_SEARCH_PROPS, TreeSearchProps } from './TreeSearch.vue' |
| 100 | +import VTreeSearch, { DEFAULT_TREE_SEARCH_PROPS, TreeSearchProps } from './TreeSearch.vue' |
101 | 101 | import { TreeNode } from '../store' |
102 | 102 | import { TREE_SEARCH_API_METHODS, placementEnum } from '../constants' |
103 | 103 | import { TREE_DROP_EVENTS, TREE_SEARCH_EVENTS } from '../constants/events' |
104 | 104 | import { TreeNodeKeyType, TreeDropSlotProps, PlacementType } from '../types' |
105 | | -import { getCtreeMethods } from '../utils' |
| 105 | +import { getVTreeMethods } from '../utils' |
106 | 106 | import { useTreeDropCls } from '../hooks/useTreeDropCls' |
107 | 107 |
|
108 | 108 | const props = withDefaults(defineProps<TreeDropProps>(), DEFAULT_TREE_DROP_PROPS) |
@@ -143,7 +143,7 @@ const { |
143 | 143 |
|
144 | 144 | const referenceRef = ref() |
145 | 145 | const dropdownRef = ref() |
146 | | -const treeSearchRef = ref<InstanceType<typeof CTreeSearch> | null>(null) |
| 146 | +const treeSearchRef = ref<InstanceType<typeof VTreeSearch> | null>(null) |
147 | 147 | const slotProps = reactive<TreeDropSlotProps>({ |
148 | 148 | /** 多选选中的节点 */ |
149 | 149 | checkedNodes: [] as TreeNode[], |
@@ -391,11 +391,11 @@ watch( |
391 | 391 | //#endregion |
392 | 392 |
|
393 | 393 | defineExpose({ |
394 | | - ...getCtreeMethods(TREE_SEARCH_API_METHODS, treeSearchRef), |
| 394 | + ...getVTreeMethods(TREE_SEARCH_API_METHODS, treeSearchRef), |
395 | 395 | }) |
396 | 396 |
|
397 | 397 | defineOptions({ |
398 | | - name: 'CTreeDrop', |
| 398 | + name: 'VTreeDrop', |
399 | 399 | inheritAttrs: false, |
400 | 400 | }) |
401 | 401 | </script> |
0 commit comments