From 008cb18edd8ac8595e78eea37fbc8ccba9b22c4c Mon Sep 17 00:00:00 2001 From: Drjingfubo <50685476+Drjingfubo@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:11:15 +0800 Subject: [PATCH] =?UTF-8?q?upd:=20shortpassword=E3=80=81drag=E3=80=81tabba?= =?UTF-8?q?r=E3=80=81actionsheet=20(#412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * upd: drag,shortpassword * upd: tabbar,shortpassword,actionsheet * upd: shortpassword新增方法 Co-authored-by: richard1015 <51844712@qq.com> --- src/packages/shortpassword/demo.vue | 8 ++++++++ src/packages/shortpassword/doc.md | 4 ++++ src/packages/shortpassword/index.vue | 26 +++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/packages/shortpassword/demo.vue b/src/packages/shortpassword/demo.vue index 0d6b9dd1b..c3026f4e4 100644 --- a/src/packages/shortpassword/demo.vue +++ b/src/packages/shortpassword/demo.vue @@ -10,6 +10,8 @@ @complete="methods.onComplete" @ok="methods.onOk" @tips="methods.onTips" + @close="methods.close" + @cancel="methods.cancel" > {{ title }} @@ -83,12 +84,25 @@ export default create({ type: Boolean, default: true }, + closeOnClickOverlay: { + type: Boolean, + default: true + }, length: { type: [String, Number], //4~6 default: 6 } }, - emits: ['update:value', 'update:visible', 'complete', 'change', 'ok', 'tips'], + emits: [ + 'update:value', + 'update:visible', + 'complete', + 'change', + 'ok', + 'tips', + 'close', + 'cancel' + ], setup(props, { emit }) { const realInput = ref(props.value); const realpwd = ref(); @@ -122,6 +136,11 @@ export default create({ } function close() { emit('update:visible', false); + emit('cancel'); + } + function closeIcon() { + emit('update:visible', false); + emit('close'); } function range(val: number) { return Math.min(Math.max(4, val), 6); @@ -139,7 +158,8 @@ export default create({ changeValue, close, onTips, - show + show, + closeIcon }; } }); -- GitLab