vue实用组件Loading,自定义样式


组件Loading

1.我为什么用到了组件Loading是干什么的?
解:当进程还在执行,还没有执行完成的时候,用户可能并不知道,那么我们是不是应该提示用户,那怎么样才能更让客户客观的看到正在执行,而且又有一点高级感呢?那就是LoadIng组件了,我elementui的基础上修改了他的样式。

效果视频:

vue laoding组件

一、组件Loading vscode代码,直接复制就可以用

<template>
  <div class="Lending">
    <el-dialog
      :visible.sync="issub"
      :modal-append-to-body="false"
      width="30%"
      >
      <div class="loadings">
          <div class="loading_one"> Transaction Pending</div>
          <div class="load"
              v-loading="loading"
          >
            <div class="load_son"></div>
          </div>
          <div class="loading_two">Transanction broadcast</div>
          <div class="loading_three">View on Etherscan</div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "HeaDer",
  data() {
    return {
      issub:true,
      loading: true,
    };
  },
};
</script>

<style lang="scss" scoped>
.Lending {
  .loadings{
    z-index: 200;
    height: 422px;
    background: #FFFFFF;
    border-radius: 31px;
    padding-top: 34px;
    .loading_one{
        font-size: 24px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #000000;
        text-align: center;
    }
    .load{
        width: 122px;
        height: 122px;
        margin:50px auto;
        /deep/ .el-loading-spinner{
            font-size: 70px;
        }
    }
    .loading_two{
        font-size: 24px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #000000;
        text-align: center;
        margin-top:34px;
    }
    .loading_three{
        width: 287px;
        height: 54px;
        background: #3371FF;
        border-radius: 31px;
        font-size: 18px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #FFFFFF;
        line-height: 54px;
        
        margin:50px auto 0;
        text-align: center;
    }
    /deep/.circular{
      height: 122px !important;
      width: 122px !important;
      .path{
        stroke: #3ACB57;
        stroke-width:1;
      }
    }
    /deep/ .el-loading-spinner{
      top: 0%;
      margin-top: 0px;
    }
    /deep/ .el-loading-mask{
      background-color:inherit;
    }
  }
  .load_son{
      width: 80px;
      height: 80px;
      background: #3ACB57;
      border-radius: 50%;
      position: relative;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
  }
}
</style>

完成,年轻的程序员,大佬勿喷,希望对大家有用,有问题可以留言。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值