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

Skip to content

Conversation

@1ncounter
Copy link
Collaborator

fix: scope props merge defaultProps

@1ncounter 1ncounter linked an issue Nov 30, 2023 that may be closed by this pull request
@github-actions
Copy link

Coverage report for packages/react-simulator-renderer

St.
Category Percentage Covered / Total
🔴 Statements 33.63% 114/339
🔴 Branches 14.53% 25/172
🔴 Functions 26.14% 23/88
🔴 Lines 34.23% 114/333

Test suite run success

2 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 75ff20e

@github-actions
Copy link

Coverage report for packages/utils

St.
Category Percentage Covered / Total
🟢 Statements 80.96% 370/457
🟡 Branches 76.65% 279/364
🟢 Functions 88.7% 102/115
🟢 Lines 81.36% 358/440

Test suite run success

234 tests passing in 40 suites.

Report generated by 🧪jest coverage report action from 75ff20e

@github-actions
Copy link

Coverage report for packages/renderer-core

St.
Category Percentage Covered / Total
🟡 Statements
72.86% (+0.02% 🔼)
918/1260
🟡 Branches 61.58% 577/937
🟡 Functions 70% 196/280
🟡 Lines
72.92% (+0.02% 🔼)
902/1237

Test suite run success

101 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from 75ff20e

@github-actions
Copy link

Coverage report for packages/designer

St.
Category Percentage Covered / Total
🟢 Statements 96.13% 2853/2968
🟢 Branches 88.65% 1624/1832
🟢 Functions 95.67% 862/901
🟢 Lines 96.19% 2778/2888

Test suite run success

384 tests passing in 43 suites.

Report generated by 🧪jest coverage report action from 75ff20e

...__schema.defaultProps,
...this.props,
};
const scope: any = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里的 this.props 的值不对,包含了很多引擎相关的 props,而非用户需要的 props

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

原先的实现就是整个 Renderer 实例当作 scope。可以把这一段注释掉,查看一下原先的 scope.props

Copy link
Collaborator

Choose a reason for hiding this comment

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

那原来的 props 就不正确,多了很多东西。😓

Copy link
Collaborator

Choose a reason for hiding this comment

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

要么把原来的 props 问题也解决了,要么再单独记录一个 issue,后面解决。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

先解决这个问题吧。

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.

低代码搭建协议中的 defaultProps 没有实现。

3 participants