1、从远程下载文件
2、Windows电脑重点在于必须要在VScode里打开文件,在其终端下运行如下命令
①npm install
②npm run serve 或 npm run dev
3、到这一步就大功告成了
注:
若网页画面尺寸不对,则需要更改文件配置,具体步骤如下
npm install 下载后的node_modules文件里的lib-flexible文件的flexible.js文件(第69-77)
cnpm install node-sass --save-dev
cnpm install sass-loader --save-dev
修改前
function refreshRem(){
var width = docEl.getBoundingClientRect().width;
if (width / dpr > 540) {
width = 540 * dpr;
}
var rem = width / 10;
docEl.style.fontSize = rem + 'px';
flexible.rem = win.rem = rem;
}
修改后
function refreshRem(){
var width = docEl.getBoundingClientRect().width;
if (width / dpr > 540) {
width = width * dpr;
}
var rem = width / 10;
docEl.style.fontSize = rem + 'px';
flexible.rem = win.rem = rem;
}
(69-77)