<template>
<gracePage :customHeader="false">
<view slot="gBody" class="grace-body">
<view class="grace-title grace-margin-top">整屏 Loading</view>
<button type="warn" @tap="showFullLoading">打开 Loading</button>
<!-- 全屏 Loading -->
<graceFullLoading :graceFullLoading="graceFullLoading" logoUrl="https://staticimgs.oss-cn-beijing.aliyuncs.com/logo.png"></graceFullLoading>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/components/gracePage.vue";
import graceFullLoading from "../../graceUI/components/graceFullLoading.vue";
export default {
data() {
return {
graceFullLoading : false
}
},
methods:{
showFullLoading : function(){
this.graceFullLoading = true;
setTimeout(()=>{this.graceFullLoading = false;}, 3000);
}
},
components:{
gracePage, graceFullLoading
}
}
</script>
<style>
.grace-button{margin-top:10rpx;}
</style>
<template>
<gracePage :customHeader="false">
<view slot="gBody" class="grace-body">
<view class="grace-margin-top">
<text class="grace-title">整屏 Loading</text>
</view>
<button type="warn" @tap="showFullLoading">打开 Loading</button>
<!-- 全屏 Loading -->
<graceFullLoading :graceFullLoading="graceFullLoading" logoUrl="https://staticimgs.oss-cn-beijing.aliyuncs.com/logo.png"></graceFullLoading>
</view>
</gracePage>
</template>
<script>
import gracePage from "../../graceUI/weexComponents/gracePage.nvue";
import graceFullLoading from '../../graceUI/weexComponents/graceFullLoading.nvue';
export default {
data() {
return {
graceFullLoading : false
}
},
methods:{
showFullLoading : function(){
this.graceFullLoading = true;
setTimeout(()=>{this.graceFullLoading = false;}, 3000);
}
},
components:{
gracePage, graceFullLoading
}
}
</script>
<style>
.grace-button{margin-top:10rpx;}
</style>
.wxml
<gracePage customHeader="{{false}}">
<view slot="gBody" class="grace-body">
<view class="grace-title grace-margin-top">整屏 Loading</view>
<button type="warn" bindtap="showFullLoading">打开 Loading</button>
<!-- 全屏 Loading -->
<graceFullLoading graceFullLoading="{{graceFullLoading}}" logoUrl="https://staticimgs.oss-cn-beijing.aliyuncs.com/logo.png"></graceFullLoading>
</view>
</gracePage>.js
Page({
data: {
graceFullLoading: false
},
showFullLoading: function () {
this.setData({graceFullLoading : true});
setTimeout(() => { this.setData({ graceFullLoading: false }); }, 3000);
}
});.json
{
"usingComponents": {
"gracePage": "../../graceUI/components/gracePage",
"graceFullLoading": "../../graceUI/components/graceFullLoading"
}
}