mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +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 { CreateContextOptions } from '/@/components/ContextMenu';
|
||||||
import { treeEmits, treeProps } from './types/tree';
|
import { treeEmits, treeProps } from './types/tree';
|
||||||
import { createBEM } from '/@/utils/bem';
|
import { createBEM } from '/@/utils/bem';
|
||||||
|
import type { TreeProps } from 'ant-design-vue/es/tree/Tree';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'BasicTree',
|
name: 'BasicTree',
|
||||||
@ -106,7 +107,7 @@
|
|||||||
},
|
},
|
||||||
onRightClick: handleRightClick,
|
onRightClick: handleRightClick,
|
||||||
};
|
};
|
||||||
return omit(propsData, 'treeData', 'class');
|
return omit(propsData, 'treeData', 'class') as TreeProps;
|
||||||
});
|
});
|
||||||
|
|
||||||
const getTreeData = computed((): TreeItem[] =>
|
const getTreeData = computed((): TreeItem[] =>
|
||||||
|
@ -8,5 +8,5 @@ export const TreeIcon = ({ icon }: { icon: VNode | string }) => {
|
|||||||
if (isString(icon)) {
|
if (isString(icon)) {
|
||||||
return h(Icon, { icon, class: 'mr-1' });
|
return h(Icon, { icon, class: 'mr-1' });
|
||||||
}
|
}
|
||||||
return Icon;
|
return h(Icon);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user