vue-pxtorem
v1.0.2
Published
Vue.js Px2Rem transform plugin
Downloads
4
Readme
vue-pxtorem
vue-pxtorem is a plugin for vue.js
how to use
import RemPlugin from 'vue-pxtorem';
Vue.use(RemPlugin, {
pxToRem?: number // default 75px = 1rem
});
new Vue({...});
Notice
this plugin esm format only and it will take effect automatic.
If you want some components disable rem, plz use this.$rem(false)
in lifecycle method beforeCreate().
beforeCreate() {
this.$rem(false);
}
The easy way to transform px2rem, try this postcss plugin postcss-pxtorem.