Open
Conversation
SoloJiang
reviewed
Sep 28, 2021
| @@ -0,0 +1,4 @@ | |||
| module.exports = { | |||
| WrapperPackage: 'rax-componentwrapper', | |||
SoloJiang
reviewed
Sep 28, 2021
Comment on lines
+171
to
198
| if (rootStacks.length > 0) { | ||
| if (internal.$batchedUpdates) { | ||
| internal.firstRenderCallback(); | ||
| this._batchedUpdate(internal, internal, rootStacks, callback); | ||
| } else { | ||
| const renderObject = Object.create(null); | ||
| rootStacks.forEach((task) => { | ||
| renderObject[task.path] = isFunction(task.value) ? task.value() : task.value; | ||
| }); | ||
| internal.firstRenderCallback(renderObject); | ||
| internal.setData(renderObject, callback); | ||
| } | ||
| } | ||
|
|
||
| if (componentWrapperCount > 0) { | ||
| Object.values(componentWrapperObject).forEach(({ node, data }) => { | ||
| if (internal.$batchedUpdates) { | ||
| internal.firstRenderCallback(); | ||
| this._batchedUpdate(internal, node._internal, data, callback); | ||
| } else { | ||
| const renderObject = Object.create(null); | ||
| data.forEach((task) => { | ||
| renderObject[task.path] = isFunction(task.value) ? task.value() : task.value; | ||
| }); | ||
| internal.firstRenderCallback(renderObject); | ||
| node._internal.setData(renderObject, callback); | ||
| } | ||
| }); |
SoloJiang
reviewed
Sep 28, 2021
|
|
||
| function ensureWrapperFolder() { | ||
|
|
||
| } |
ChrisCindy
reviewed
Oct 8, 2021
| { | ||
| "name": "miniapp-runtime-config", | ||
| "version": "0.3.9", | ||
| "version": "0.3.10-2", |
Comment on lines
+27
to
+31
| "miniapp-builder-shared": "beta", | ||
| "rax-miniapp-babel-plugins": "beta", | ||
| "rax-miniapp-config-webpack-plugin": "^2.0.0", | ||
| "rax-miniapp-runtime-webpack-plugin": "^4.0.0", | ||
| "miniapp-render": "^2.0.0" | ||
| "rax-miniapp-runtime-webpack-plugin": "beta", | ||
| "miniapp-render": "beta" |
| { | ||
| "name": "rax-miniapp-babel-plugins", | ||
| "version": "0.1.15", | ||
| "version": "0.1.16-3", |
| "fs-extra": "^9.0.1", | ||
| "md5": "^2.2.1", | ||
| "miniapp-builder-shared": "^0.2.0" | ||
| "miniapp-builder-shared": "0.2.11-0" |
| "fs-extra": "^8.1.0", | ||
| "lodash.isequal": "^4.5.0", | ||
| "miniapp-builder-shared": "^0.2.0", | ||
| "miniapp-builder-shared": "0.2.11-0", |
| let isFirstRender = true; | ||
| let lastUsingComponents = {}; | ||
| let lastUsingPlugins = {}; | ||
| let lastImportComponentWrapper = false; |
Contributor
There was a problem hiding this comment.
关于 lastUsingXXX 这里之前的逻辑写的有点混乱,看看能否重构一下,或者多验证一下。主要是 npm run start 的时候用户修改代码时能确保正常运行
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rax-componentwrapper: raxjs/rax-components#399
在运行时小程序中,默认所有的数据更新都使用
Page的setData方法。对于部分需要频繁更新数据的元素来说,可以在元素外包裹rax-componentwrapper的方式,自动将该元素转成自定义组件,当元素数据发生变化时,使用组件的setData,来起到性能优化的目的。需要注意:在阿里小程序中,需要开启基础库 2.0 构建或开启 component2 功能时,才能正常使用该组件,否则将降级使用
Page的setData方法。