From 16ef13477c8f06c13ff3611b9e67e430fac433e7 Mon Sep 17 00:00:00 2001
From: Vben <anncwb@126.com>
Date: 星期二, 23 三月 2021 01:10:09 +0800
Subject: [PATCH] fix(tree): ensure that the check event is emitted close #400

---
 src/components/Tree/src/index.vue |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/components/Tree/src/index.vue b/src/components/Tree/src/index.vue
index 2c81820..deedd2c 100644
--- a/src/components/Tree/src/index.vue
+++ b/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,

--
Gitblit v1.8.0