diff --git a/packages/vant/src/overlay/README.md b/packages/vant/src/overlay/README.md index 529d59e2b..269b650f0 100644 --- a/packages/vant/src/overlay/README.md +++ b/packages/vant/src/overlay/README.md @@ -61,6 +61,14 @@ export default { ``` +### Setting z-index + +The default z-index level of the Overlay component is `1`. You can set its z-index level using the `z-index` prop. + +```html + +``` + ## API ### Props diff --git a/packages/vant/src/overlay/README.zh-CN.md b/packages/vant/src/overlay/README.zh-CN.md index 05a4f9d23..9a0cf716c 100644 --- a/packages/vant/src/overlay/README.zh-CN.md +++ b/packages/vant/src/overlay/README.zh-CN.md @@ -63,6 +63,14 @@ export default { ``` +### 设置 z-index + +Overlay 组件默认的 z-index 层级为 `1`,你可以通过 `z-index` 属性设置它的 z-index 层级。 + +```html + +``` + ## API ### Props diff --git a/packages/vant/src/overlay/demo/index.vue b/packages/vant/src/overlay/demo/index.vue index 1b97f6268..3aab06b98 100644 --- a/packages/vant/src/overlay/demo/index.vue +++ b/packages/vant/src/overlay/demo/index.vue @@ -6,10 +6,12 @@ import { useTranslate } from '../../../docs/site'; const t = useTranslate({ 'zh-CN': { + setZIndex: '设置 z-index', showOverlay: '显示遮罩层', embeddedContent: '嵌入内容', }, 'en-US': { + setZIndex: 'Set z-index', showOverlay: 'Show Overlay', embeddedContent: 'Embedded Content', }, @@ -17,6 +19,7 @@ const t = useTranslate({ const show = ref(false); const showEmbedded = ref(false); +const showZIndex = ref(false);