-
Notifications
You must be signed in to change notification settings - Fork 759
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
按照#1726里的说明进行了配置,但是仍然无法显示样式 #1816
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
pnpm,vite,taro-ui模板,试了weapp和h5都不显示样式
按照#1726里的说明进行了配置,但是仍然无法显示样式
并且全局引入会导致编译报错,试了
方式 2: 通过 babel 插件按需引入组件
也不显示样式复现步骤
期望行为
显示样式
报错信息
More info: https://sass-lang.com/d/mixed-decls
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss
5 │ transition: background-color 0.3s;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ declaration
╵
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\hairline.scss
62 │ ┌ &::after {
63 │ │ @include hairline-base($color, $style);
64 │ │
65 │ │ border-bottom-width: $width;
66 │ │ }
│ └─── nested rule
╵
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss 5:3 active()
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\accordion.scss 16:5 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\index.scss 7:9 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\index.scss 12:9 root stylesheet
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in
& {}
.More info: https://sass-lang.com/d/mixed-decls
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss
2 │ overflow: hidden;
│ ^^^^^^^^^^^^^^^^ declaration
╵
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss
7 │ ┌ &:active {
8 │ │ background-color: $color-grey-5;
9 │ │ }
│ └─── nested rule
╵
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss 2:3 line()
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\action-sheet.scss 60:5 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\index.scss 9:9 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\index.scss 12:9 root stylesheet
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in
& {}
.More info: https://sass-lang.com/d/mixed-decls
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss
3 │ text-overflow: ellipsis;
│ ^^^^^^^^^^^^^^^^^^^^^^^ declaration
╵
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss
7 │ ┌ &:active {
8 │ │ background-color: $color-grey-5;
9 │ │ }
│ └─── nested rule
╵
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss 3:3 line()
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\action-sheet.scss 60:5 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\index.scss 9:9 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\index.scss 12:9 root stylesheet
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in
& {}
.More info: https://sass-lang.com/d/mixed-decls
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss
6 │ white-space: nowrap;
│ ^^^^^^^^^^^^^^^^^^^ declaration
╵
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss
7 │ ┌ &:active {
8 │ │ background-color: $color-grey-5;
9 │ │ }
│ └─── nested rule
╵
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\line.scss 6:5 line()
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\action-sheet.scss 60:5 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\index.scss 9:9 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\index.scss 12:9 root stylesheet
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in
& {}
.More info: https://sass-lang.com/d/mixed-decls
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\hairline.scss
118│ position: relative;
│ ^^^^^^^^^^^^^^^^^^ declaration
╵
┌──> node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\active.scss
7 │ ┌ &:active {
8 │ │ background-color: $color-grey-5;
9 │ │ }
│ └─── nested rule
╵
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\mixins\libs\hairline.scss 118:3 hairline-bottom-relative()
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\action-sheet.scss 61:5 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\components\index.scss 9:9 @import
node_modules.pnpm\taro-ui@3.3.0_@tarojs+components@4.0.5_@tarojs+plugin-platform-alipay@4.0.5_@tarojs+plugin-pl_fnhycj5nhvakigusot6eaumxfm\node_modules\taro-ui\dist\style\index.scss 12:9 root stylesheet
Warning: 35 repetitive deprecation warnings omitted.
系统信息
Taro CLI 4.0.5 environment info:
System:
OS: Windows 11 10.0.22631
Binaries:
Node: 18.17.1 - D:\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.8.0 - D:\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 4.0.5 => 4.0.5
@tarojs/components: 4.0.5 => 4.0.5
@tarojs/helper: 4.0.5 => 4.0.5
@tarojs/plugin-framework-react: 4.0.5 => 4.0.5
@tarojs/plugin-platform-alipay: 4.0.5 => 4.0.5
@tarojs/plugin-platform-h5: 4.0.5 => 4.0.5
@tarojs/plugin-platform-jd: 4.0.5 => 4.0.5
@tarojs/plugin-platform-qq: 4.0.5 => 4.0.5
@tarojs/plugin-platform-swan: 4.0.5 => 4.0.5
@tarojs/plugin-platform-tt: 4.0.5 => 4.0.5
@tarojs/plugin-platform-weapp: 4.0.5 => 4.0.5
@tarojs/react: 4.0.5 => 4.0.5
@tarojs/runtime: 4.0.5 => 4.0.5
@tarojs/shared: 4.0.5 => 4.0.5
@tarojs/taro: 4.0.5 => 4.0.5
@tarojs/vite-runner: 4.0.5 => 4.0.5
babel-preset-taro: 4.0.5 => 4.0.5
eslint-config-taro: 4.0.5 => 4.0.5
react: ^18.0.0 => 18.3.1
taro-ui: ^3.2.1 => 3.3.0
The text was updated successfully, but these errors were encountered: