Vben
2021-03-23 16ef13477c8f06c13ff3611b9e67e430fac433e7
fix(tree): ensure that the check event is emitted close #400
1个文件已修改
3 ■■■■ 已修改文件
src/components/Tree/src/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Tree/src/index.vue
@@ -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,
@@ -92,6 +92,7 @@
            state.checkedKeys = v;
            const rawVal = toRaw(v);
            emit('change', rawVal);
            emit('check', rawVal);
            emit('update:value', rawVal);
          },
          onRightClick: handleRightClick,