-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (49 loc) · 2.46 KB
/
Copy pathindex.html
File metadata and controls
53 lines (49 loc) · 2.46 KB
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
53
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>JSON 树状解析器</title>
<link rel="stylesheet" href="./style.css" />
</head>
<body>
<main class="app">
<header class="app-header">
<h1>JSON 树状解析器</h1>
</header>
<section class="panel input-panel">
<label for="jsonInput">JSON 输入</label>
<textarea id="jsonInput" spellcheck="false" placeholder='例如:{"name":"Alice","skills":["js","css"]}'></textarea>
<div class="actions">
<button id="parseBtn" type="button">解析 JSON</button>
<button id="resetBtn" type="button" class="ghost">重置示例</button>
</div>
<p id="errorMsg" class="error" role="alert" aria-live="polite"></p>
</section>
<section class="panel tree-panel">
<div class="panel-title-row">
</div>
<div class="zoom-toolbar" aria-label="可视化工具栏">
<div class="view-switch" role="group" aria-label="可视化模式">
<button id="viewFlowBtn" type="button" class="zoom-btn view-btn active">上下图</button>
<button id="viewFlowHBtn" type="button" class="zoom-btn view-btn">左右图</button>
<button id="viewClassicBtn" type="button" class="zoom-btn view-btn">经典树</button>
</div>
<button id="filterArrayBtn" type="button" class="zoom-btn ghost filter-btn">仅数组路径</button>
<button id="collapseAllBtn" type="button" class="zoom-btn ghost">全部折叠</button>
<button id="expandAllBtn" type="button" class="zoom-btn ghost">全部展开</button>
<button id="zoomOutBtn" type="button" class="zoom-btn">-</button>
<input id="zoomRange" type="range" min="20" max="200" step="5" value="100" />
<button id="zoomInBtn" type="button" class="zoom-btn">+</button>
<button id="zoomResetBtn" type="button" class="zoom-btn ghost">100%</button>
<span id="zoomLabel" class="zoom-label">100%</span>
</div>
<div class="tree-canvas-wrap">
<button id="canvasFullscreenBtn" type="button" class="canvas-fullscreen-btn" aria-label="画布全屏" title="画布全屏">⛶</button>
<div id="treeRoot" class="tree-root" aria-live="polite"></div>
</div>
</section>
</main>
<script type="module" src="./script.js"></script>
</body>
</html>