mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-09-10 14:59:46 +08:00
feat(Toast, Loading): Toast, Loading 组件样式调整 (#2265)
This commit is contained in:
parent
44148c81ed
commit
7d7074339a
@ -404,12 +404,12 @@
|
|||||||
@toast-font-size: 14px;
|
@toast-font-size: 14px;
|
||||||
@toast-text-color: @white;
|
@toast-text-color: @white;
|
||||||
@toast-line-height: 20px;
|
@toast-line-height: 20px;
|
||||||
@toast-border-radius: 4px;
|
@toast-border-radius: @border-radius-md;
|
||||||
@toast-background-color: rgba(@text-color, .88);
|
@toast-background-color: rgba(@text-color, .88);
|
||||||
@toast-icon-size: 48px;
|
@toast-icon-size: 48px;
|
||||||
@toast-text-min-width: 96px;
|
@toast-text-min-width: 96px;
|
||||||
@toast-text-padding: 8px 12px;
|
@toast-text-padding: @padding-xs @padding-sm;
|
||||||
@toast-default-padding: 15px;
|
@toast-default-padding: @padding-md;
|
||||||
@toast-default-width: 90px;
|
@toast-default-width: 90px;
|
||||||
@toast-default-min-height: 90px;
|
@toast-default-min-height: 90px;
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@import '../common/style/var.less';
|
@import '../common/style/var.less';
|
||||||
|
@import '../common/style/theme.less';
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
@ -9,17 +10,17 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color: @loading-spinner-color;
|
.theme(color, '@loading-spinner-color');
|
||||||
|
|
||||||
&__spinner {
|
&__spinner {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: @loading-spinner-size;
|
.theme(width, '@loading-spinner-size');
|
||||||
// compatible for 0.x, users may set width or height in root element
|
// compatible for 0.x, users may set width or height in root element
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: @loading-spinner-size;
|
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
animation: van-rotate @loading-spinner-animation-duration linear infinite;
|
.theme(height, '@loading-spinner-size');
|
||||||
|
.theme(animation, 'van-rotate @loading-spinner-animation-duration linear infinite');
|
||||||
|
|
||||||
&--spinner {
|
&--spinner {
|
||||||
animation-timing-function: steps(12);
|
animation-timing-function: steps(12);
|
||||||
@ -33,10 +34,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__text {
|
&__text {
|
||||||
margin-left: @padding-xs;
|
.theme(margin-left, '@padding-xs');
|
||||||
color: @loading-text-color;
|
.theme(color, '@loading-text-color');
|
||||||
font-size: @loading-text-font-size;
|
.theme(font-size, '@loading-text-font-size');
|
||||||
line-height: @loading-text-line-height;
|
.theme(line-height, '@loading-text-line-height');
|
||||||
|
|
||||||
&:empty {
|
&:empty {
|
||||||
display: none;
|
display: none;
|
||||||
@ -47,7 +48,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.van-loading__text {
|
.van-loading__text {
|
||||||
margin: @padding-xs 0 0;
|
.theme(margin, '@padding-xs 0 0');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.van-toast__text {
|
.van-toast__text {
|
||||||
padding-top: 5px;
|
padding-top: @padding-xs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user