We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
小程序基础库: 2.19.1 使用框架: React
1: 首先配置文件是true cssModules: { enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true config: { namingPattern: 'module', // 转换模式,取值为 global/module generateScopedName: '[name][local]_[hash:base64:5]' } } 2: 之后定义了一个Index.module.scss文件 .line_chart_bp {
width: 100%; height: 100px;
background-color: yellow; } 3: import styles from './Index.module.scss' 黄色背景
有黄色背景
无任何效果
taro info 👽 Taro v3.3.1 Taro CLI 3.3.1 environment info: System: OS: macOS 11.1 Shell: 5.7.1 - /Users/zhousuhua/homebrew/bin/zsh Binaries: Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node Yarn: 1.22.10 - ~/.nvm/versions/node/v14.16.0/bin/yarn npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm npmPackages: @tarojs/components: 3.3.1 => 3.3.1 @tarojs/mini-runner: 3.3.1 => 3.3.1 @tarojs/react: 3.3.1 => 3.3.1 @tarojs/runtime: 3.3.1 => 3.3.1 @tarojs/taro: 3.3.1 => 3.3.1 @tarojs/webpack-runner: 3.3.1 => 3.3.1 babel-preset-taro: 3.3.1 => 3.3.1 eslint-config-taro: 3.3.1 => 3.3.1 react: ^17.0.0 => 17.0.2 taro-ui: 3.0.0-alpha.10 => 3.0.0-alpha.10 npmGlobalPackages: typescript: 4.3.5
The text was updated successfully, but these errors were encountered:
<View className={styles.line_chart_bp}>黄色背景</View>
Sorry, something went wrong.
已经解决了,我是因为一个文件里又使用了字符串,又使用了style,都改成style就好了
已经解决了,我是因为一个文件里又用了字符串,又用了风格,都改成风格就好了 老哥,我也出现了这样的问题,但是我是新创建的项目,只有一个地方用到了className,但是他没有生效
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.19.1
使用框架: React
复现步骤
1: 首先配置文件是true
cssModules: {
enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true
config: {
namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: '[name][local]_[hash:base64:5]'
}
}
2: 之后定义了一个Index.module.scss文件
.line_chart_bp {
background-color: yellow;
}
3: import styles from './Index.module.scss'
黄色背景
期望结果
有黄色背景
实际结果
无任何效果
环境信息
The text was updated successfully, but these errors were encountered: