uniapp loading 组件
组件:loading.vue<template><view><view class="cu-load load-modal" v-if="loadModal"><!-- <view class="cuIcon-emojifill text-orange"></view> --><ima...
·
组件:loading.vue
<template>
<view>
<view class="cu-load load-modal" v-if="loadModal">
<!-- <view class="cuIcon-emojifill text-orange"></view> -->
<image src="/static/logo.png" mode="aspectFit"></image>
<view class="gray-text">加载中...</view>
</view>
</view>
</template>
<script>
export default {
props: {
loadModal: true
},
data() {
return {};
},
methods: {
LoadModal(e) {
this.loadModal = true;
setTimeout(() => {
this.loadModal = false;
}, 2000);
}
}
};
</script>
<style></style>
引用:
引入
import Loading from '../../../components/loading/loading.vue';
注册
components:{
Loading
},
加载 传值
<Loading :loadModal="loadModal"></Loading>
loadModal:false,
更多推荐
已为社区贡献2条内容
所有评论(0)