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,7 +39,7 @@ | ||
39 | name: 'BasicTree', | 39 | name: 'BasicTree', |
40 | inheritAttrs: false, | 40 | inheritAttrs: false, |
41 | props: basicProps, | 41 | props: basicProps, |
42 | - emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change'], | 42 | + emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change', 'check'], |
43 | setup(props, { attrs, slots, emit }) { | 43 | setup(props, { attrs, slots, emit }) { |
44 | const state = reactive<State>({ | 44 | const state = reactive<State>({ |
45 | checkStrictly: props.checkStrictly, | 45 | checkStrictly: props.checkStrictly, |
@@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
92 | state.checkedKeys = v; | 92 | state.checkedKeys = v; |
93 | const rawVal = toRaw(v); | 93 | const rawVal = toRaw(v); |
94 | emit('change', rawVal); | 94 | emit('change', rawVal); |
95 | + emit('check', rawVal); | ||
95 | emit('update:value', rawVal); | 96 | emit('update:value', rawVal); |
96 | }, | 97 | }, |
97 | onRightClick: handleRightClick, | 98 | onRightClick: handleRightClick, |