Skip to content

Commit

Permalink
fix(tree): ensure that the check event is emitted close #400
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Mar 22, 2021
1 parent d836d4b commit 16ef134
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Tree/src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
name: 'BasicTree',
inheritAttrs: false,
props: basicProps,
emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change'],
emits: ['update:expandedKeys', 'update:selectedKeys', 'update:value', 'change', 'check'],
setup(props, { attrs, slots, emit }) {
const state = reactive<State>({
checkStrictly: props.checkStrictly,
Expand Down Expand Up @@ -92,6 +92,7 @@
state.checkedKeys = v;
const rawVal = toRaw(v);
emit('change', rawVal);
emit('check', rawVal);
emit('update:value', rawVal);
},
onRightClick: handleRightClick,
Expand Down

0 comments on commit 16ef134

Please sign in to comment.