Vue-使用$createElement自定义文本

2020-05-13  本文已影响0人  leslie1943

有时候弹窗或者一些特殊的区域需要自定义一些html元素来显示

              const h = this.$createElement
              this.$msgbox({
                title: '提示',
                message: h('p', null, [
                  h('p', null, 'YYYYYYYYYYYYY'),
                  h('p', null, '有问题请联系客服电话: XXXX-XXXXXXX')
                ]),
                confirmButtonText: '确定',
                type: 'warning',
                showCancelButton: false,
                showClose: false,
                closeOnClickModal: false,
                closeOnPressEscape: false
              }).then(() => {
              }).catch((e) => {
                console.info(e)
              })
上一篇 下一篇

猜你喜欢

热点阅读