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

fix(runtime-vapor): supports the use of slots with v-if #267

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

yangxiuxiu1115
Copy link
Contributor

No description provided.

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for vapor-template-explorer ready!

Name Link
🔨 Latest commit 59d82f6
🔍 Latest deploy log https://app.netlify.com/sites/vapor-template-explorer/deploys/66b4ddd57c16a90008e438bb
😎 Deploy Preview https://deploy-preview-267--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

netlify bot commented Aug 7, 2024

Deploy Preview for vapor-repl ready!

Name Link
🔨 Latest commit 323cc49
🔍 Latest deploy log https://app.netlify.com/sites/vapor-repl/deploys/66b4de6bf2fc810008e90e70
😎 Deploy Preview https://deploy-preview-267--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

github-actions bot commented Aug 7, 2024

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 80.5 kB 28.3 kB 24.9 kB
compiler-vapor.global.prod.js 56.9 kB 19.4 kB 17.6 kB
runtime-dom.global.prod.js 96.1 kB (+30 B) 36.6 kB (+7 B) 33 kB (+30 B)
runtime-vapor.global.prod.js 48 kB (+61 B) 18.2 kB (+32 B) 16.6 kB (+9 B)
vue-vapor.global.prod.js 102 kB (+61 B) 36 kB (+25 B) 32.4 kB (+31 B)
vue.global.prod.js 154 kB (+30 B) 56.4 kB (+8 B) 50.2 kB (+26 B)

Usages

Name Size Gzip Brotli
createApp 54.2 kB (+30 B) 20.9 kB (+8 B) 19.1 kB (-6 B)
createSSRApp 58.1 kB (+30 B) 22.6 kB (+8 B) 20.6 kB (+33 B)
defineCustomElement 56.4 kB (+30 B) 21.7 kB (+6 B) 19.8 kB (-5 B)
vapor 48.6 kB (+61 B) 18.4 kB (+20 B) 16.7 kB (+20 B)
overall 67.7 kB (+30 B) 26 kB (+7 B) 23.6 kB (-60 B)

Copy link

pkg-pr-new bot commented Aug 7, 2024

commit: 323cc49

@vue/compiler-core

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compiler-core@267

@vue/compiler-dom

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compiler-dom@267

@vue/compiler-sfc

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compiler-sfc@267

@vue/compiler-ssr

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compiler-ssr@267

@vue/compiler-vapor

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compiler-vapor@267

@vue/reactivity

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/reactivity@267

@vue/runtime-core

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/runtime-core@267

@vue/runtime-dom

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/runtime-dom@267

@vue/runtime-shared

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/runtime-shared@267

@vue/runtime-vapor

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/runtime-vapor@267

@vue/server-renderer

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/server-renderer@267

@vue/shared

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/shared@267

vue

pnpm add https://pkg.pr.new/vuejs/core-vapor/vue@267

@vue/compat

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/compat@267

@vue/vapor

pnpm add https://pkg.pr.new/vuejs/core-vapor/@vue/vapor@267

Open in Stackblitzplayground

return () => {
instance.scope.off()
currentInstance = prev
}
}
Copy link
Member

@LittleSound LittleSound Aug 8, 2024

Choose a reason for hiding this comment

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

I am concerned this change may cause issues because:

  1. The setCurrentInstance will set instance.scope.on() internally and instance.scope.off() when calling reset, but as an internal Function, this hidden behavior is not very intuitive
  2. Not all situations that need to set currentInstance need to set instance.scope.on() at the same time, and this behavior is wrong in renderEffect.

related: #174

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.

2 participants