mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-29 20:29:46 +08:00
docs(Dialog): add beforeRouteLeave tip #7796
This commit is contained in:
parent
dedfe88ff8
commit
1a34a6599b
@ -273,3 +273,19 @@ export default {
|
|||||||
| @dialog-button-height | `48px` | - |
|
| @dialog-button-height | `48px` | - |
|
||||||
| @dialog-round-button-height | `36px` | - |
|
| @dialog-round-button-height | `36px` | - |
|
||||||
| @dialog-confirm-button-text-color | `@red` | - |
|
| @dialog-confirm-button-text-color | `@red` | - |
|
||||||
|
|
||||||
|
## 常见问题
|
||||||
|
|
||||||
|
### 在 beforeRouteLeave 里调用 Dialog 无法展示?
|
||||||
|
|
||||||
|
将 `closeOnPopstate` 属性设置为 false 即可。
|
||||||
|
|
||||||
|
```js
|
||||||
|
Dialog.alert({
|
||||||
|
title: '标题',
|
||||||
|
message: '弹窗内容',
|
||||||
|
closeOnPopstate: false,
|
||||||
|
}).then(() => {
|
||||||
|
// on close
|
||||||
|
});
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user