Refer to the official Vant documentation
Since the vant component was designed to be 375, the component with Vant was 37.5 and the design we developed was 750, so 75 was set.
postcss.config.js:
module.exports = {
plugins: {
'postcss-pxtorem': {
rootValue({ file }) {
return file.indexOf('vant')! = = -1 ? 37.5 : 75;
},
propList: [The '*'],}}};Copy the code
main.js:
import 'lib-flexible/flexible'
Copy the code