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

[taro-2.0.0]升级2.0后,部分页面样式失效 #5282

Closed
Tom9402 opened this issue Jan 9, 2020 · 6 comments
Closed

[taro-2.0.0]升级2.0后,部分页面样式失效 #5282

Tom9402 opened this issue Jan 9, 2020 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@Tom9402
Copy link

Tom9402 commented Jan 9, 2020

问题描述

Taro 升级2.0后,部分页面样式失效
image

复现步骤

  1. 登录小程序
  2. 点击“数据库”
  3. 进入“订单”列表即可看到样式不起作用的情况

期望行为

样式恢复正常作用

报错信息

image

系统信息

image

@taro-bot
Copy link

taro-bot bot commented Jan 9, 2020

CC @Chen-jj

@taro-bot
Copy link

taro-bot bot commented Jan 9, 2020

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Tom9402
Copy link
Author

Tom9402 commented Jan 9, 2020

具体项目代码可联系本人,麻烦了!🙏🙏🙏

@shenghanqin shenghanqin changed the title 升级2.0后,部分页面样式失效 [taro-2.0.0]升级2.0后,部分页面样式失效 Jan 10, 2020
@Miogaror
Copy link

这个我也遇到了,我重命名样式文件,然后就可以编译了,具体原因未知,暂时解决了问题

@luckyadam
Copy link
Member

应该是公共样式都被编译到了 vendors.wxss 里了,vendors.wxss 会被 app.wxss 引用,但是组件默认不受 app.wxss 影响,解决办法可以是,给组件添加 addGlobalClass` 配置,https://nervjs.github.io/taro/docs/component-style.html#%E5%85%A8%E5%B1%80%E6%A0%B7%E5%BC%8F%E7%B1%BB

@Chen-jj Chen-jj added answered question Further information is requested labels Jan 13, 2020
@Tom9402
Copy link
Author

Tom9402 commented Jan 13, 2020

应该是公共样式都被编译到了 vendors.wxss 里了,vendors.wxss 会被 app.wxss 引用,但是组件默认不受 app.wxss 影响,解决办法可以是,给组件添加 addGlobalClass` 配置,https://nervjs.github.io/taro/docs/component-style.html#%E5%85%A8%E5%B1%80%E6%A0%B7%E5%BC%8F%E7%B1%BB

确实如此,问题已解决。

@Tom9402 Tom9402 closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants