element-ui的$notify碰到特殊字符样式错乱

<template>
<div>
  <el-button
    plain
    @click="open2">
    不会自动关闭
    </el-button>
</div>
</template>

<script>
export default {
  methods: {
    open2 () {
      this.$notify({
        title: '提示',
        message: '对比版本MP16_SM6125_10.0_202101121904_user分析中,请稍后回来查看。',
        duration: 0
      })
    }
  }
}
</script>
阅读 1.5k
1 个回答
this.$notify({
        title: '提示',
        message: '<div style="word-break: break-all;">对比版本MP16_SM6125_10.0_202101121904_user分析中,请稍后回来查看。</div>',
        duration: 0,
        dangerouslyUseHTMLString: true
      })

自己加个样式覆盖下吧,问题不大。

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