Skip to content

自定义的slots里面,写了一个boolean类型的值,结果页面渲染时,发现没有把boolean值展示出来,而是空白 #13314

Discussion options

You must be logged in to vote

使用TSX语法,会有这样的写法,

这里面第一个表达式是boolean,无论true还是false都不会渲染出来,normallizeVNode里面第一个判断是为了处理这个的。
自定义的slots同理。
我理解的应该是正确的吧?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@edison1105
Comment options

@slow123top
Comment options

@edison1105
Comment options

@slow123top
Comment options

Answer selected by slow123top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants