-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (51 loc) · 1.27 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 添加title图标 -->
<link
rel="icon"
type="image/png"
href="https://docs.github.com/assets/cb-345/images/site/favicon.png"
/>
<title>粒子时钟</title>
<style>
* {
margin: 0;
padding: 0;
}
canvas {
background: radial-gradient(#fff, #2a9d52);
display: block;
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
<canvas></canvas>
<script src="./index.js"></script>
<script>
let input = [
["戴尔", "苹果", "联想"],
["笔记本", "平板电脑"],
["黑色", "银色"],
["塑料", "铝"], //这一项参数配置成科扩展
["15", "16"], //这一项参数配置成科扩展
];
let output = ["戴尔-笔记本-黑色"];
function io() {
let iiio = [];
const oup = input.reduce((pre, cur, index) => {
if (index == 3) {
return pre;
}
return pre.flatMap((item) => cur.map((item2) => item + "-" + item2));
});
console.log(oup);
}
io();
</script>
</body>
</html>