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(runtime-vapor): use shallow clone to support shallowRef in v-for #12985

Open
wants to merge 4 commits into
base: vapor
Choose a base branch
from

Conversation

zhiyuanzmj
Copy link
Member

@zhiyuanzmj zhiyuanzmj commented Mar 3, 2025

REPL

Using the rows.slice() (shallow copy) to replaced the rows, only the content inside v-for hasn't changed, which is inconsistent with the behavior of the Virtual DOM.
So I created a shallow clone for the item when the source is a not a reactive object .

This PR may not be the best solution, but I can’t find other solutions. If you can resolve it, you can turn it off at will.

Copy link

netlify bot commented Mar 3, 2025

Deploy Preview for vapor-repl ready!

Name Link
🔨 Latest commit f019b7d
🔍 Latest deploy log https://app.netlify.com/sites/vapor-repl/deploys/67c6810a3ebf190008f1d74d
😎 Deploy Preview https://deploy-preview-12985--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

pkg-pr-new bot commented Mar 3, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@12985

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@12985

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@12985

@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@12985

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@12985

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@12985

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@12985

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@12985

@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@12985

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@12985

@vue/shared

npm i https://pkg.pr.new/@vue/shared@12985

vue

npm i https://pkg.pr.new/vue@12985

@vue/compat

npm i https://pkg.pr.new/@vue/compat@12985

commit: f019b7d

@zhiyuanzmj zhiyuanzmj marked this pull request as draft March 3, 2025 05:18
@zhiyuanzmj zhiyuanzmj marked this pull request as ready for review March 4, 2025 02:25
@edison1105 edison1105 added the scope: vapor related to vapor mode label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: vapor related to vapor mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants