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

vue3 dev环境下uni-app内置组件的默认样式会覆盖掉app.vue全局样式 #4611

Closed
321638914 opened this issue Nov 24, 2023 · 1 comment
Assignees

Comments

@321638914
Copy link

问题描述
vue3 dev环境下uni-app内置组件自己的样式会覆盖掉app.vue内的全局样式,build打包后没问题。

复现步骤
https://stackblitz.com/~/github.com/321638914/uni3-css-test
app.vue内添加image { width: 100%; height: 100% }全局样式,但页面上的image标签仍会显示为320px*240px。

预期结果
内置组件样式会像vue2版那样正常被app.vue全局样式覆盖。

实际结果
app.vue内的image { width: 100%; height: 100% }被组件自带样式覆盖
image
image

系统信息:

  • 发行平台: H5平台
  • 操作系统: Windows 11
  • HBuilderX版本: 无
  • uni-app版本: 3.0.0-3090620231104002
  • 设备信息: Windows 11

补充信息
vitejs/vite#3924

@yurj26
Copy link
Member

yurj26 commented Jan 2, 2024

加下 !important

@yurj26 yurj26 closed this as completed Jan 2, 2024
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

No branches or pull requests

2 participants