Commit 16ef13477c8f06c13ff3611b9e67e430fac433e7
1 parent
d836d4b2
fix(tree): ensure that the check event is emitted close #400
Showing
1 changed file
with
2 additions
and
1 deletions
src/components/Tree/src/index.vue
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | name: 'BasicTree', |
40 | 40 | inheritAttrs: false, |
41 | 41 | props: basicProps, |
42 | - emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change'], | |
42 | + emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change', 'check'], | |
43 | 43 | setup(props, { attrs, slots, emit }) { |
44 | 44 | const state = reactive<State>({ |
45 | 45 | checkStrictly: props.checkStrictly, |
... | ... | @@ -92,6 +92,7 @@ |
92 | 92 | state.checkedKeys = v; |
93 | 93 | const rawVal = toRaw(v); |
94 | 94 | emit('change', rawVal); |
95 | + emit('check', rawVal); | |
95 | 96 | emit('update:value', rawVal); |
96 | 97 | }, |
97 | 98 | onRightClick: handleRightClick, |
... | ... |