mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix: expose tree information in the event close #315
This commit is contained in:
parent
72b42d7b35
commit
b6bb81630d
@ -1,7 +1,16 @@
|
||||
<script lang="tsx">
|
||||
import type { ReplaceFields, Keys, CheckKeys, TreeActionType, TreeItem } from './types';
|
||||
|
||||
import { defineComponent, reactive, computed, unref, ref, watchEffect, onMounted } from 'vue';
|
||||
import {
|
||||
defineComponent,
|
||||
reactive,
|
||||
computed,
|
||||
unref,
|
||||
ref,
|
||||
watchEffect,
|
||||
onMounted,
|
||||
toRaw,
|
||||
} from 'vue';
|
||||
import { Tree } from 'ant-design-vue';
|
||||
import { TreeIcon } from './TreeIcon';
|
||||
// import { DownOutlined } from '@ant-design/icons-vue';
|
||||
@ -77,9 +86,8 @@
|
||||
state.selectedKeys = v;
|
||||
emit('update:selectedKeys', v);
|
||||
},
|
||||
onCheck: (v: CheckKeys, e) => {
|
||||
onCheck: (v: CheckKeys) => {
|
||||
state.checkedKeys = v;
|
||||
console.log(e);
|
||||
emit('update:value', v);
|
||||
},
|
||||
onRightClick: handleRightClick,
|
||||
@ -128,7 +136,7 @@
|
||||
const propsData = omit(item, 'title');
|
||||
const icon = getIcon({ ...item, level }, item.icon);
|
||||
return (
|
||||
<Tree.TreeNode {...propsData} key={get(item, keyField)}>
|
||||
<Tree.TreeNode {...propsData} node={toRaw(item)} key={get(item, keyField)}>
|
||||
{{
|
||||
title: () => (
|
||||
<span class={`${prefixCls}-title`}>
|
||||
|
Loading…
Reference in New Issue
Block a user