2 Commits

Author SHA1 Message Date
zhaoguoqiang 8c04d10c70 Merge branch 'guoqiang' into test 3 years ago
zhaoguoqiang 68d537bce1 设配vant 3 years ago
  1. 5
      postcss.config.js

5
postcss.config.js

@ -4,8 +4,7 @@ const unit = require('./src/config/translatedUnit_server');
module.exports = ({ module.exports = ({
file file
}) => { }) => {
// const designWidth = file.dirname.includes(path.join('node_modules', 'vant')) ? 350 : 750;
const designWidth = file.dirname.includes('node_modules/vant') ? 375 : 750;
const designWidth = file.dirname.includes(path.join('node_modules', 'vant')) ? 375 : 750;
return { return {
plugins: { plugins: {
autoprefixer: {}, autoprefixer: {},
@ -13,7 +12,7 @@ module.exports = ({
unitToConvert: "px", unitToConvert: "px",
viewportWidth: designWidth, viewportWidth: designWidth,
propList: ["*"], propList: ["*"],
unitPrecision: 3, // 转换后的精度,即小数点位数
unitPrecision: 4, // 转换后的精度,即小数点位数
viewportUnit: "vw", viewportUnit: "vw",
fontViewportUnit: "vw", fontViewportUnit: "vw",
selectorBlackList: [], selectorBlackList: [],

Loading…
Cancel
Save