From 74e6db7ac468d43a0591286b42fc66b710f897d8 Mon Sep 17 00:00:00 2001 From: nemo-shen Date: Thu, 5 Aug 2021 15:56:42 +0800 Subject: [PATCH] feat(Overlay): add lock-scroll prop (#4383) * build(workflows): add lint & build * build(workflows): build:lib * feat(Overlay): add lock-scroll prop * style(Overlay): adjust order --- packages/overlay/README.md | 15 ++++++++------- packages/overlay/index.ts | 4 ++++ packages/overlay/index.wxml | 11 +++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/overlay/README.md b/packages/overlay/README.md index a29fcdf9..723591b0 100644 --- a/packages/overlay/README.md +++ b/packages/overlay/README.md @@ -87,13 +87,14 @@ Page({ ### Props -| 参数 | 说明 | 类型 | 默认值 | 版本 | -| ------------ | ---------------- | ------------------ | ------- | ---- | -| show | 是否展示遮罩层 | _boolean_ | `false` | - | -| z-index | z-index 层级 | _string \| number_ | `1` | - | -| duration | 动画时长,单位秒 | _string \| number_ | `0.3` | - | -| class-name | 自定义类名 | _string_ | - | - | -| custom-style | 自定义样式 | _string_ | - | - | +| 参数 | 说明 | 类型 | 默认值 | +| ------------ | ------------------------------------------------ | ------------------ | ------- | +| show | 是否展示遮罩层 | _boolean_ | `false` | +| z-index | z-index 层级 | _string \| number_ | `1` | +| duration | 动画时长,单位秒 | _string \| number_ | `0.3` | +| class-name | 自定义类名 | _string_ | - | +| custom-style | 自定义样式 | _string_ | - | +| lock-scroll `1.7.3` | 是否锁定背景滚动,锁定时蒙层里的内容也将无法滚动 | _boolean_ | true | ### Events diff --git a/packages/overlay/index.ts b/packages/overlay/index.ts index 80f5103f..0fdfa777 100644 --- a/packages/overlay/index.ts +++ b/packages/overlay/index.ts @@ -12,6 +12,10 @@ VantComponent({ type: Number, value: 1, }, + lockScroll: { + type: Boolean, + value: true, + }, }, methods: { diff --git a/packages/overlay/index.wxml b/packages/overlay/index.wxml index 9212348b..92734a0c 100644 --- a/packages/overlay/index.wxml +++ b/packages/overlay/index.wxml @@ -1,4 +1,5 @@ + + +