鍍金池/ 問(wèn)答/網(wǎng)絡(luò)安全  HTML/ 模態(tài)層上再?gòu)椧粋€(gè)模態(tài)層。

模態(tài)層上再?gòu)椧粋€(gè)模態(tài)層。

    this.$Modal.confirm({
          render: (h) => {
            return h('Button', {
              props: {
                value: this.value,
                type: 'primary',
              },

              on: {
                click: function (e) {
                  // 這里我想再?gòu)棾鲆粋€(gè)modal,但是我彈不出來(lái)了,這里的this 是null
                  this.$Modal.confirm({
                    render: (h) => {
                      return h('Input', {

                      })
                    }
                  })
                }
              }
            })
          }
        })
        

怎么才能再?gòu)棾鲆粋€(gè)模態(tài)層?

我這里是使用的iView的modal

回答
編輯回答
蔚藍(lán)色

on:{

click:function(e){}

} 這里的函數(shù)需要把this傳參進(jìn)去 或者在外面 let _this = this 里面用_this

2017年11月11日 03:41
編輯回答
寫榮

應(yīng)該是不行的,這個(gè)modal是單例的

2018年6月20日 03:49