element中loading加载修改自定义图标

修改加载动画的自定义图标请添加图片描述

      const loading = this.$loading({
    
    
        lock: true,
        text: "",
        spinner: "",
        background: "transparent"
      });

注意:单独写在style里面,不加scope;有个玄学问题,我另个页面正常写没问题,但这个页面不行,可能嵌套的太多了

<style lang='less'>
.el-loading-spinner .circular {
    
    
  display: none;
}
.el-loading-spinner {
    
    
  width: 260px;
  height: 260px;
  top: 50%;
  left: 50%;
  transform: translate(-130px, -130px);
  background: url("../../../assets/login/2.gif");
  background-size: 100% 100%;
}
.el-loading-mask {
    
    
  // 提高loading层级
  z-index: 9999 !important;
}
</style>

猜你喜欢

转载自blog.csdn.net/weixin_48300785/article/details/126664323