getList() {
let that = this
//打卡加载遮罩层
const loading = this.$loading({
lock: true,
text: '拼命加载中,请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.5)',
target: document.querySelector('.box')
});
//模拟
setTimeOut(function(){
loading.close(); //关闭加载遮罩层
},100)
},
vue element 针对某个div进行加载提示
最新推荐文章于 2024-02-07 17:22:21 发布
本文介绍了一个使用加载遮罩层的方法,通过在页面指定元素上显示加载提示,提升用户体验。该方法利用JavaScript定时器模拟加载过程,并在加载完成后关闭遮罩层。
3237

被折叠的 条评论
为什么被折叠?



