Closed wanchun closed 1 month ago
组件:
import { defineComponent } from 'vue' export default defineComponent({ props: { title: String }, setup(props){ return ()=>{ return <div>{props.title}</div> } } })
当传入的title从对象变成字符串,就会报错
const title = ref({a: 1}) setTimeout(() => { title.value = 1; }, 1000);
Reproduction Link (required):
https://github.com/wanchun/jsx-bug
在JSX中,不能直接渲染一个对象,不会转换为 JSON。
🐛 Bug description
组件:
当传入的title从对象变成字符串,就会报错
📝 Steps to reproduce
Reproduction Link (required):
https://github.com/wanchun/jsx-bug
🏞 Desired result
🚑 Other information