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
你好,我想问下,我通过把jigsaw.js文件以及同文件夹内的jigsaw.css两个文件一起copy到自己项目中,并且在js文件内修改导出方式 // window.jigsaw = { // init: function (opts) { // return new Jigsaw(opts).init() // } // }; let ptOption = { init: function (opts) { return new Jigsaw(opts).init() } }; export default ptOption; 引用方式是在vue页面中import jigsaw.js文件然后在mounted中 jigsaw.init一样的配置方式后。发现在自己项目中的jigraw__xxxx--ccc的样式全部变成undefined。样式全部不生效。这个该怎么调整。我看你像是在webpack中配置。我感觉不能按你这原样的webpack配置,不然整个项目都挂了。 我想问:1,我该怎么调整这样加载能正常对应载入,2,这样式能改成不通过webpack这样配置吗,直接在js中对应的配置引入啥的
The text was updated successfully, but these errors were encountered:
这里用了css modules防止样式类名冲突,你把import styles from './jigsaw.css' 改成 import './jigsaw.css
import styles from './jigsaw.css'
import './jigsaw.css
然后这几处styles[className] 改成className应该就可以了
styles[className]
className
Sorry, something went wrong.
真的是,我自己测试css modules一直报错不行,到现在还奇怪一样有安装style-loader跟css-loader怎么就不行了,webpack中的.css$规则配置一样的,只要有加css-loader跟style-loader加载就报错。后面尝试把styles[className]全部替换成className就可以了。
No branches or pull requests
你好,我想问下,我通过把jigsaw.js文件以及同文件夹内的jigsaw.css两个文件一起copy到自己项目中,并且在js文件内修改导出方式
// window.jigsaw = {
// init: function (opts) {
// return new Jigsaw(opts).init()
// }
// };
let ptOption = {
init: function (opts) {
return new Jigsaw(opts).init()
}
};
export default ptOption;
引用方式是在vue页面中import jigsaw.js文件然后在mounted中 jigsaw.init一样的配置方式后。发现在自己项目中的jigraw__xxxx--ccc的样式全部变成undefined。样式全部不生效。这个该怎么调整。我看你像是在webpack中配置。我感觉不能按你这原样的webpack配置,不然整个项目都挂了。
我想问:1,我该怎么调整这样加载能正常对应载入,2,这样式能改成不通过webpack这样配置吗,直接在js中对应的配置引入啥的
The text was updated successfully, but these errors were encountered: