Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AndyJinSS
Copy link
Contributor

修复当children值为数值0的时候无法正确渲染出来的问题。
image
image

*/
__createVirtualDom = (originalSchema: IPublicTypeNodeData | IPublicTypeNodeData[] | undefined, originalScope: any, parentInfo: INodeInfo, idx: string | number = ''): any => {
if (!originalSchema) {
if (originalSchema === null || originalSchema === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 确实需要展示,但 false 和 NaN 需要展示吗

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为和react的处理机制保持一致吧,react中NaN会展示,false不会展示,如果可以的话我调整下代码。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NaN 不需要展示。如果 originalSchema 传值是 false,我认为也是有必要展示的。这里不用和 react 的处理机制保持一致。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 确实需要展示,但 false 和 NaN 需要展示吗

已经被合并了😂 @rainke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants