this.$nextTick(() => {
// 加载loading
this.loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)',
target: document.querySelector('.dialog-box-distinguish') // 在指定得到元素上显示loading,要设置下相对定位
});
})
// 关闭loading
this.loading.close();
<style lang="scss" scoped>
.dialog-box-distinguish {
position: relative;
}
</style>
element的loading局部加载
最新推荐文章于 2025-03-14 11:20:53 发布