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(form): 表单组件属性layout为vertical,由nextjs打包后样式被层叠无效 #696

Closed
wants to merge 1 commit into from

Conversation

hevi1991
Copy link
Contributor

react vant 3.3.3 版本,NextJS(13和14) 项目打包后,.rv-form-item--vertical .rv-field__label 优先级会被 .rv-field .rv-field__label 层叠,导致无法起作用。

可能有更好的解决办法

顺便提一提:CONTRIBUTING.mdnpm run bootstrap 脚本找不到,且可能由于NodeJS版本不统一,导致项目无法启动开发环境

开发阶段:
dev

打包后:
build

Copy link

PR preview has been successfully built and deployed to https://react-vant-pr-696.surge.sh.

@3lang3
Copy link
Owner

3lang3 commented Mar 15, 2024

请在业务内使用样式表覆盖,打包产物的问题需要额外修复

@3lang3 3lang3 closed this Mar 15, 2024
@hevi1991 hevi1991 deleted the form-layout branch March 15, 2024 08:24
@hevi1991
Copy link
Contributor Author

在全局引用的css样式中,添加如下代码

.rv-form-item--vertical .rv-field__label {
  width: 100% !important;
}

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