May 07, 2021 Vant
import Vue from 'vue';
import { Loading } from 'vant';
Vue.use(Loading);
The type of loading icon can be set by the type of type, which defaults to circular and the optional value is spinner
<van-loading />
<van-loading type="spinner" />
The color of the load icon is set by the color property
<van-loading color="#1989fa" />
<van-loading type="spinner" color="#1989fa" />
The size of the load icon is set by the size of the size of the size of the size, which is px by default
<van-loading size="24" />
<van-loading type="spinner" size="24px" />
You can use the default slot to insert a loaded file on the right side of the icon
<van-loading size="24px">加载中...</van-loading>
When you set the vertical property, the icons and the paper are arranged vertically
<van-loading size="24px" vertical>加载中...</van-loading>
Parameters | Description | Type | The default |
---|---|---|---|
color | Color | string |
#c9c9c9
|
type |
Type, the optional value
spinner
|
string |
circular
|
size |
Load icon size, the default unit
px
|
number | string |
30px
|
text-size |
Text size, the default unit
px
|
number | string |
14px
|
vertical | Whether to arrange icons and text content vertically | boolean |
false
|
Name | Description |
---|---|
default | Load the document |