Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

wangyewei
Copy link
Contributor

add support for object iteration in v-for

Copy link

netlify bot commented Feb 27, 2024

Deploy Preview for vapor-repl ready!

Name Link
🔨 Latest commit 18ee972
🔍 Latest deploy log https://app.netlify.com/sites/vapor-repl/deploys/65dedf402a815700081c3233
😎 Deploy Preview https://deploy-preview-139--vapor-repl.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 27, 2024

Deploy Preview for vapor-template-explorer ready!

Name Link
🔨 Latest commit 18ee972
🔍 Latest deploy log https://app.netlify.com/sites/vapor-template-explorer/deploys/65dedf407c550800089fac4c
😎 Deploy Preview https://deploy-preview-139--vapor-template-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sxzz sxzz left a 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

Copy link

github-actions bot commented Feb 27, 2024

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 80 kB 28.1 kB 24.7 kB
compiler-vapor.global.prod.js 47.6 kB 16.3 kB 14.8 kB
runtime-dom.global.prod.js 91.4 kB 34.7 kB 31.2 kB
runtime-vapor.global.prod.js 36.1 kB (+585 B) 13.7 kB (+181 B) 12.5 kB (+164 B)
vue-vapor.global.prod.js 81.2 kB (+585 B) 28.6 kB (+179 B) 25.8 kB (+203 B)
vue.global.prod.js 149 kB 54 kB 48.1 kB

Usages

Name Size Gzip Brotli
createApp 51.8 kB 20.1 kB 18.4 kB
createSSRApp 55.1 kB 21.5 kB 19.6 kB
defineCustomElement 54.1 kB 20.9 kB 19.1 kB
vapor 36.3 kB (+625 B) 13.8 kB (+202 B) 12.6 kB (+169 B)
overall 65.4 kB 25.2 kB 22.8 kB

@wangyewei wangyewei requested a review from sxzz February 27, 2024 12:33
for (let i = 0; i < commonLength; i++) {
update((newBlocks[i] = oldBlocks[i]), source[i])
if (isObject(source) && !isArray(source)) {
const keys = Object.keys(source)
Copy link
Member

Choose a reason for hiding this comment

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

Can we reuse keys?

@@ -55,9 +56,18 @@ export const createFor = (
}

const mountList = (source: any[], offset = 0) => {
Copy link
Member

Choose a reason for hiding this comment

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

source could be Record

@wangyewei wangyewei requested a review from sxzz February 28, 2024 07:15
@sxzz sxzz force-pushed the yev-wang/vapor-runtime/v-for branch from 196d3e8 to ee6934f Compare February 28, 2024 07:21
@sxzz sxzz force-pushed the yev-wang/vapor-runtime/v-for branch from ee6934f to 18ee972 Compare February 28, 2024 07:22
@sxzz sxzz closed this in 1376045 Feb 29, 2024
sxzz added a commit that referenced this pull request Feb 29, 2024
Co-authored-by: wangjie36 <826036140@qq.com>

closes #139
sxzz added a commit that referenced this pull request Feb 29, 2024
closes #139

Co-authored-by: wangjie36 <826036140@qq.com>
@sxzz
Copy link
Member

sxzz commented Feb 29, 2024

Thanks for your contribution. Implemented via 4af8e87 which combined with your commit.

@wangyewei wangyewei deleted the yev-wang/vapor-runtime/v-for branch March 1, 2024 01:43
@septatrix
Copy link

I assume the readme should also be updated?

https://github.com/vuejs/core-vapor/blob/d3ca3f7492cbd685aef934acd8dadc8069829930/README.md?plain=1#L47-L49

@sxzz
Copy link
Member

sxzz commented Mar 5, 2024

Thanks for your reminder. Updated!

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