模态层上再弹一个模态层。

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

              on: {
                click: function (e) {
                  // 这里我想再弹出一个modal,但是我弹不出来了,这里的this 是null
                  this.$Modal.confirm({
                    render: (h) => {
                      return h('Input', {

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

怎么才能再弹出一个模态层?

我这里是使用的iView的modal

阅读 1.7k
2 个回答

应该是不行的,这个modal是单例的

on:{

click:function(e){}

} 这里的函数需要把this传参进去 或者在外面 let _this = this 里面用_this

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题