mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 10:20:19 +08:00
[improvement] List: optimize loading
This commit is contained in:
parent
3efdcdd28c
commit
f4ca38176b
@ -134,10 +134,9 @@ export default sfc({
|
|||||||
{this.direction === 'down' && this.slots()}
|
{this.direction === 'down' && this.slots()}
|
||||||
{this.loading && (
|
{this.loading && (
|
||||||
<div class={bem('loading')} key="loading">
|
<div class={bem('loading')} key="loading">
|
||||||
{this.slots('loading') || [
|
{this.slots('loading') || (
|
||||||
<Loading class={bem('loading-icon')} />,
|
<Loading size="16">{this.loadingText || t('loading')}</Loading>
|
||||||
<span class={bem('loading-text')}>{this.loadingText || t('loading')}</span>
|
)}
|
||||||
]}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{this.finished && this.finishedText && (
|
{this.finished && this.finishedText && (
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@import '../style/var';
|
@import '../style/var';
|
||||||
|
|
||||||
.van-list {
|
.van-list {
|
||||||
&__loading-text,
|
&__loading,
|
||||||
&__finished-text,
|
&__finished-text,
|
||||||
&__error-text {
|
&__error-text {
|
||||||
color: @list-text-color;
|
color: @list-text-color;
|
||||||
@ -9,20 +9,4 @@
|
|||||||
line-height: @list-text-line-height;
|
line-height: @list-text-line-height;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__loading {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
&-icon,
|
|
||||||
&-text {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-icon {
|
|
||||||
width: @list-icon-size;
|
|
||||||
height: @list-icon-size;
|
|
||||||
margin-right: @list-icon-margin-right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
color: @loading-text-color;
|
color: @loading-text-color;
|
||||||
font-size: @loading-text-font-size;
|
font-size: @loading-text-font-size;
|
||||||
line-height: @loading-text-line-height;
|
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@
|
|||||||
@info-font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
|
@info-font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
|
||||||
|
|
||||||
// List
|
// List
|
||||||
@list-icon-size: 16px;
|
|
||||||
@list-icon-margin-right: 5px;
|
@list-icon-margin-right: 5px;
|
||||||
@list-text-color: @gray-dark;
|
@list-text-color: @gray-dark;
|
||||||
@list-text-font-size: 13px;
|
@list-text-font-size: 13px;
|
||||||
@ -188,7 +187,6 @@
|
|||||||
// Loading
|
// Loading
|
||||||
@loading-text-color: @gray-dark;
|
@loading-text-color: @gray-dark;
|
||||||
@loading-text-font-size: 14px;
|
@loading-text-font-size: 14px;
|
||||||
@loading-text-line-height: 1.2;
|
|
||||||
|
|
||||||
// NavBar
|
// NavBar
|
||||||
@nav-bar-height: 46px;
|
@nav-bar-height: 46px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user