Browse Source

1

pull/14/head^2
zhaoguoqiang 3 years ago
parent
commit
66a2084e36
  1. 11
      postcss.config.js

11
postcss.config.js

@ -1,9 +1,10 @@
const path = require('path');
const unit = require('./src/config/translatedUnit_server');
module.exports = ({
file
}) => {
const designWidth = file.dirname.includes(path.join('node_modules', 'vant')) ? 375 : 750;
const designWidth = file.dirname.includes(path.join('node_modules', 'vant')) ? 350 : 750;
return {
plugins: {
autoprefixer: {},
@ -21,7 +22,13 @@ module.exports = ({
minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换
mediaQuery: true,
exclude: [],
landscape: false
landscape: false,
rules: {
path: 'vant',
fn(pixels, translated) {
return `${translated * 2}${unit.vw}`;
},
},
}
}
}

Loading…
Cancel
Save