美文网首页
Vue-使用$createElement自定义文本

Vue-使用$createElement自定义文本

作者: leslie1943 | 来源:发表于2020-05-13 23:29 被阅读0次

有时候弹窗或者一些特殊的区域需要自定义一些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)
              })

相关文章

网友评论

      本文标题:Vue-使用$createElement自定义文本

      本文链接:https://www.haomeiwen.com/subject/devanhtx.html