Preload,Prefetch的使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- 引入样式 -->
<!-- <link rel="preload" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
<link rel='preload' href="https://unpkg.com/element-ui/lib/index.js" as="script" >
<!-- 引入组件库 -->
</head>
<body>
<div class="left"></div>
<div class="right"></div>
<div class="box">
<div class="box1">1</div>
<div class="box2">2</div>
</div>
<style>
/*方法一: BFC(块级格式化上下文)*/
.container{
width:1000px;height:400px;border: 1px solid red;
}
.left{
width:200px;height:200px;background: gray;
float: left;
}
.right{
overflow:hidden; /* 触发bfc */
height:200px;
background: green;
}
.box{
display: flex;
}
.box1{
background :red;
width: 200px
}
.box2{
flex: 1;
background :green;
}
</style>
<script>
let arr1 = [1,2,3,4,5];
let arr2 = [...arr1,0];
arr2[0] = "1000"
console.log(arr1)
console.log(arr2)
console.log(window.WebViewJavascriptBridge)
var arr = [1,2,3]
console.log(arr)
console.log(arr.toLocaleString())
</script>
<!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
</body>
</html>