Vue 使用$createElement自定义文本


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

    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)
    })


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM