element上传显示进度loading 、动态修改load值

1、upload中:on-progress="uploadVideoProcess"

    uploadVideoProcess(event) {

      this.percent = Math.floor(event.percent)//percent进度

      this.openFullScreen()

      this.loading.setText(`上传中,请稍后${this.percent}`)//动态修改load中的文字

    },

  openFullScreen() {

      this.loading = this.$loading({

        lock: true,

        text: `上传中,请稍后${this.percent}`,

        spinner: 'el-icon-loading',

        background: 'rgba(0, 0, 0, 0.7)'

      })

    }

猜你喜欢

转载自blog.csdn.net/aleluye/article/details/121207217
今日推荐