• div中添加el-loading(局部loading的使用)


    效果:在div中实现el-loading

    1. class="content-main">
    2. {{ hotList }}
  • getHotList(columnType) {
  • this.$nextTick(() => {
  • var loading = this.$loading({
  • lock: true,
  • text: "努力加载中...",
  • spinner: "el-icon-loading",
  • background: "rgba(0, 0, 0, 0.5)",
  • target: document.querySelector(".content-main") // 替换成你的类名
  • });
  • try {
  • getPolicyList({columnType, pageNum: 1, pageSize: 10}).then(res15 => {
  • this.hotList = res15.data.rows
  • }).finally(() => {
  • loading.close();
  • })
  • } catch (error) {
  • console.error(error);
  • }
  • })
  • },
  • 相关阅读:
    常见应用层协议
    打开记事本
    源码解析Synchronous Queue 这种特立独行的队列
    springboot2整合开发流程示例
    VSCode错误整理
    c++面向对象基础编程——运算符重载
    K8s搭建(单节点)
    Java中的wait和notify方法
    UNIAPP实战项目笔记32 购物车无商品默认样式
    线程与线程锁
  • 原文地址:https://blog.csdn.net/m0_74149462/article/details/134553193