mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
chore(BasicTree): Resolve ts type error
This commit is contained in:
parent
c42ba1cc1b
commit
3d0b88708e
@ -33,6 +33,7 @@
|
||||
import { CreateContextOptions } from '/@/components/ContextMenu';
|
||||
import { treeEmits, treeProps } from './types/tree';
|
||||
import { createBEM } from '/@/utils/bem';
|
||||
import type { TreeProps } from 'ant-design-vue/es/tree/Tree';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'BasicTree',
|
||||
@ -106,7 +107,7 @@
|
||||
},
|
||||
onRightClick: handleRightClick,
|
||||
};
|
||||
return omit(propsData, 'treeData', 'class');
|
||||
return omit(propsData, 'treeData', 'class') as TreeProps;
|
||||
});
|
||||
|
||||
const getTreeData = computed((): TreeItem[] =>
|
||||
|
@ -8,5 +8,5 @@ export const TreeIcon = ({ icon }: { icon: VNode | string }) => {
|
||||
if (isString(icon)) {
|
||||
return h(Icon, { icon, class: 'mr-1' });
|
||||
}
|
||||
return Icon;
|
||||
return h(Icon);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user