【问题标题】:vue3.x how to use v-html in jsxvue3.x如何在jsx中使用v-html
【发布时间】:2021-04-21 05:50:58
【问题描述】:
export default defineComponent({
  setup() {
    const state = reactive({
     newText = '<p>How are you?</p>'
    })
    return () => (
      <div>
        <div domPropsInnerHTML={state.newText}></div>
      </div>
    )
  }
})

domPropsInnerHTML什么都不渲染,所以vue3如何在jsx中使用v-html

【问题讨论】:

  • 有一个 open issuedomPropsInnerHTML 不起作用。

标签: vuejs3


【解决方案1】:

直接使用v-html 指令。

【讨论】:

    猜你喜欢
    • 2021-04-14
    • 2021-02-21
    • 2022-12-30
    • 2021-10-29
    • 1970-01-01
    • 2023-04-06
    • 2016-09-05
    • 2019-12-04
    • 2020-04-05
    相关资源
    最近更新 更多