Skip to content

Commit 8815ff6

Browse files
committed
word 和 excel的导出
word 和 excel的导出
1 parent 7dc7a97 commit 8815ff6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3532
-103
lines changed

js基础知识/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>按钮</title>
8+
<style>
9+
button{
10+
display: inline-block
11+
}
12+
.three{
13+
margin-top: 20px;
14+
}
15+
</style>
16+
</head>
17+
<body>
18+
<div style="width: 100px">
19+
<button>11</button>
20+
<button>22</button>
21+
<button class="three">33</button>
22+
</div>
23+
</body>
24+
</html>

mask蒙版/dong.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>logo动态效果</title>
9+
<style>
10+
#mask{
11+
width: 100%;
12+
height: 200px;
13+
background: url(images/news.jpg) no-repeat;
14+
/* -webkit-mask: url(http://slides.iamvdo.me/kiwiparty12/img/masque2.png) */
15+
/* -webkit-mask : -webkit-gradient(linear, left top, right bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0))); */
16+
}
17+
</style>
18+
</head>
19+
20+
<body>
21+
<div id="mask">
22+
23+
</div>
24+
</body>
25+
<script>
26+
// 动态行为的变化
27+
// document.ready = function () {
28+
var mask = document.getElementById('mask');
29+
mask.onmouseover = function (e) {
30+
// debugger
31+
var b = 0,
32+
// c = e,
33+
d = setInterval(function () {
34+
if (b > parseInt(mask.offsetWidth + 50)) { clearInterval(d); }
35+
mask.style.mask = "-webkit-gradient(radial, 88 53," + b + ", 88 53, " + (b + 15) + ", from(rgba(255, 255, 255,1)), color-stop(0.5,rgba(255, 255, 255, 0.2)), to(rgba(255, 255, 255,1)))";
36+
b++;
37+
}, 0);
38+
}
39+
// }
40+
</script>
41+
42+
</html>

mask蒙版/images/news.jpg

117 KB
Loading

mask蒙版/images/timg.jpg

11.5 KB
Loading

mask蒙版/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>mask 蒙版</title>
8+
<style>
9+
*{
10+
margin: 0;
11+
padding: 0;
12+
box-sizing: border-box
13+
}
14+
.main{
15+
width: 100%;
16+
height: 200px;
17+
background: url(images/news.jpg) no-repeat;
18+
/* -webkit-mask: url(http://slides.iamvdo.me/kiwiparty12/img/masque2.png) */
19+
-webkit-mask : -webkit-gradient(linear, left top, right bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
20+
}
21+
</style>
22+
</head>
23+
<body>
24+
<div class="main">
25+
26+
</div>
27+
</body>
28+
</html>

mask蒙版/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### 链接
2+
https://www.cnblogs.com/luozhihao/p/4785076.html

前端打包/parcle/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// console.log("hello world");
1+
console.log("hello world");
22

3-
import main from './main';
3+
// import main from './main';
44

5-
main();
5+
// main();

前端打包/parcle/npm-debug.log

Lines changed: 0 additions & 99 deletions
This file was deleted.

前端打包/parcle/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
parcel是不需要任何的配置的一种打包的形式
44

5-
node 版本的需要升级
5+
node 版本的需要升级 要不会出现
6+
Unexpected token function 这个错误

单例模式/index.html

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>单例模式</title>
9+
</head>
10+
11+
<body>
12+
13+
</body>
14+
<script>
15+
// 实现1: 最简单的对象字面量
16+
var singleton = {
17+
attr: 1,
18+
method: function () {
19+
return this.attr
20+
}
21+
}
22+
var a = singleton;
23+
var b = singleton;
24+
console.log(a === b);
25+
// 十分简单,并且非常使用,不足之处在于没有什么封装性,所有的属性方法都是暴露的。
26+
// 对于一些需要使用私有变量的情况就显得心有余而力不足了。当然在对于 this 的问题上也是有一定弊端的。
27+
// 实现2:构造函数内部判断
28+
// 其实和最初的JS实现有点类似,不过是将对是否已经存在该类的实例的判断放入构造函数内部。
29+
function Construct() {
30+
// 确保有单例
31+
if (Construct.unique !== undefined) {
32+
return Construct.unique
33+
}
34+
// 没有创建
35+
this.name = 'zhangsan';
36+
this.age = 12;
37+
Construct.unique = this;
38+
}
39+
var t1 = new Construct();
40+
var t2 = new Construct();
41+
console.log(t1 === t2);
42+
// 那么也有的, t1 === t2 。
43+
// 也是非常简单,无非就是提出一个属性来做判断,但是该方式也没有安全性,
44+
// 一旦我在外部修改了Construct的unique属性,那么单例模式也就被破坏了
45+
// 实现3 : 闭包方式
46+
// 对于大着 灵活 牌子的JS来说,任何问题都能找到 n 种答案,只不过让我自己去掂量孰优孰劣而已,
47+
// 下面就简单的举几个使用闭包实现单例模式的方法,无非也就是将创建了的单例缓存而已。
48+
var single = (function () {
49+
var unique;
50+
51+
function Construct() {
52+
// 生成单例构造函数的代码
53+
this.name = '11'
54+
}
55+
unique = new Construct();
56+
return unique;
57+
})()
58+
59+
var a1 = single;
60+
var a2 = single;
61+
console.log(a1 === a2)
62+
console.log(a2)
63+
// 方法四 代理
64+
class CreateUser {
65+
constructor(name) {
66+
this.name = name;
67+
this.getName();
68+
}
69+
getName() {
70+
return this.name;
71+
}
72+
}
73+
74+
// 代理实现单例模式
75+
var ProxyMode = (function () {
76+
var instance = null;
77+
return function (name) {
78+
if (!instance) {
79+
instance = new CreateUser(name);
80+
}
81+
return instance;
82+
}
83+
})();
84+
// 测试单体模式的实例
85+
var c = new ProxyMode("aaa");
86+
var d = new ProxyMode("bbb");
87+
// 因为单体模式是只实例化一次,所以下面的实例是相等的
88+
console.log(c === d); //true
89+
</script>
90+
91+
</html>

0 commit comments

Comments
 (0)