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(compiler-core): Fix the 'constType' error when using 'v-bind' to bind array variables to 'style', resulting in runtime errors(fix #5106) #5898

Closed
wants to merge 5 commits into from

Conversation

baiwusanyu-c
Copy link
Member

@baiwusanyu-c baiwusanyu-c commented May 11, 2022

fix(compiler-core): Fix the 'constType' error when using 'v-bind' to bind array variables to 'style', resulting in runtime errors(fix #5106)

@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for vue-next-template-explorer ready!

Name Link
🔨 Latest commit bf1a8c7
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/627be8e15c7c0a0009d6a97f
😎 Deploy Preview https://deploy-preview-5898--vue-next-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 settings.

@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for vuejs-coverage ready!

Name Link
🔨 Latest commit bf1a8c7
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/627be8e1a6f9ed00086fbd73
😎 Deploy Preview https://deploy-preview-5898--vuejs-coverage.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 settings.

@netlify
Copy link

netlify bot commented May 11, 2022

Deploy Preview for vue-sfc-playground ready!

Name Link
🔨 Latest commit bf1a8c7
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/627be8e16593040009a94f26
😎 Deploy Preview https://deploy-preview-5898--vue-sfc-playground.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 settings.

@baiwusanyu-c baiwusanyu-c reopened this May 11, 2022
@yyx990803
Copy link
Member

Thanks for the PR! However, this causes :style with array literal values to be no longer hoisted.
A better fix is by detecting this in element transform phase - see 0f00cf4

@yyx990803 yyx990803 closed this May 12, 2022
@baiwusanyu-c baiwusanyu-c deleted the fix/bwsy/compile branch July 1, 2022 03:48
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.

Using arrays in style can cause errors in some cases
2 participants