<div>my-componet</div>
})
//全局注册组件方式二 import loading from ‘./components/’ Vue.use(loading)
原因:修改的是源码,而引用的是它编译打包之后的,所以没有生效
"build": "cross-env NODE_ENV=production webpack -- config build/webpack.build.conf.js",
"build:manager": "BUILD_ENV=manager npm run build",
"analyz:manager": "NODE_ENV=production npm_config_report=true npm run build:manager",
"build:pos": "cross-env BUILD_ENV=pos npm run build"
var arr = [];
for (var i = 0; i < 100000; i++) {
arr[i] = i;
}
var start = +new Date();
for (var j = arr.length; j > -1; j--) {
arr[j] = j;
}
console.log("倒序循环耗时:%s ms", Date.now() - start);
var start = +new Date();
for (var j = 0; j < arr.length; j++) {
arr[j] = j;
}
console.log("正序序循环耗时:%s ms", Date.now() - start);
<script>
function setRem(){
var deviceWidth=document.documentElement.clientWidth||document.body.clientWidth
var scale=deviceWidth/750/100;
documet.documentElement.style.fontSize=scale+'px'
}
window.onresize=function(){
setRem();
}
</script>
width:100px;
height:100px;
position:fixed;//absolute
left:50%;
top:50%;
margin:-50px,0,0,-50px;
width:100px;
height:100px;
position:fixed;//absolute
left:0;
top:0;
right:0;
bottom:0;
margin:auto;
*{margin:0;padding:0}//去掉滚动条
html,body{
height:100%;
}
body{
display:flex;
align-items:center;
justify-content:center;
}
div{
width:100px;
height:100px;
}