vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.89k stars 8.36k forks source link

jsx内联样式设置失败 #10994

Closed Sharang-heng closed 6 months ago

Sharang-heng commented 6 months ago

Vue version

3.4.27

Link to minimal reproduction

https://github.com/Sharang-heng/vue3-issue

Steps to reproduce

给div设置style={{ padding:20 }}会不生效,涉及到px设置相关的都没有效果,如margin,fontSize,设置backgroundColor是有效的 image image 但是设置padding为0时会有效果 image

What is expected?

成功设置内联样式

What is actually happening?

连样式本身都没有出现,如果样式被覆盖浏览器会出现一条横线

System Info

No response

Any additional comments?

使用antd的Card组件时想使用他们提供的bodyStyle更改组件样式,但是发现写内联样式时padding除了设置为0,设置成其他值都会不生效

Shyam-Chen commented 6 months ago

https://github.com/vuejs/babel-plugin-jsx/issues/710

Simon-He95 commented 6 months ago

It seems to be a bug in unocss. The performance is normal after turning off unocss.