mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Toast): add @toast-loading-icon-color var (#4782)
This commit is contained in:
parent
1e21ce3cc0
commit
878b330431
@ -665,6 +665,7 @@
|
||||
@toast-max-width: 70%;
|
||||
@toast-font-size: @font-size-md;
|
||||
@toast-text-color: @white;
|
||||
@toast-loading-icon-color: @white;
|
||||
@toast-line-height: 20px;
|
||||
@toast-border-radius: @border-radius-md;
|
||||
@toast-background-color: rgba(@text-color, .88);
|
||||
|
@ -21,8 +21,8 @@ Toast('Some messages');
|
||||
|
||||
```javascript
|
||||
Toast.loading({
|
||||
mask: true,
|
||||
message: 'Loading...'
|
||||
message: 'Loading...',
|
||||
forbidClick: true
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -21,8 +21,8 @@ Toast('提示内容');
|
||||
|
||||
```js
|
||||
Toast.loading({
|
||||
mask: true,
|
||||
message: '加载中...'
|
||||
message: '加载中...',
|
||||
forbidClick: true
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -95,7 +95,7 @@ export default createComponent({
|
||||
}
|
||||
|
||||
if (type === 'loading') {
|
||||
return <Loading class={bem('loading')} color="white" type={loadingType} />;
|
||||
return <Loading class={bem('loading')} type={loadingType} />;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
showLoadingToast() {
|
||||
this.$toast.loading({ mask: true, message: this.$t('loading') });
|
||||
this.$toast.loading({ forbidClick: true, message: this.$t('loading') });
|
||||
},
|
||||
|
||||
showSuccessToast() {
|
||||
|
@ -61,6 +61,10 @@
|
||||
|
||||
&__loading {
|
||||
padding: @padding-base;
|
||||
|
||||
.van-loading__spinner {
|
||||
color: @toast-loading-icon-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__text {
|
||||
|
@ -29,7 +29,7 @@ exports[`show html toast 1`] = `
|
||||
|
||||
exports[`show loading toast 1`] = `
|
||||
<div class="van-toast van-toast--middle" style="z-index: 2003;" name="van-fade">
|
||||
<div class="van-loading van-loading--circular van-toast__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: white;"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
||||
<div class="van-loading van-loading--circular van-toast__loading"><span class="van-loading__spinner van-loading__spinner--circular"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
|
||||
<div class="van-toast__text">Message</div>
|
||||
</div>
|
||||
`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user