From fcb36ec87a437e47799dbee89cab4177e37e7aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Mon, 18 Oct 2021 21:31:06 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=20interface=20,=20tool?= =?UTF-8?q?s,=20use=20=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/zh-CN/components/checkbox.md | 2 +- src/module/dropdown/index.vue | 6 ++---- src/module/tab/index.vue | 23 ++++++++++++++--------- src/module/tabItem/index.vue | 10 +++++++++- src/module/type/public.ts | 2 -- src/{module => }/use/useClickOutside.ts | 4 +--- 6 files changed, 27 insertions(+), 20 deletions(-) rename src/{module => }/use/useClickOutside.ts (97%) diff --git a/docs/docs/zh-CN/components/checkbox.md b/docs/docs/zh-CN/components/checkbox.md index 06d49883..3ce44499 100644 --- a/docs/docs/zh-CN/components/checkbox.md +++ b/docs/docs/zh-CN/components/checkbox.md @@ -93,7 +93,7 @@ export default { const disabled = ref(true) - const checked6 = ref(true); + const checked6 = ref(false); return { disabled,checked6 diff --git a/src/module/dropdown/index.vue b/src/module/dropdown/index.vue index 1ddfaa8e..106a4fd2 100644 --- a/src/module/dropdown/index.vue +++ b/src/module/dropdown/index.vue @@ -32,9 +32,10 @@ + + + + + diff --git a/src/module/type/public.ts b/src/module/type/public.ts index e30fec41..8ca0102c 100644 --- a/src/module/type/public.ts +++ b/src/module/type/public.ts @@ -10,9 +10,7 @@ export type IDefineComponent = DefineComponent & { } export interface InstallOptions extends StringObject { - /** Pagination Attributes */ pagination?: null - /** Menu Attributes */ menu?: null } diff --git a/src/module/use/useClickOutside.ts b/src/use/useClickOutside.ts similarity index 97% rename from src/module/use/useClickOutside.ts rename to src/use/useClickOutside.ts index 2d71e4a5..df40a482 100644 --- a/src/module/use/useClickOutside.ts +++ b/src/use/useClickOutside.ts @@ -1,10 +1,9 @@ import { ref, onMounted, onUnmounted, Ref } from 'vue' +// 案例详见 tab.vue const useClickOutside = (elementRef: Ref) => { - // 设置一个导出值 const isClickOutside = ref(false); - // 给界面绑定上事件 const handler = (e: MouseEvent) => { if (elementRef.value) { @@ -25,5 +24,4 @@ const useClickOutside = (elementRef: Ref) => { }); return isClickOutside; } - export default useClickOutside; \ No newline at end of file