fix(BasicTree): Resolve ts type error
parent
007ac38d5f
commit
8e25a3aa09
|
@ -3,6 +3,7 @@ import type { CSSProperties } from 'vue'
|
|||
import { computed, defineComponent, onMounted, reactive, ref, toRaw, unref, watch, watchEffect } from 'vue'
|
||||
import { Empty, Spin, Tree } from 'ant-design-vue'
|
||||
import { cloneDeep, difference, get, omit } from 'lodash-es'
|
||||
import type { TreeProps } from 'ant-design-vue/es/tree/Tree'
|
||||
import type { CheckKeys, FieldNames, KeyType, TreeActionType, TreeItem, TreeState } from './types/tree'
|
||||
|
||||
import TreeHeader from './components/TreeHeader.vue'
|
||||
|
@ -98,11 +99,11 @@ export default defineComponent({
|
|||
|
||||
const rawVal = toRaw(state.checkedKeys)
|
||||
emit('update:value', rawVal)
|
||||
emit('check', state.checkStrictly ? rawVal.checked : rawVal, e)
|
||||
emit('check', rawVal, e)
|
||||
},
|
||||
'onRightClick': handleRightClick,
|
||||
}
|
||||
return omit(propsData, 'treeData', 'class')
|
||||
return omit(propsData, 'treeData', 'class') as TreeProps
|
||||
})
|
||||
|
||||
const getTreeData = computed((): TreeItem[] => (searchState.startSearch ? searchState.searchData : unref(treeDataRef)))
|
||||
|
|
|
@ -10,5 +10,5 @@ export const TreeIcon: FunctionalComponent = ({ icon }: { icon: VNode | string }
|
|||
if (isString(icon))
|
||||
return h(Icon, { icon, class: 'mr-1' })
|
||||
|
||||
return Icon
|
||||
return h(Icon)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue