vue中element-ui全屏loading的简单用法

/**开启loading**/
methods: {
    
    
	startLoading() {
    
    
	  this.loading = this.$loading({
    
    
	    lock: true,
	    text: "Loading",
	    spinner: "el-icon-loading",
	    background: "rgba(0, 0, 0, 0.8)",
	  });
	},
	/**关闭loading**/
	closeLoading() {
    
    
	  this.loading.close();
	}
}

然后直接调用方法即可。
参考文章:https://www.cnblogs.com/heng0310/p/13672945.html

猜你喜欢

转载自blog.csdn.net/shuttle33/article/details/122533850