-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(vapor-runtime): object support in v-for
#139
Conversation
✅ Deploy Preview for vapor-repl ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for vapor-template-explorer ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts need to be resolved
Size ReportBundles
Usages
|
packages/runtime-vapor/src/for.ts
Outdated
for (let i = 0; i < commonLength; i++) { | ||
update((newBlocks[i] = oldBlocks[i]), source[i]) | ||
if (isObject(source) && !isArray(source)) { | ||
const keys = Object.keys(source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reuse keys
?
packages/runtime-vapor/src/for.ts
Outdated
@@ -55,9 +56,18 @@ export const createFor = ( | |||
} | |||
|
|||
const mountList = (source: any[], offset = 0) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source
could be Record
196d3e8
to
ee6934f
Compare
ee6934f
to
18ee972
Compare
Co-authored-by: wangjie36 <826036140@qq.com> closes #139
closes #139 Co-authored-by: wangjie36 <826036140@qq.com>
Thanks for your contribution. Implemented via 4af8e87 which combined with your commit. |
I assume the readme should also be updated? |
Thanks for your reminder. Updated! |
add support for object iteration in v-for