@yck-web/set-font-size
v1.0.1
Published
vue的pc端适配插件
Downloads
2
Readme
vue的pc端适配插件(配合px2rem-loader插件使用)
使用
import setFontSize from "@yck-web/set-font-size";
setFontSize({
remUnit: 1920,//默认值,设计图尺寸
large: 1920,//默认值,适配上限值
small: 900,//默认值,适配下限值
})
px2rem-loader插件使用
-- 安装px2rem-loader
{
test: /\.css/,
use: [cssLoader, 'css-loader', 'postcss-loader', {
loader: "px2rem-loader",
}],
},
{
test: /\.(sc|sa)ss$/,
use: [cssLoader, 'css-loader', 'postcss-loader', {
loader: "px2rem-loader",
}, 'sass-loader', {
loader: 'sass-resources-loader',
options: {
resources: [
path.resolve(__dirname, "../src/styles/common.scss"), //引入全局scss
],
},
}, ],
}
npm publish --access public