在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ ElementUI 彈窗問題,求指導

ElementUI 彈窗問題,求指導

clipboard.png

這是ElementUI 的彈窗,官方給出的代碼是這樣的

<script>
export default {

methods: {
  open2() {
    this.$confirm('此操作將永久刪除該文件, 是否繼續(xù)?', '提示', {
      confirmButtonText: '確定',
      cancelButtonText: '取消',
      type: 'warning'
    }).then(() => {
      this.$message({
        type: 'success',
        message: '刪除成功!'
      });
    }).catch(() => {
      this.$message({
        type: 'info',
        message: '已取消刪除'
      });          
    });
  }
}

}
</script>

點擊取消則會關閉彈窗和遮罩層

然后,自己寫

clipboard.png

一樣有彈窗,但是點擊關閉之后

clipboard.png

彈窗關閉了,但是遮罩層還在。 求指導怎么回事。。??

回答
編輯回答
拼未來

catch(e=>{ this.addLoading = false }); catch里面把loading置為false

2017年8月4日 18:12
編輯回答
法克魷

this.addLoading = false; 這個沒有在catch里面加

2018年1月30日 04:16
編輯回答
情皺

你的父級層以上也用了el-dialogel-dialog層級會自動計算,所以你用的時候可以加上modal-append-to-body:false只相對于你的父級彈出

2018年3月25日 14:01