feat(Notify): add z-index prop (#11032)

This commit is contained in:
neverland 2022-09-11 22:56:15 +08:00 committed by GitHub
parent 97d02a1e92
commit b29180933b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,7 @@ export default defineComponent({
background: props.background,
}}
overlay={false}
zIndex={props.zIndex}
position={props.position}
duration={0.2}
lockScroll={props.lockScroll}

View File

@ -127,6 +127,7 @@ Vant exports following Notify utility functions:
| type | Can be set to `primary` `success` `warning` | _NotifyType_ | `danger` |
| message | Message | _string_ | - |
| duration | Duration(ms), won't disappear if value is 0 | _number \| string_ | `3000` |
| z-index | Set the z-index to a fixed value | _number \| string_ | `2000+` |
| position `v3.4.0` | Position, can be set to `bottom` | _NotifyPosition_ | `top` |
| color | Message color | _string_ | `white` |
| background | Background color | _string_ | - |

View File

@ -142,6 +142,7 @@ Vant 中导出了以下 Notify 相关的辅助函数:
| type | 类型,可选值为 `primary` `success` `warning` | _NotifyType_ | `danger` |
| message | 展示文案,支持通过`\n`换行 | _string_ | - |
| duration | 展示时长(ms),值为 0 时notify 不会消失 | _number \| string_ | `3000` |
| z-index | 将组件的 z-index 层级设置为一个固定值 | _number \| string_ | `2000+` |
| position `v3.4.0` | 弹出位置,可选值为 `bottom` | _NotifyPosition_ | `top` |
| color | 字体颜色 | _string_ | `white` |
| background | 背景颜色 | _string_ | - |