标签:vue html index 引入 按需加载 position spi from spinner
import { Loading } from 'vant'
export deafault = {
components: {
[Loading.name]: Loading
}
}
<div class="loading" v-if="isLoading">
// 调用组件
<van-loading type="spinner" size="80px"></van-loading>
</div>
// type是vant里loading组件的类型
// size是vant里loading组件的大小
#html {
height: 100%;
position: relative;
.loading {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
background-color: rgba(255,255,255,1);
.van-loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
标签:vue html index 引入 按需加载 position spi from spinner
原文地址:https://www.cnblogs.com/zjh-study/p/10647746.html