Skip to content

Commit a1e20af

Browse files
feat: ✨ Curtain 幕帘组件支持设置 z-index
1 parent 330e8c7 commit a1e20af

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

docs/component/curtain.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ function handleClose() {
107107
| to | 幕帘图片点击链接 | string | - | - | - |
108108
| close-position | 关闭按钮位置 | string | inset / top / bottom / top-left / top-right / bottom-left / bottom-right | inset | - |
109109
| close-on-click-modal | 点击遮罩是否关闭 | boolean | - | false | - |
110-
| hide-when-close | 是否当关闭时将弹出层隐藏(display: none) | boolean | - | true | - |
110+
| hide-when-close | 是否当关闭时将弹出层隐藏(display: none) | boolean | - | true | - |
111+
| z-index | 设置层级 | number | - | 10 | $LOWEST_VERSION$ |
111112

112113
## Events
113114

src/uni_modules/wot-design-uni/components/wd-curtain/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ExtractPropTypes } from 'vue'
2-
import { baseProps, makeBooleanProp, makeStringProp } from '../common/props'
2+
import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props'
33

44
export type ClosePosition = 'inset' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
55

@@ -32,7 +32,13 @@ export const curtainProps = {
3232
/**
3333
* 是否当关闭时将弹出层隐藏(display: none)
3434
*/
35-
hideWhenClose: makeBooleanProp(true)
35+
hideWhenClose: makeBooleanProp(true),
36+
/**
37+
* 设置层级
38+
* 类型:number
39+
* 默认值:10
40+
*/
41+
zIndex: makeNumberProp(10)
3642
}
3743

3844
export type CurtainProps = ExtractPropTypes<typeof curtainProps>

src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
position="center"
77
:close-on-click-modal="closeOnClickModal"
88
:hide-when-close="hideWhenClose"
9+
:z-index="zIndex"
910
@before-enter="beforeenter"
1011
@enter="enter"
1112
@after-enter="afterenter"

0 commit comments

Comments
 (0)