From a1e20afef34704e518a96d4b4cb248cab3b7a8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=91=B8=E9=B1=BC=E5=8E=BB?= <1780903673@qq.com> Date: Sun, 10 Nov 2024 16:52:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Curtain=20=E5=B9=95?= =?UTF-8?q?=E5=B8=98=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=20z-index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/curtain.md | 3 ++- .../wot-design-uni/components/wd-curtain/types.ts | 10 ++++++++-- .../components/wd-curtain/wd-curtain.vue | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/component/curtain.md b/docs/component/curtain.md index c83de353..dde4469e 100644 --- a/docs/component/curtain.md +++ b/docs/component/curtain.md @@ -107,7 +107,8 @@ function handleClose() { | to | 幕帘图片点击链接 | string | - | - | - | | close-position | 关闭按钮位置 | string | inset / top / bottom / top-left / top-right / bottom-left / bottom-right | inset | - | | close-on-click-modal | 点击遮罩是否关闭 | boolean | - | false | - | -| hide-when-close | 是否当关闭时将弹出层隐藏(display: none) | boolean | - | true | - | +| hide-when-close | 是否当关闭时将弹出层隐藏(display: none) | boolean | - | true | - | +| z-index | 设置层级 | number | - | 10 | $LOWEST_VERSION$ | ## Events diff --git a/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts b/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts index 2f7931fc..1b2567a5 100644 --- a/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts +++ b/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts @@ -1,5 +1,5 @@ import type { ExtractPropTypes } from 'vue' -import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' export type ClosePosition = 'inset' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' @@ -32,7 +32,13 @@ export const curtainProps = { /** * 是否当关闭时将弹出层隐藏(display: none) */ - hideWhenClose: makeBooleanProp(true) + hideWhenClose: makeBooleanProp(true), + /** + * 设置层级 + * 类型:number + * 默认值:10 + */ + zIndex: makeNumberProp(10) } export type CurtainProps = ExtractPropTypes diff --git a/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue b/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue index afba736b..e65ea9db 100644 --- a/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue +++ b/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue @@ -6,6 +6,7 @@ position="center" :close-on-click-modal="closeOnClickModal" :hide-when-close="hideWhenClose" + :z-index="zIndex" @before-enter="beforeenter" @enter="enter" @after-enter="afterenter"