美文网首页
react+antd-mobile中 img src和 conf

react+antd-mobile中 img src和 conf

作者: 开心就好_635d | 来源:发表于2019-02-28 13:32 被阅读0次

1.<img src={require(`../../resource/images/card-${val.imgsrc}.jpg`)}

2.const {

  override,

  fixBabelImports,

  addLessLoader,

} = require("customize-cra");

module.exports = override(

  fixBabelImports("import", {

    libraryName: "antd-mobile", style: true // change importing css to less

  }),

  addLessLoader({

    javascriptEnabled: true,//支持css文件中写入js

    modifyVars: { "@primary-color": "#1DA57A" }

  })

);

相关文章

网友评论

      本文标题:react+antd-mobile中 img src和 conf

      本文链接:https://www.haomeiwen.com/subject/hduhuqtx.html