openprototype 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/product/demo/pc/customer/customer_form.html +3 -0
- package/product/demo/pc/customer/customer_list.html +3 -0
- package/product/demo/pc/index.html +13 -0
- package/proto-kit.config.json +1 -1
- package/runtime/shared/common/prd-panel.css +395 -0
- package/runtime/shared/common/prd-panel.js +274 -8
- package/templates/gitignore +2 -0
- package/templates/product-shell/index.html +13 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -80,6 +80,9 @@ body {
|
|
|
80
80
|
|
|
81
81
|
<script src="/_kit/shared/base-manager.js"></script>
|
|
82
82
|
<script src="/product/demo/pc/demo-data.js"></script>
|
|
83
|
+
<script src="/_kit/shared/libs/marked.min.js"></script>
|
|
84
|
+
<script src="/_kit/shared/common.js"></script>
|
|
85
|
+
<script src="/_kit/shared/prd-content.js"></script>
|
|
83
86
|
<script>
|
|
84
87
|
const params = new URLSearchParams(location.search);
|
|
85
88
|
const mode = params.get('mode');
|
|
@@ -72,6 +72,9 @@ tr:hover td { background: #f7faff; }
|
|
|
72
72
|
|
|
73
73
|
<script src="/_kit/shared/base-manager.js"></script>
|
|
74
74
|
<script src="/product/demo/pc/demo-data.js"></script>
|
|
75
|
+
<script src="/_kit/shared/libs/marked.min.js"></script>
|
|
76
|
+
<script src="/_kit/shared/common.js"></script>
|
|
77
|
+
<script src="/_kit/shared/prd-content.js"></script>
|
|
75
78
|
<script>
|
|
76
79
|
function render(rows) {
|
|
77
80
|
const tbody = document.getElementById('tbody');
|
|
@@ -548,6 +548,7 @@ function saveVersionHistory() {
|
|
|
548
548
|
let reviewStatus = loadReviewStatus();
|
|
549
549
|
let versionHistory = loadVersionHistory();
|
|
550
550
|
let activeRow = null;
|
|
551
|
+
let previewLoadRequest = 0;
|
|
551
552
|
|
|
552
553
|
// ─────────────────────────────────────────────
|
|
553
554
|
// Sidebar resize
|
|
@@ -713,6 +714,18 @@ function loadPreview(path, row) {
|
|
|
713
714
|
const openBtn = document.getElementById('previewOpenBtn');
|
|
714
715
|
|
|
715
716
|
const url = path;
|
|
717
|
+
const requestId = ++previewLoadRequest;
|
|
718
|
+
const expectedUrl = new URL(url, window.location.href).href;
|
|
719
|
+
frame.style.visibility = 'hidden';
|
|
720
|
+
frame.addEventListener('load', function revealLoadedPreview() {
|
|
721
|
+
if (requestId !== previewLoadRequest) {
|
|
722
|
+
frame.removeEventListener('load', revealLoadedPreview);
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
if (frame.contentWindow.location.href !== expectedUrl) return;
|
|
726
|
+
frame.style.visibility = 'visible';
|
|
727
|
+
frame.removeEventListener('load', revealLoadedPreview);
|
|
728
|
+
});
|
|
716
729
|
frame.src = url;
|
|
717
730
|
frame.style.display = 'block';
|
|
718
731
|
placeholder.style.display = 'none';
|
package/proto-kit.config.json
CHANGED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PRD 面板样式 — 由 prd-panel.js 自动注入,无需手动引入。
|
|
3
|
+
* 变量与规则均限定在 .prd-* 前缀下,不影响页面自身样式。
|
|
4
|
+
*/
|
|
5
|
+
:root {
|
|
6
|
+
--prd-primary: var(--rx-brand-600, #1677ff);
|
|
7
|
+
--prd-primary-hover: var(--rx-brand-500, #2f8cff);
|
|
8
|
+
--prd-primary-light: var(--rx-brand-50, #edf6ff);
|
|
9
|
+
--prd-danger: var(--rx-danger-600, #ff2f3f);
|
|
10
|
+
--prd-text-primary: var(--rx-text-1, #20242d);
|
|
11
|
+
--prd-text-secondary: var(--rx-text-2, #4f5665);
|
|
12
|
+
--prd-border-color: var(--rx-line-2, #dfe5ee);
|
|
13
|
+
--prd-border-color-split: var(--rx-line-1, #edf0f5);
|
|
14
|
+
--prd-background-light: var(--rx-bg-surface, #ffffff);
|
|
15
|
+
--prd-background-hover: var(--rx-bg-table-hover, #f6f9ff);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.prd-float-btn {
|
|
19
|
+
position: fixed;
|
|
20
|
+
right: 0;
|
|
21
|
+
bottom: 100px;
|
|
22
|
+
width: 40px;
|
|
23
|
+
height: 80px;
|
|
24
|
+
background: linear-gradient(135deg, var(--prd-primary), var(--prd-primary-hover));
|
|
25
|
+
color: #fff;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
border-radius: 8px 0 0 8px;
|
|
31
|
+
box-shadow: -2px 2px 10px rgba(0,0,0,0.15);
|
|
32
|
+
z-index: 999;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
writing-mode: vertical-rl;
|
|
36
|
+
letter-spacing: 2px;
|
|
37
|
+
transition: all 0.3s ease;
|
|
38
|
+
}
|
|
39
|
+
.prd-float-btn:hover {
|
|
40
|
+
width: 48px;
|
|
41
|
+
background: linear-gradient(135deg, var(--prd-primary-hover), var(--prd-primary));
|
|
42
|
+
}
|
|
43
|
+
.prd-slide-panel {
|
|
44
|
+
position: fixed;
|
|
45
|
+
top: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
width: min(680px, 86vw);
|
|
48
|
+
height: 100vh;
|
|
49
|
+
background: var(--prd-background-light);
|
|
50
|
+
box-shadow: -4px 0 20px rgba(0,0,0,0.15);
|
|
51
|
+
z-index: 10000;
|
|
52
|
+
transform: translateX(100%);
|
|
53
|
+
transition: transform 0.3s ease;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
}
|
|
57
|
+
.prd-slide-panel.open {
|
|
58
|
+
transform: translateX(0);
|
|
59
|
+
}
|
|
60
|
+
.prd-panel-resizer {
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: -3px;
|
|
63
|
+
top: 0;
|
|
64
|
+
width: 10px;
|
|
65
|
+
height: 100%;
|
|
66
|
+
cursor: ew-resize;
|
|
67
|
+
background: transparent;
|
|
68
|
+
transition: background 0.2s ease;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
}
|
|
71
|
+
.prd-panel-resizer:hover,
|
|
72
|
+
.prd-panel-resizer.resizing {
|
|
73
|
+
background: var(--prd-primary);
|
|
74
|
+
}
|
|
75
|
+
.prd-panel-header {
|
|
76
|
+
padding: 16px 20px;
|
|
77
|
+
background: linear-gradient(135deg, var(--prd-primary), var(--prd-primary-hover));
|
|
78
|
+
color: #fff;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
.prd-panel-header-left {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 12px;
|
|
88
|
+
flex: 1;
|
|
89
|
+
min-width: 0;
|
|
90
|
+
position: relative;
|
|
91
|
+
}
|
|
92
|
+
.prd-panel-header h3 {
|
|
93
|
+
margin: 0;
|
|
94
|
+
font-size: 16px;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
.prd-panel-file-name {
|
|
99
|
+
display: none;
|
|
100
|
+
font-size: 13px;
|
|
101
|
+
opacity: 0.9;
|
|
102
|
+
font-weight: 400;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
}
|
|
107
|
+
.prd-panel-copy-btn {
|
|
108
|
+
background: rgba(255, 255, 255, 0.15);
|
|
109
|
+
border: none;
|
|
110
|
+
color: #fff;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
padding: 6px 8px;
|
|
113
|
+
border-radius: 6px;
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
transition: all 0.2s ease;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
}
|
|
120
|
+
.prd-panel-copy-btn:hover {
|
|
121
|
+
background: rgba(255, 255, 255, 0.25);
|
|
122
|
+
transform: scale(1.05);
|
|
123
|
+
}
|
|
124
|
+
.prd-panel-copy-btn:active {
|
|
125
|
+
transform: scale(0.95);
|
|
126
|
+
}
|
|
127
|
+
.prd-panel-edit-btn {
|
|
128
|
+
background: rgba(255, 255, 255, 0.15);
|
|
129
|
+
border: none;
|
|
130
|
+
color: #fff;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
padding: 6px 10px;
|
|
133
|
+
border-radius: 6px;
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
transition: all 0.2s ease;
|
|
136
|
+
flex-shrink: 0;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
.prd-panel-edit-btn:hover {
|
|
140
|
+
background: rgba(255, 255, 255, 0.25);
|
|
141
|
+
}
|
|
142
|
+
.prd-panel-toast {
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
color: #fff;
|
|
145
|
+
opacity: 0.9;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
}
|
|
148
|
+
.prd-panel-toast.is-error {
|
|
149
|
+
color: #ffd6d6;
|
|
150
|
+
}
|
|
151
|
+
.prd-panel-close {
|
|
152
|
+
background: none;
|
|
153
|
+
border: none;
|
|
154
|
+
color: #fff;
|
|
155
|
+
font-size: 24px;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
padding: 0;
|
|
158
|
+
line-height: 1;
|
|
159
|
+
opacity: 0.8;
|
|
160
|
+
margin-left: 12px;
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
}
|
|
163
|
+
.prd-panel-close:hover {
|
|
164
|
+
opacity: 1;
|
|
165
|
+
}
|
|
166
|
+
.prd-panel-tabs {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
gap: 8px;
|
|
170
|
+
padding: 10px 16px;
|
|
171
|
+
border-bottom: 1px solid var(--prd-border-color-split);
|
|
172
|
+
background: var(--prd-background-light);
|
|
173
|
+
overflow-x: auto;
|
|
174
|
+
flex-shrink: 0;
|
|
175
|
+
}
|
|
176
|
+
.prd-panel-tabs:empty {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
.prd-panel-tab {
|
|
180
|
+
border: 1px solid var(--prd-border-color);
|
|
181
|
+
background: var(--prd-background-light);
|
|
182
|
+
color: var(--prd-text-secondary);
|
|
183
|
+
border-radius: 4px;
|
|
184
|
+
padding: 5px 12px;
|
|
185
|
+
font-size: 13px;
|
|
186
|
+
line-height: 20px;
|
|
187
|
+
white-space: nowrap;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
transition: all 0.2s ease;
|
|
190
|
+
}
|
|
191
|
+
.prd-panel-tab:hover {
|
|
192
|
+
color: var(--prd-primary);
|
|
193
|
+
border-color: var(--prd-primary);
|
|
194
|
+
background: var(--prd-background-hover);
|
|
195
|
+
}
|
|
196
|
+
.prd-panel-tab.active {
|
|
197
|
+
color: var(--prd-primary);
|
|
198
|
+
border-color: var(--prd-primary);
|
|
199
|
+
background: var(--prd-primary-light);
|
|
200
|
+
font-weight: 500;
|
|
201
|
+
}
|
|
202
|
+
.prd-panel-content {
|
|
203
|
+
flex: 1;
|
|
204
|
+
overflow-y: auto;
|
|
205
|
+
padding: 20px;
|
|
206
|
+
}
|
|
207
|
+
.prd-panel-content h1 {
|
|
208
|
+
font-size: 20px;
|
|
209
|
+
font-weight: 600;
|
|
210
|
+
color: var(--prd-text-primary);
|
|
211
|
+
margin: 0 0 12px 0;
|
|
212
|
+
padding-bottom: 6px;
|
|
213
|
+
border-bottom: 2px solid var(--prd-primary);
|
|
214
|
+
}
|
|
215
|
+
.prd-panel-content h2 {
|
|
216
|
+
font-size: 18px;
|
|
217
|
+
font-weight: 600;
|
|
218
|
+
color: var(--prd-text-primary);
|
|
219
|
+
margin: 16px 0 8px 0;
|
|
220
|
+
}
|
|
221
|
+
.prd-panel-content h3 {
|
|
222
|
+
font-size: 16px;
|
|
223
|
+
font-weight: 500;
|
|
224
|
+
color: var(--prd-text-primary);
|
|
225
|
+
margin: 12px 0 6px 0;
|
|
226
|
+
}
|
|
227
|
+
.prd-panel-content h4 {
|
|
228
|
+
font-size: 15px;
|
|
229
|
+
font-weight: 500;
|
|
230
|
+
color: var(--prd-text-primary);
|
|
231
|
+
margin: 10px 0 6px 0;
|
|
232
|
+
}
|
|
233
|
+
.prd-panel-content h5 {
|
|
234
|
+
font-size: 14px;
|
|
235
|
+
font-weight: 500;
|
|
236
|
+
color: var(--prd-text-primary);
|
|
237
|
+
margin: 8px 0 4px 0;
|
|
238
|
+
}
|
|
239
|
+
.prd-panel-content p {
|
|
240
|
+
margin: 4px 0;
|
|
241
|
+
color: var(--prd-text-secondary);
|
|
242
|
+
font-size: 13px;
|
|
243
|
+
line-height: 1.6;
|
|
244
|
+
}
|
|
245
|
+
.prd-panel-content ul, .prd-panel-content ol {
|
|
246
|
+
margin: 4px 0;
|
|
247
|
+
padding-left: 24px;
|
|
248
|
+
color: var(--prd-text-secondary);
|
|
249
|
+
font-size: 13px;
|
|
250
|
+
line-height: 1.6;
|
|
251
|
+
}
|
|
252
|
+
.prd-panel-content li {
|
|
253
|
+
margin: 2px 0;
|
|
254
|
+
}
|
|
255
|
+
.prd-panel-content a.prd-doc-link {
|
|
256
|
+
color: var(--prd-primary);
|
|
257
|
+
font-weight: 500;
|
|
258
|
+
text-decoration: none;
|
|
259
|
+
}
|
|
260
|
+
.prd-panel-content a.prd-doc-link:hover {
|
|
261
|
+
text-decoration: underline;
|
|
262
|
+
}
|
|
263
|
+
.prd-panel-content table {
|
|
264
|
+
width: 100%;
|
|
265
|
+
border-collapse: collapse;
|
|
266
|
+
font-size: 13px;
|
|
267
|
+
margin: 0;
|
|
268
|
+
table-layout: fixed;
|
|
269
|
+
}
|
|
270
|
+
.prd-panel-content th, .prd-panel-content td {
|
|
271
|
+
border: 1px solid var(--prd-border-color);
|
|
272
|
+
padding: 8px 12px;
|
|
273
|
+
text-align: left;
|
|
274
|
+
vertical-align: top;
|
|
275
|
+
word-wrap: break-word;
|
|
276
|
+
word-break: normal;
|
|
277
|
+
overflow-wrap: break-word;
|
|
278
|
+
}
|
|
279
|
+
.prd-panel-content th {
|
|
280
|
+
background: #fafafa;
|
|
281
|
+
font-weight: 500;
|
|
282
|
+
color: var(--prd-text-primary);
|
|
283
|
+
white-space: nowrap;
|
|
284
|
+
}
|
|
285
|
+
.prd-panel-content td {
|
|
286
|
+
color: var(--prd-text-secondary);
|
|
287
|
+
}
|
|
288
|
+
.prd-panel-content .table-wrapper {
|
|
289
|
+
overflow-x: auto;
|
|
290
|
+
overflow-y: visible;
|
|
291
|
+
margin: 8px 0;
|
|
292
|
+
border: 1px solid var(--prd-border-color);
|
|
293
|
+
border-radius: 4px;
|
|
294
|
+
-webkit-overflow-scrolling: touch;
|
|
295
|
+
}
|
|
296
|
+
.prd-panel-content .table-wrapper table {
|
|
297
|
+
width: auto;
|
|
298
|
+
min-width: 100%;
|
|
299
|
+
table-layout: auto;
|
|
300
|
+
}
|
|
301
|
+
.prd-panel-content strong {
|
|
302
|
+
font-weight: 600;
|
|
303
|
+
color: var(--prd-text-primary);
|
|
304
|
+
}
|
|
305
|
+
.prd-panel-content hr {
|
|
306
|
+
border: none;
|
|
307
|
+
border-top: 1px solid var(--prd-border-color-split);
|
|
308
|
+
margin: 12px 0;
|
|
309
|
+
}
|
|
310
|
+
.prd-panel-content code {
|
|
311
|
+
background: var(--prd-background-hover);
|
|
312
|
+
padding: 2px 6px;
|
|
313
|
+
border-radius: 3px;
|
|
314
|
+
font-family: 'Consolas', 'Monaco', monospace;
|
|
315
|
+
font-size: 12px;
|
|
316
|
+
}
|
|
317
|
+
.prd-panel-content pre {
|
|
318
|
+
background: var(--prd-background-hover);
|
|
319
|
+
padding: 12px;
|
|
320
|
+
border-radius: 4px;
|
|
321
|
+
overflow-x: auto;
|
|
322
|
+
font-size: 12px;
|
|
323
|
+
line-height: 1.6;
|
|
324
|
+
}
|
|
325
|
+
.prd-panel-content pre code {
|
|
326
|
+
background: none;
|
|
327
|
+
padding: 0;
|
|
328
|
+
}
|
|
329
|
+
.prd-panel-editor-wrap {
|
|
330
|
+
flex: 1;
|
|
331
|
+
display: flex;
|
|
332
|
+
flex-direction: column;
|
|
333
|
+
min-height: 0;
|
|
334
|
+
}
|
|
335
|
+
.prd-panel-editor-toolbar {
|
|
336
|
+
display: flex;
|
|
337
|
+
align-items: center;
|
|
338
|
+
gap: 8px;
|
|
339
|
+
padding: 8px 16px;
|
|
340
|
+
border-bottom: 1px solid var(--prd-border-color-split);
|
|
341
|
+
background: var(--prd-background-light);
|
|
342
|
+
flex-shrink: 0;
|
|
343
|
+
}
|
|
344
|
+
.prd-panel-editor-msg {
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
color: var(--prd-text-secondary);
|
|
347
|
+
}
|
|
348
|
+
.prd-panel-editor-msg.is-error {
|
|
349
|
+
color: var(--prd-danger);
|
|
350
|
+
}
|
|
351
|
+
.prd-panel-editor-spacer {
|
|
352
|
+
flex: 1;
|
|
353
|
+
}
|
|
354
|
+
.prd-panel-editor-btn {
|
|
355
|
+
border: 1px solid var(--prd-border-color);
|
|
356
|
+
background: #fff;
|
|
357
|
+
color: var(--prd-text-secondary);
|
|
358
|
+
border-radius: 4px;
|
|
359
|
+
padding: 5px 14px;
|
|
360
|
+
font-size: 13px;
|
|
361
|
+
line-height: 20px;
|
|
362
|
+
cursor: pointer;
|
|
363
|
+
transition: all 0.2s ease;
|
|
364
|
+
}
|
|
365
|
+
.prd-panel-editor-btn:hover {
|
|
366
|
+
color: var(--prd-primary);
|
|
367
|
+
border-color: var(--prd-primary);
|
|
368
|
+
}
|
|
369
|
+
.prd-panel-editor-save {
|
|
370
|
+
background: var(--prd-primary);
|
|
371
|
+
border-color: var(--prd-primary);
|
|
372
|
+
color: #fff;
|
|
373
|
+
}
|
|
374
|
+
.prd-panel-editor-save:hover {
|
|
375
|
+
opacity: 0.9;
|
|
376
|
+
color: #fff;
|
|
377
|
+
}
|
|
378
|
+
.prd-panel-editor-cancel:hover {
|
|
379
|
+
color: var(--prd-danger);
|
|
380
|
+
border-color: var(--prd-danger);
|
|
381
|
+
}
|
|
382
|
+
.prd-panel-editor-textarea {
|
|
383
|
+
flex: 1;
|
|
384
|
+
width: 100%;
|
|
385
|
+
padding: 16px;
|
|
386
|
+
border: none;
|
|
387
|
+
outline: none;
|
|
388
|
+
resize: none;
|
|
389
|
+
font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
|
|
390
|
+
font-size: 13px;
|
|
391
|
+
line-height: 1.6;
|
|
392
|
+
color: var(--prd-text-primary);
|
|
393
|
+
background: #fff;
|
|
394
|
+
box-sizing: border-box;
|
|
395
|
+
}
|
|
@@ -3,12 +3,57 @@
|
|
|
3
3
|
* 管理 PRD 文档的加载、渲染和交互
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
// 页面可在引入本模块前声明这些全局以覆盖默认行为;未声明时使用默认值。
|
|
7
|
+
// PRD_OVERVIEW_VERSION 启用“当前版本”虚拟页签,PRD_WORKSPACE_MAP 配置多文档工作区。
|
|
8
|
+
var PRD_BASE_PATH = typeof PRD_BASE_PATH !== 'undefined' ? PRD_BASE_PATH : './';
|
|
9
|
+
var PRD_FILE_MAP = typeof PRD_FILE_MAP !== 'undefined' ? PRD_FILE_MAP : {};
|
|
10
|
+
var PRD_CACHE = typeof PRD_CACHE !== 'undefined' ? PRD_CACHE : {};
|
|
11
|
+
|
|
6
12
|
var prdPanelInitialized = false;
|
|
7
13
|
var prdPanelWidth = null;
|
|
8
14
|
var PRD_PANEL_DEFAULT_WIDTH = 680;
|
|
9
15
|
var PRD_PANEL_MIN_WIDTH = 360;
|
|
10
16
|
var PRD_PANEL_MAX_RATIO = 0.86;
|
|
11
17
|
|
|
18
|
+
// 记录本文件自身的 <script src>,用于定位同目录的 prd-panel.css 并自动注入
|
|
19
|
+
var PRD_PANEL_SCRIPT_SRC = document.currentScript ? document.currentScript.getAttribute('src') : '';
|
|
20
|
+
|
|
21
|
+
function arePrdPanelStylesReady() {
|
|
22
|
+
var link = document.getElementById('prdPanelStyles');
|
|
23
|
+
return !!(link && link.sheet);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function revealPrdPanelDom() {
|
|
27
|
+
['prdFloatBtn', 'prdPanel'].forEach(function(id) {
|
|
28
|
+
var element = document.getElementById(id);
|
|
29
|
+
if (element && element.dataset.prdPanelPending === 'true') {
|
|
30
|
+
element.style.visibility = '';
|
|
31
|
+
delete element.dataset.prdPanelPending;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function hidePrdPanelUntilStylesReady(element) {
|
|
37
|
+
if (!element || arePrdPanelStylesReady()) return;
|
|
38
|
+
element.dataset.prdPanelPending = 'true';
|
|
39
|
+
element.style.visibility = 'hidden';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function ensurePrdPanelStyles() {
|
|
43
|
+
var existingLink = document.getElementById('prdPanelStyles');
|
|
44
|
+
if (existingLink) return existingLink;
|
|
45
|
+
var href = PRD_PANEL_SCRIPT_SRC
|
|
46
|
+
? PRD_PANEL_SCRIPT_SRC.replace(/prd-panel\.js(?:\?.*)?$/, 'prd-panel.css')
|
|
47
|
+
: 'common/prd-panel.css';
|
|
48
|
+
var link = document.createElement('link');
|
|
49
|
+
link.id = 'prdPanelStyles';
|
|
50
|
+
link.rel = 'stylesheet';
|
|
51
|
+
link.href = href;
|
|
52
|
+
link.addEventListener('load', revealPrdPanelDom);
|
|
53
|
+
document.head.appendChild(link);
|
|
54
|
+
return link;
|
|
55
|
+
}
|
|
56
|
+
|
|
12
57
|
function getPrdPanelMaxWidth() {
|
|
13
58
|
return Math.floor(window.innerWidth * PRD_PANEL_MAX_RATIO);
|
|
14
59
|
}
|
|
@@ -85,18 +130,22 @@ function ensurePrdPanelStructure(prdPanel) {
|
|
|
85
130
|
function ensurePrdPanelDom() {
|
|
86
131
|
if (!document.body) return null;
|
|
87
132
|
|
|
133
|
+
ensurePrdPanelStyles();
|
|
134
|
+
|
|
88
135
|
var prdFloatBtn = document.getElementById('prdFloatBtn');
|
|
89
136
|
if (!prdFloatBtn) {
|
|
90
137
|
prdFloatBtn = document.createElement('div');
|
|
91
138
|
prdFloatBtn.id = 'prdFloatBtn';
|
|
92
139
|
prdFloatBtn.className = 'prd-float-btn';
|
|
93
140
|
prdFloatBtn.textContent = 'PRD';
|
|
141
|
+
hidePrdPanelUntilStylesReady(prdFloatBtn);
|
|
94
142
|
document.body.appendChild(prdFloatBtn);
|
|
95
143
|
}
|
|
96
144
|
|
|
97
145
|
var prdPanel = document.getElementById('prdPanel');
|
|
98
146
|
if (!prdPanel) {
|
|
99
147
|
prdPanel = document.createElement('div');
|
|
148
|
+
hidePrdPanelUntilStylesReady(prdPanel);
|
|
100
149
|
document.body.appendChild(prdPanel);
|
|
101
150
|
}
|
|
102
151
|
|
|
@@ -198,8 +247,9 @@ function initPrdPanel() {
|
|
|
198
247
|
if (prdEditMode) return;
|
|
199
248
|
|
|
200
249
|
var target = e.target;
|
|
201
|
-
var
|
|
202
|
-
var
|
|
250
|
+
var eventPath = typeof e.composedPath === 'function' ? e.composedPath() : [];
|
|
251
|
+
var isInsidePanel = eventPath.indexOf(prdPanel) !== -1 || target.closest('#prdPanel');
|
|
252
|
+
var isFloatBtn = eventPath.indexOf(prdFloatBtn) !== -1 || target.closest('.prd-float-btn');
|
|
203
253
|
|
|
204
254
|
if (!isInsidePanel && !isFloatBtn) {
|
|
205
255
|
prdPanel.classList.remove('open');
|
|
@@ -231,13 +281,18 @@ var prdCurrentPath = '';
|
|
|
231
281
|
var prdCurrentRawContent = '';
|
|
232
282
|
var prdWorkspaceTabs = [];
|
|
233
283
|
var prdEditMode = false;
|
|
284
|
+
var prdWorkspaceRootPath = '';
|
|
285
|
+
var prdOverviewMarkdown = '';
|
|
286
|
+
var prdOverviewBuildToken = 0;
|
|
287
|
+
var PRD_OVERVIEW_PATH = './__openprototype_current_version__.md';
|
|
234
288
|
|
|
235
289
|
function notifyNavigatorPrdContext() {
|
|
236
290
|
if (window.parent === window) return;
|
|
237
291
|
var targetOrigin = window.location.origin === 'null' ? '*' : window.location.origin;
|
|
238
292
|
var prdPath = '';
|
|
239
|
-
|
|
240
|
-
|
|
293
|
+
var contextPath = isPrdOverviewPath(prdCurrentPath) ? prdWorkspaceRootPath : prdCurrentPath;
|
|
294
|
+
if (contextPath) {
|
|
295
|
+
prdPath = decodeURIComponent(new URL(contextPath, window.location.href).pathname);
|
|
241
296
|
}
|
|
242
297
|
window.parent.postMessage({
|
|
243
298
|
type: 'pak-prd-context',
|
|
@@ -321,6 +376,188 @@ function getPrdDisplayName(filePath) {
|
|
|
321
376
|
return (filePath || '').split('/').pop().replace(/\.md(?:#.*)?$/i, '').replace(/_/g, ' ');
|
|
322
377
|
}
|
|
323
378
|
|
|
379
|
+
function getPrdOverviewVersion() {
|
|
380
|
+
if (typeof PRD_OVERVIEW_VERSION === 'undefined') return '';
|
|
381
|
+
return String(PRD_OVERVIEW_VERSION || '').trim();
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
function isPrdOverviewPath(filePath) {
|
|
385
|
+
return normalizePrdPath(filePath) === normalizePrdPath(PRD_OVERVIEW_PATH);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function escapePrdRegExp(text) {
|
|
389
|
+
return String(text || '').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function containsPrdVersion(text, version) {
|
|
393
|
+
var normalizedVersion = String(version || '').replace(/^v/i, '');
|
|
394
|
+
if (!normalizedVersion) return false;
|
|
395
|
+
var pattern = '(^|[^0-9.])v?' + escapePrdRegExp(normalizedVersion) + '(?=$|[^0-9.])';
|
|
396
|
+
return new RegExp(pattern, 'i').test(String(text || ''));
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function getPrdHeadingBefore(lines, index) {
|
|
400
|
+
for (var lineIndex = index - 1; lineIndex >= 0; lineIndex -= 1) {
|
|
401
|
+
var match = String(lines[lineIndex] || '').match(/^#{1,6}\s+(.+)$/);
|
|
402
|
+
if (match) return match[1].replace(/<[^>]+>/g, '').trim();
|
|
403
|
+
}
|
|
404
|
+
return '';
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function isPrdTableDivider(line) {
|
|
408
|
+
return /^\s*\|(?:\s*:?-{3,}:?\s*\|)+\s*$/.test(String(line || ''));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function collectPrdVersionSections(content, version) {
|
|
412
|
+
var lines = String(content || '').split(/\r?\n/);
|
|
413
|
+
var sections = [];
|
|
414
|
+
|
|
415
|
+
for (var index = 0; index < lines.length; index += 1) {
|
|
416
|
+
var line = lines[index];
|
|
417
|
+
if (/^\s*\|.*\|\s*$/.test(line)) {
|
|
418
|
+
var tableStart = index;
|
|
419
|
+
var tableLines = [];
|
|
420
|
+
while (index < lines.length && /^\s*\|.*\|\s*$/.test(lines[index])) {
|
|
421
|
+
tableLines.push(lines[index]);
|
|
422
|
+
index += 1;
|
|
423
|
+
}
|
|
424
|
+
index -= 1;
|
|
425
|
+
|
|
426
|
+
if (tableLines.length >= 3 && isPrdTableDivider(tableLines[1])) {
|
|
427
|
+
var matchedRows = tableLines.slice(2).filter(function(row) {
|
|
428
|
+
return containsPrdVersion(row, version);
|
|
429
|
+
});
|
|
430
|
+
if (matchedRows.length) {
|
|
431
|
+
sections.push({
|
|
432
|
+
heading: getPrdHeadingBefore(lines, tableStart),
|
|
433
|
+
markdown: [tableLines[0], tableLines[1]].concat(matchedRows).join('\n')
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
continue;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
var headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
|
|
441
|
+
if (headingMatch && containsPrdVersion(line, version)) {
|
|
442
|
+
var headingLevel = headingMatch[1].length;
|
|
443
|
+
var sectionLines = [line];
|
|
444
|
+
var nextIndex = index + 1;
|
|
445
|
+
while (nextIndex < lines.length) {
|
|
446
|
+
var nextHeading = lines[nextIndex].match(/^(#{1,6})\s+/);
|
|
447
|
+
if (nextHeading && nextHeading[1].length <= headingLevel) break;
|
|
448
|
+
sectionLines.push(lines[nextIndex]);
|
|
449
|
+
nextIndex += 1;
|
|
450
|
+
}
|
|
451
|
+
sections.push({ heading: '', markdown: sectionLines.join('\n').trim() });
|
|
452
|
+
index = nextIndex - 1;
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
if (containsPrdVersion(line, version)) {
|
|
457
|
+
sections.push({
|
|
458
|
+
heading: getPrdHeadingBefore(lines, index),
|
|
459
|
+
markdown: line
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return sections;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function buildPrdOverviewMarkdown(tabs, contents, version) {
|
|
468
|
+
var documentSections = [];
|
|
469
|
+
|
|
470
|
+
tabs.forEach(function(tab, index) {
|
|
471
|
+
var sections = collectPrdVersionSections(contents[index], version);
|
|
472
|
+
if (sections.length) documentSections.push({ tab: tab, sections: sections });
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
if (!documentSections.length) return '';
|
|
476
|
+
|
|
477
|
+
var markdown = [
|
|
478
|
+
'# ' + version + ' 更新总览',
|
|
479
|
+
'',
|
|
480
|
+
'> 自动汇总当前页面工作区内各 PRD 中标注为 ' + version + ' 的修订说明与详细规则。',
|
|
481
|
+
''
|
|
482
|
+
];
|
|
483
|
+
|
|
484
|
+
documentSections.forEach(function(documentItem) {
|
|
485
|
+
var tab = documentItem.tab;
|
|
486
|
+
var documentTitle = tab.title === '主文档' ? getPrdDisplayName(tab.path) : tab.title;
|
|
487
|
+
markdown.push('## ' + documentTitle, '', '来源:`' + tab.path.split('/').pop() + '`', '');
|
|
488
|
+
|
|
489
|
+
documentItem.sections.forEach(function(section) {
|
|
490
|
+
if (section.heading) markdown.push('### ' + section.heading, '');
|
|
491
|
+
markdown.push(section.markdown, '');
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
return markdown.join('\n').trim();
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
function renderPrdOverview() {
|
|
499
|
+
var version = getPrdOverviewVersion();
|
|
500
|
+
var contentEl = document.getElementById('prdPanelContent');
|
|
501
|
+
var titleEl = document.getElementById('prdPanelTitle');
|
|
502
|
+
var fileNameEl = document.getElementById('prdPanelFileName');
|
|
503
|
+
var editBtn = document.getElementById('prdPanelEditBtn');
|
|
504
|
+
if (!contentEl || !prdOverviewMarkdown) return;
|
|
505
|
+
|
|
506
|
+
prdCurrentFileName = version + ' 当前版本';
|
|
507
|
+
prdCurrentPath = PRD_OVERVIEW_PATH;
|
|
508
|
+
prdCurrentRawContent = prdOverviewMarkdown;
|
|
509
|
+
if (titleEl) titleEl.textContent = version + ' 更新总览 - PRD';
|
|
510
|
+
if (fileNameEl) fileNameEl.textContent = '';
|
|
511
|
+
if (editBtn) editBtn.style.display = 'none';
|
|
512
|
+
|
|
513
|
+
contentEl.innerHTML = renderMarkdownToHtml(prdOverviewMarkdown);
|
|
514
|
+
wrapPrdTables(contentEl);
|
|
515
|
+
renderPrdTabs(PRD_OVERVIEW_PATH);
|
|
516
|
+
bindPrdTabs();
|
|
517
|
+
notifyNavigatorPrdContext();
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
function preparePrdOverview(rootPath, options) {
|
|
521
|
+
options = options || {};
|
|
522
|
+
var version = getPrdOverviewVersion();
|
|
523
|
+
var realTabs = prdWorkspaceTabs.filter(function(tab) {
|
|
524
|
+
return !isPrdOverviewPath(tab.path);
|
|
525
|
+
});
|
|
526
|
+
var contentOverrides = options.contentOverrides || {};
|
|
527
|
+
var buildToken = ++prdOverviewBuildToken;
|
|
528
|
+
var normalizedRootPath = normalizePrdPath(rootPath);
|
|
529
|
+
|
|
530
|
+
if (!version || !realTabs.length) {
|
|
531
|
+
prdOverviewMarkdown = '';
|
|
532
|
+
prdWorkspaceTabs = realTabs;
|
|
533
|
+
return Promise.resolve('');
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return Promise.all(realTabs.map(function(tab) {
|
|
537
|
+
var normalizedPath = normalizePrdPath(tab.path);
|
|
538
|
+
if (Object.prototype.hasOwnProperty.call(contentOverrides, normalizedPath)) {
|
|
539
|
+
return Promise.resolve(contentOverrides[normalizedPath]);
|
|
540
|
+
}
|
|
541
|
+
return loadMarkdownFile(tab.path);
|
|
542
|
+
})).then(function(contents) {
|
|
543
|
+
if (buildToken !== prdOverviewBuildToken) return '';
|
|
544
|
+
|
|
545
|
+
prdOverviewMarkdown = buildPrdOverviewMarkdown(realTabs, contents, version);
|
|
546
|
+
prdWorkspaceTabs = prdOverviewMarkdown ? [{
|
|
547
|
+
title: '当前版本',
|
|
548
|
+
path: PRD_OVERVIEW_PATH
|
|
549
|
+
}].concat(realTabs) : realTabs;
|
|
550
|
+
|
|
551
|
+
if (prdOverviewMarkdown && options.activateWhenReady && normalizePrdPath(prdCurrentPath) === normalizedRootPath) {
|
|
552
|
+
renderPrdOverview();
|
|
553
|
+
} else {
|
|
554
|
+
renderPrdTabs(prdCurrentPath);
|
|
555
|
+
bindPrdTabs();
|
|
556
|
+
}
|
|
557
|
+
return prdOverviewMarkdown;
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
|
|
324
561
|
function normalizePrdPath(filePath) {
|
|
325
562
|
var path = decodeURIComponent(String(filePath || '')).split('#')[0].split('?')[0];
|
|
326
563
|
var hasDotPrefix = path.indexOf('./') === 0;
|
|
@@ -476,12 +713,22 @@ function renderLoadedPrd(result, options) {
|
|
|
476
713
|
var currentPath = normalizePrdPath(result.path || result.fileName);
|
|
477
714
|
setPrdHeader(currentPath, options && options.title);
|
|
478
715
|
prdCurrentRawContent = result.content;
|
|
716
|
+
var editBtn = document.getElementById('prdPanelEditBtn');
|
|
717
|
+
if (editBtn && !prdEditMode) editBtn.style.display = '';
|
|
479
718
|
prdContentEl.innerHTML = renderMarkdownToHtml(result.content);
|
|
480
719
|
wrapPrdTables(prdContentEl);
|
|
481
720
|
|
|
482
721
|
if (options && options.resetWorkspace) {
|
|
483
722
|
var configuredTabs = buildWorkspaceTabsFromConfig(options.workspaceConfig, currentPath);
|
|
484
723
|
prdWorkspaceTabs = configuredTabs.length ? configuredTabs : buildWorkspaceTabsFromContent(prdContentEl, currentPath);
|
|
724
|
+
prdWorkspaceRootPath = currentPath;
|
|
725
|
+
prdOverviewMarkdown = '';
|
|
726
|
+
var contentOverrides = {};
|
|
727
|
+
contentOverrides[currentPath] = result.content;
|
|
728
|
+
preparePrdOverview(currentPath, {
|
|
729
|
+
activateWhenReady: true,
|
|
730
|
+
contentOverrides: contentOverrides
|
|
731
|
+
});
|
|
485
732
|
} else if (options && options.title) {
|
|
486
733
|
var targetPath = normalizePrdPath(currentPath);
|
|
487
734
|
var exists = prdWorkspaceTabs.some(function(tab) {
|
|
@@ -506,6 +753,11 @@ function openPrdPath(filePath, options) {
|
|
|
506
753
|
var normalizedPath = normalizePrdPath(filePath);
|
|
507
754
|
if (!prdContentEl || !normalizedPath) return Promise.resolve(null);
|
|
508
755
|
|
|
756
|
+
if (isPrdOverviewPath(normalizedPath)) {
|
|
757
|
+
renderPrdOverview();
|
|
758
|
+
return Promise.resolve({ path: PRD_OVERVIEW_PATH, content: prdOverviewMarkdown });
|
|
759
|
+
}
|
|
760
|
+
|
|
509
761
|
prdContentEl.innerHTML = '<div style="padding:20px;text-align:center;color:var(--text-secondary);">加载中...</div>';
|
|
510
762
|
|
|
511
763
|
return loadMarkdownFile(normalizedPath).then(function(content) {
|
|
@@ -539,6 +791,9 @@ function updatePrdContent() {
|
|
|
539
791
|
var prdFileCandidates = getPrdFileCandidates(currentPage, mode);
|
|
540
792
|
var prdFileName = prdFileCandidates[0];
|
|
541
793
|
var workspaceConfig = getPrdWorkspaceConfig(currentPage);
|
|
794
|
+
prdOverviewBuildToken += 1;
|
|
795
|
+
prdWorkspaceRootPath = '';
|
|
796
|
+
prdOverviewMarkdown = '';
|
|
542
797
|
|
|
543
798
|
if (!prdFileName) {
|
|
544
799
|
prdContentEl.innerHTML = '<div class="error" style="padding:20px;color:var(--text-secondary);">当前页面暂无对应的PRD文档</div>';
|
|
@@ -602,6 +857,10 @@ function showPrdEditorMsg(text, isError) {
|
|
|
602
857
|
}
|
|
603
858
|
|
|
604
859
|
function enterPrdEditMode() {
|
|
860
|
+
if (isPrdOverviewPath(prdCurrentPath)) {
|
|
861
|
+
showPrdToast('“当前版本”由关联 PRD 自动汇总,请在原文页签中编辑', true);
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
605
864
|
if (isLocalFileProtocol()) {
|
|
606
865
|
showPrdToast('请通过本地服务器(npm run serve)打开原型后再编辑', true);
|
|
607
866
|
return;
|
|
@@ -659,7 +918,7 @@ function applyPrdRedColor() {
|
|
|
659
918
|
|
|
660
919
|
function wrapPrdSelectionWithRed(text) {
|
|
661
920
|
if (!isPrdMarkdownTableSelection(text)) {
|
|
662
|
-
return '<span style="color
|
|
921
|
+
return '<span style="color:red">' + text + '</span>';
|
|
663
922
|
}
|
|
664
923
|
|
|
665
924
|
return text.split('\n').map(function(line) {
|
|
@@ -697,7 +956,7 @@ function wrapPrdMarkdownTableRowCells(line) {
|
|
|
697
956
|
if (!content || /<span\b[^>]*\bstyle\s*=\s*["'][^"']*\bcolor\s*:\s*(?:#e53935|red)\b[^"']*["'][^>]*>[\s\S]*<\/span>/i.test(content)) {
|
|
698
957
|
return cell;
|
|
699
958
|
}
|
|
700
|
-
return left + '<span style="color
|
|
959
|
+
return left + '<span style="color:red">' + content + '</span>' + right;
|
|
701
960
|
}).join('|') + '|' + trailing;
|
|
702
961
|
}
|
|
703
962
|
|
|
@@ -811,8 +1070,15 @@ function savePrdEdits() {
|
|
|
811
1070
|
wrapPrdTables(contentEl);
|
|
812
1071
|
bindPrdContentLinks(contentEl);
|
|
813
1072
|
exitPrdEditMode();
|
|
814
|
-
|
|
815
|
-
|
|
1073
|
+
var contentOverrides = {};
|
|
1074
|
+
contentOverrides[normalizePrdPath(prdCurrentPath)] = newContent;
|
|
1075
|
+
return preparePrdOverview(prdWorkspaceRootPath || prdCurrentPath, {
|
|
1076
|
+
activateWhenReady: false,
|
|
1077
|
+
contentOverrides: contentOverrides
|
|
1078
|
+
}).then(function() {
|
|
1079
|
+
showPrdToast('已保存', false);
|
|
1080
|
+
return true;
|
|
1081
|
+
});
|
|
816
1082
|
}).catch(function(err) {
|
|
817
1083
|
showPrdEditorMsg('保存失败:' + err.message, true);
|
|
818
1084
|
throw err;
|
package/templates/gitignore
CHANGED
|
@@ -548,6 +548,7 @@ function saveVersionHistory() {
|
|
|
548
548
|
let reviewStatus = loadReviewStatus();
|
|
549
549
|
let versionHistory = loadVersionHistory();
|
|
550
550
|
let activeRow = null;
|
|
551
|
+
let previewLoadRequest = 0;
|
|
551
552
|
|
|
552
553
|
// ─────────────────────────────────────────────
|
|
553
554
|
// Sidebar resize
|
|
@@ -713,6 +714,18 @@ function loadPreview(path, row) {
|
|
|
713
714
|
const openBtn = document.getElementById('previewOpenBtn');
|
|
714
715
|
|
|
715
716
|
const url = path;
|
|
717
|
+
const requestId = ++previewLoadRequest;
|
|
718
|
+
const expectedUrl = new URL(url, window.location.href).href;
|
|
719
|
+
frame.style.visibility = 'hidden';
|
|
720
|
+
frame.addEventListener('load', function revealLoadedPreview() {
|
|
721
|
+
if (requestId !== previewLoadRequest) {
|
|
722
|
+
frame.removeEventListener('load', revealLoadedPreview);
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
if (frame.contentWindow.location.href !== expectedUrl) return;
|
|
726
|
+
frame.style.visibility = 'visible';
|
|
727
|
+
frame.removeEventListener('load', revealLoadedPreview);
|
|
728
|
+
});
|
|
716
729
|
frame.src = url;
|
|
717
730
|
frame.style.display = 'block';
|
|
718
731
|
placeholder.style.display = 'none';
|