mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feature] toast add mask option (#296)
* [bugfix] CouponList always show empty info * [bugfix] add click feedback of buttons in components * [Doc] add custom theme document * [new feature] Notice bar support more props * [bugfix] PullRefresh test cases * [bugfix] unused NoticeBar style * [bugfix] Swipe width calc error * [Doc] english document of all action components * [Doc] change document site path to /zanui/vant * [Doc] fix * [bugfix] uploader style error * [bugfix] tabs document demo * [new feature] Cell support vue-router target route * [bugfix] add cell test cases * update yarn.lock * [bugfix] Tabbar cann't display info when use icon slot * [Doc] update document title * [bugfix] Dialog should reset button text when showed * [new feature] CouponList add showCloseButton prop * [new feature] Swipe add 'initialSwipe' prop * [bugfix] NoticeBar text disappeared when page back * [new feature] ImagePreview support startPosition * fix: improve imagePreview test cases * [bugfix] Steps style error when has more than 4 items * [new feature] normalize size of all icons * [new feature] Stepper add plus & minus event * fix: yarn.lock * [bugfix] addressEdit icon render failed * [new feature] toast add mask option
This commit is contained in:
@@ -7,7 +7,7 @@ export default {
|
||||
Toast('我是提示文案,建议不超过十五字~');
|
||||
},
|
||||
showLoadingToast() {
|
||||
Toast.loading();
|
||||
Toast.loading({ mask: true });
|
||||
},
|
||||
showSuccessToast() {
|
||||
Toast.success('成功文案');
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
export default {
|
||||
methods: {
|
||||
showLoadingToast() {
|
||||
Toast.loading();
|
||||
Toast.loading({ mask: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
|
||||
:::demo Advanced Usage
|
||||
```html
|
||||
<van-button @click="showCustomizedToast">#### Advanced Usage</van-button>
|
||||
<van-button @click="showCustomizedToast">Advanced Usage</van-button>
|
||||
```
|
||||
|
||||
```javascript
|
||||
@@ -154,5 +154,7 @@ export default {
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| type | 提示类型 | `String` | `text` | `loading` `success` `fail` `html` |
|
||||
| message | 内容 | `String` | `''` | - |
|
||||
| position | 位置 | `String` | `middle` | `top` `bottom` |
|
||||
| mask | 是否显示背景蒙层 | `Boolean` | `false` | - |
|
||||
| forbidClick | 禁止背景点击 | `Boolean` | `false` | - |
|
||||
| duration | 时长(ms) | `Number` | `3000` | 值为 0 时,toast 不会消失 |
|
||||
|
@@ -15,7 +15,7 @@ export default {
|
||||
Toast('我是提示文案,建议不超过十五字~');
|
||||
},
|
||||
showLoadingToast() {
|
||||
Toast.loading();
|
||||
Toast.loading({ mask: true });
|
||||
},
|
||||
showSuccessToast() {
|
||||
Toast.success('成功文案');
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
},
|
||||
showCustomizedToast(duration) {
|
||||
const toast = Toast.loading({
|
||||
duration: 0,
|
||||
duration: 0,
|
||||
forbidClick: true,
|
||||
message: '倒计时 3 秒'
|
||||
});
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
export default {
|
||||
methods: {
|
||||
showLoadingToast() {
|
||||
Toast.loading();
|
||||
Toast.loading({ mask: true });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,5 +163,6 @@ export default {
|
||||
| type | 提示类型 | `String` | `text` | `loading` `success` `fail` `html` |
|
||||
| message | 内容 | `String` | `''` | - |
|
||||
| position | 位置 | `String` | `middle` | `top` `bottom` |
|
||||
| mask | 是否显示背景蒙层 | `Boolean` | `false` | - |
|
||||
| forbidClick | 禁止背景点击 | `Boolean` | `false` | - |
|
||||
| duration | 时长(ms) | `Number` | `3000` | 值为 0 时,toast 不会消失 |
|
||||
|
Reference in New Issue
Block a user