ts-glitter 13.5.5 → 13.5.7
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/lowcode/Entry.js +1 -4
- package/lowcode/Entry.ts +6 -4
- package/lowcode/jspage/editor.js +131 -133
- package/lowcode/jspage/editor.ts +135 -137
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -59,7 +59,7 @@ export class Entry {
|
|
|
59
59
|
}
|
|
60
60
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
61
61
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
62
|
-
glitter.share.editerVersion = "V_13.5.
|
|
62
|
+
glitter.share.editerVersion = "V_13.5.7";
|
|
63
63
|
glitter.share.start = (new Date());
|
|
64
64
|
const vm = {
|
|
65
65
|
appConfig: [],
|
|
@@ -250,9 +250,6 @@ export class Entry {
|
|
|
250
250
|
appName: config.appName,
|
|
251
251
|
tag: glitter.getUrlParameter('page'),
|
|
252
252
|
});
|
|
253
|
-
if (data.response.result.length === 0) {
|
|
254
|
-
glitter.setUrlParameter('page', data.response.redirect);
|
|
255
|
-
}
|
|
256
253
|
glitter.setHome('jspage/main.js', glitter.getUrlParameter('page'), {
|
|
257
254
|
appName: config.appName,
|
|
258
255
|
}, {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -58,7 +58,7 @@ export class Entry {
|
|
|
58
58
|
}
|
|
59
59
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
60
60
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
61
|
-
glitter.share.editerVersion = "V_13.5.
|
|
61
|
+
glitter.share.editerVersion = "V_13.5.7";
|
|
62
62
|
glitter.share.start = (new Date());
|
|
63
63
|
const vm: {
|
|
64
64
|
appConfig: any;
|
|
@@ -264,9 +264,11 @@ export class Entry {
|
|
|
264
264
|
appName: config.appName,
|
|
265
265
|
tag: glitter.getUrlParameter('page'),
|
|
266
266
|
});
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
// console.log(`data===>`,data)
|
|
268
|
+
// if (data.response.result.length === 0) {
|
|
269
|
+
// glitter.setUrlParameter('page', data.response.redirect);
|
|
270
|
+
// }
|
|
271
|
+
|
|
270
272
|
glitter.setHome(
|
|
271
273
|
'jspage/main.js',
|
|
272
274
|
glitter.getUrlParameter('page'),
|
package/lowcode/jspage/editor.js
CHANGED
|
@@ -337,14 +337,10 @@ color: transparent;"
|
|
|
337
337
|
<i class="fa-regular fa-gear"></i>
|
|
338
338
|
</div>
|
|
339
339
|
${(() => {
|
|
340
|
-
if (
|
|
341
|
-
return
|
|
342
|
-
<div class="btn btn-outline-secondary rounded px-3">
|
|
343
|
-
${glitter.share.editor_vm.title}
|
|
344
|
-
</div>`;
|
|
340
|
+
if (Storage.select_function === 'backend-manger') {
|
|
341
|
+
return ``;
|
|
345
342
|
}
|
|
346
|
-
|
|
347
|
-
return html `
|
|
343
|
+
return html `
|
|
348
344
|
<div
|
|
349
345
|
class="btn-group "
|
|
350
346
|
style="${(document.body.clientWidth < 768) ? `` : `max-width:350px;min-width:200px;`}
|
|
@@ -352,41 +348,41 @@ color: transparent;"
|
|
|
352
348
|
"
|
|
353
349
|
>
|
|
354
350
|
${(document.body.clientWidth < 800) ? gvc.bindView(() => {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
351
|
+
return {
|
|
352
|
+
bind: 'top_sm_bar',
|
|
353
|
+
view: () => {
|
|
354
|
+
return ` ${[
|
|
355
|
+
{
|
|
356
|
+
src: `fa-duotone fa-window guide-user-editor-1-icon`,
|
|
357
|
+
index: 'layout',
|
|
358
|
+
hint: '頁面編輯',
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
362
|
+
index: 'color',
|
|
363
|
+
hint: '全站樣式'
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
367
|
+
index: 'widget',
|
|
368
|
+
hint: '設計元件'
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
src: `fa-regular fa-eye`,
|
|
372
|
+
index: 'preview',
|
|
373
|
+
hint: '預覽頁面'
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
.filter((dd) => {
|
|
377
|
+
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
|
378
|
+
return dd.index !== 'widget';
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
.map((da) => {
|
|
385
|
+
return html `<i
|
|
390
386
|
class=" ${da.src} fs-5 fw-bold p-2 rounded"
|
|
391
387
|
data-bs-toggle="tooltip"
|
|
392
388
|
data-bs-placement="top"
|
|
@@ -396,115 +392,117 @@ color: transparent;"
|
|
|
396
392
|
${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.editor_layout.btn_background};color:white;` : ``}
|
|
397
393
|
"
|
|
398
394
|
onclick="${gvc.event(() => {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
gvc.notifyDataChange(["MainEditorLeft", "top_sm_bar"]);
|
|
395
|
+
if (da.index === 'preview') {
|
|
396
|
+
preView();
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
gvc.glitter.share.editorViewModel.waitCopy = undefined;
|
|
400
|
+
gvc.glitter.share.editorViewModel.selectItem = undefined;
|
|
401
|
+
Storage.page_setting_item = da.index;
|
|
402
|
+
if (document.body.clientWidth < 800) {
|
|
403
|
+
glitter.openDrawer();
|
|
410
404
|
}
|
|
411
|
-
|
|
405
|
+
gvc.notifyDataChange(["MainEditorLeft", "top_sm_bar"]);
|
|
406
|
+
}
|
|
407
|
+
})}"
|
|
412
408
|
></i>`;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
409
|
+
})
|
|
410
|
+
.join('')}`;
|
|
411
|
+
},
|
|
412
|
+
divCreate: {
|
|
413
|
+
style: `gap:5px;height:50px;`,
|
|
414
|
+
class: `${Storage.select_function === 'user-editor' || Storage.select_function === 'page-editor' ? `` : `d-none`} d-flex align-items-center justify-content-center`,
|
|
415
|
+
},
|
|
416
|
+
onCreate: () => {
|
|
417
|
+
$('.tooltip').remove();
|
|
418
|
+
$('[data-bs-toggle="tooltip"]').tooltip();
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
}) : ` <button
|
|
426
422
|
type="button"
|
|
427
423
|
class="btn btn-outline-secondary rounded px-2 "
|
|
428
424
|
onclick="${gvc.event(() => {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
425
|
+
if (gvc.glitter.getUrlParameter('device') !== 'mobile') {
|
|
426
|
+
$('#topd').toggle();
|
|
427
|
+
}
|
|
428
|
+
})}"
|
|
433
429
|
>
|
|
434
430
|
<span style="max-width: 180px;overflow: hidden;text-overflow: ellipsis;">${data.data.name}</span>
|
|
435
431
|
<i class="fa-sharp fa-solid fa-caret-down position-absolute translate-middle-y ${(gvc.glitter.getUrlParameter('device') === 'mobile') ? `d-none` : ``}"
|
|
436
432
|
style="top: 50%;right: 20px;"></i>
|
|
437
433
|
</button>`}
|
|
438
434
|
${gvc.bindView(() => {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
435
|
+
const id = gvc.glitter.getUUID();
|
|
436
|
+
return {
|
|
437
|
+
bind: id,
|
|
438
|
+
view: () => {
|
|
439
|
+
if (Storage.select_function !== 'page-editor') {
|
|
440
|
+
return ``;
|
|
441
|
+
}
|
|
442
|
+
return html `
|
|
443
|
+
<div class="px-2">
|
|
445
444
|
${EditorElem.select({
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
445
|
+
title: '',
|
|
446
|
+
gvc: gvc,
|
|
447
|
+
def: Storage.select_page_type || 'page',
|
|
448
|
+
array: EditorConfig.page_type_list,
|
|
449
|
+
callback: (text) => {
|
|
450
|
+
Storage.select_page_type = text;
|
|
451
|
+
gvc.notifyDataChange(id);
|
|
452
|
+
setTimeout(() => {
|
|
453
|
+
$('#topd').toggle();
|
|
454
|
+
});
|
|
455
|
+
},
|
|
456
|
+
})}
|
|
458
457
|
</div>
|
|
459
458
|
<div class="w-100 border-bottom mt-2 ${Storage.select_function === 'user-editor' ? `d-none` : ``}"></div>
|
|
460
459
|
<ul class="list-group list-group-flush mt-2">
|
|
461
460
|
${(() => {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
461
|
+
return gvc.bindView(() => {
|
|
462
|
+
const id = glitter.getUUID();
|
|
463
|
+
return {
|
|
464
|
+
bind: id,
|
|
465
|
+
view: () => {
|
|
466
|
+
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
467
|
+
PageEditor.pageSelctor(gvc, (d3) => {
|
|
468
|
+
glitter.share.clearSelectItem();
|
|
469
|
+
data.data = d3;
|
|
470
|
+
glitter.setUrlParameter('page', d3.tag);
|
|
471
|
+
glitter.share.reloadEditor();
|
|
472
|
+
}, {
|
|
473
|
+
filter: (data) => {
|
|
474
|
+
if (Storage.select_function === 'user-editor') {
|
|
475
|
+
return data.page_config && data.page_config.support_editor === 'true';
|
|
476
|
+
}
|
|
477
|
+
else {
|
|
478
|
+
return data.page_type == Storage.select_page_type;
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
}).then((data) => {
|
|
482
|
+
resolve(data.left);
|
|
483
|
+
});
|
|
484
|
+
}));
|
|
485
|
+
},
|
|
486
|
+
divCreate: {
|
|
487
|
+
class: `ms-n2 mt-n2`,
|
|
488
|
+
},
|
|
489
|
+
};
|
|
490
|
+
});
|
|
491
|
+
})()}
|
|
493
492
|
</ul>`;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
493
|
+
},
|
|
494
|
+
divCreate: {
|
|
495
|
+
class: 'dropdown-menu',
|
|
496
|
+
style: `margin-top: 50px;max-height: calc(100vh - 100px);width:${document.body.clientWidth < 768 ? 200 : 260}px;overflow-y: scroll;`,
|
|
497
|
+
option: [{ key: 'id', value: 'topd' }],
|
|
498
|
+
},
|
|
499
|
+
onCreate: () => {
|
|
500
|
+
$('.tooltip').remove();
|
|
501
|
+
$('[data-bs-toggle="tooltip"]').tooltip();
|
|
502
|
+
},
|
|
503
|
+
};
|
|
504
|
+
})}
|
|
506
505
|
</div>`;
|
|
507
|
-
}
|
|
508
506
|
})()}
|
|
509
507
|
|
|
510
508
|
<div
|
package/lowcode/jspage/editor.ts
CHANGED
|
@@ -336,14 +336,10 @@ color: transparent;"
|
|
|
336
336
|
<i class="fa-regular fa-gear"></i>
|
|
337
337
|
</div>
|
|
338
338
|
${(() => {
|
|
339
|
-
if
|
|
340
|
-
return
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
</div>`;
|
|
344
|
-
} else {
|
|
345
|
-
|
|
346
|
-
return html`
|
|
339
|
+
if(Storage.select_function === 'backend-manger'){
|
|
340
|
+
return ``
|
|
341
|
+
}
|
|
342
|
+
return html`
|
|
347
343
|
<div
|
|
348
344
|
class="btn-group "
|
|
349
345
|
style="${(document.body.clientWidth < 768) ? ``:`max-width:350px;min-width:200px;`}
|
|
@@ -351,40 +347,40 @@ color: transparent;"
|
|
|
351
347
|
"
|
|
352
348
|
>
|
|
353
349
|
${(document.body.clientWidth<800) ? gvc.bindView(() => {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
350
|
+
return {
|
|
351
|
+
bind: 'top_sm_bar',
|
|
352
|
+
view: () => {
|
|
353
|
+
return ` ${[
|
|
354
|
+
{
|
|
355
|
+
src: `fa-duotone fa-window guide-user-editor-1-icon`,
|
|
356
|
+
index: 'layout',
|
|
357
|
+
hint: '頁面編輯',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
src: `fa-sharp fa-regular fa-globe guide-user-editor-11-icon`,
|
|
361
|
+
index: 'color',
|
|
362
|
+
hint: '全站樣式'
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
src: `fa-regular fa-grid-2 design-guide-1-icon`,
|
|
366
|
+
index: 'widget',
|
|
367
|
+
hint: '設計元件'
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
src: `fa-regular fa-eye`,
|
|
371
|
+
index: 'preview',
|
|
372
|
+
hint: '預覽頁面'
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
.filter((dd) => {
|
|
376
|
+
if (gvc.glitter.getUrlParameter('device') === 'mobile') {
|
|
377
|
+
return dd.index !== 'widget'
|
|
378
|
+
} else {
|
|
379
|
+
return true
|
|
380
|
+
}
|
|
381
|
+
})
|
|
382
|
+
.map((da: any) => {
|
|
383
|
+
return html`<i
|
|
388
384
|
class=" ${da.src} fs-5 fw-bold p-2 rounded"
|
|
389
385
|
data-bs-toggle="tooltip"
|
|
390
386
|
data-bs-placement="top"
|
|
@@ -394,119 +390,121 @@ color: transparent;"
|
|
|
394
390
|
${Storage.page_setting_item === `${da.index}` ? `background:${EditorConfig.editor_layout.btn_background};color:white;` : ``}
|
|
395
391
|
"
|
|
396
392
|
onclick="${gvc.event(() => {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
393
|
+
if(da.index==='preview'){
|
|
394
|
+
preView()
|
|
395
|
+
}else{
|
|
396
|
+
gvc.glitter.share.editorViewModel.waitCopy = undefined;
|
|
397
|
+
gvc.glitter.share.editorViewModel.selectItem = undefined;
|
|
398
|
+
Storage.page_setting_item = da.index;
|
|
399
|
+
if(document.body.clientWidth<800){
|
|
400
|
+
glitter.openDrawer()
|
|
401
|
+
}
|
|
402
|
+
gvc.notifyDataChange(["MainEditorLeft", "top_sm_bar"]);
|
|
403
|
+
}
|
|
404
|
+
})}"
|
|
409
405
|
></i>`;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
406
|
+
})
|
|
407
|
+
.join('')}`;
|
|
408
|
+
},
|
|
409
|
+
divCreate: {
|
|
410
|
+
style: `gap:5px;height:50px;`,
|
|
411
|
+
class: `${
|
|
412
|
+
Storage.select_function === 'user-editor' || Storage.select_function === 'page-editor' ? `` : `d-none`
|
|
413
|
+
} d-flex align-items-center justify-content-center`,
|
|
414
|
+
},
|
|
415
|
+
onCreate: () => {
|
|
416
|
+
$('.tooltip').remove();
|
|
417
|
+
($('[data-bs-toggle="tooltip"]') as any).tooltip();
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
}):` <button
|
|
425
421
|
type="button"
|
|
426
422
|
class="btn btn-outline-secondary rounded px-2 "
|
|
427
423
|
onclick="${gvc.event(() => {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
424
|
+
if (gvc.glitter.getUrlParameter('device') !== 'mobile') {
|
|
425
|
+
$('#topd').toggle();
|
|
426
|
+
}
|
|
427
|
+
})}"
|
|
432
428
|
>
|
|
433
429
|
<span style="max-width: 180px;overflow: hidden;text-overflow: ellipsis;">${data.data.name}</span>
|
|
434
430
|
<i class="fa-sharp fa-solid fa-caret-down position-absolute translate-middle-y ${(gvc.glitter.getUrlParameter('device') === 'mobile') ? `d-none` : ``}"
|
|
435
431
|
style="top: 50%;right: 20px;"></i>
|
|
436
432
|
</button>`}
|
|
437
433
|
${gvc.bindView(() => {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
434
|
+
const id = gvc.glitter.getUUID();
|
|
435
|
+
return {
|
|
436
|
+
bind: id,
|
|
437
|
+
view: () => {
|
|
438
|
+
if(Storage.select_function !== 'page-editor' ){
|
|
439
|
+
return ``
|
|
440
|
+
}
|
|
441
|
+
return html`
|
|
442
|
+
<div class="px-2">
|
|
444
443
|
${EditorElem.select({
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
444
|
+
title: '',
|
|
445
|
+
gvc: gvc,
|
|
446
|
+
def: Storage.select_page_type || 'page',
|
|
447
|
+
array: EditorConfig.page_type_list,
|
|
448
|
+
callback: (text: string) => {
|
|
449
|
+
Storage.select_page_type = text as any;
|
|
450
|
+
gvc.notifyDataChange(id);
|
|
451
|
+
setTimeout(() => {
|
|
452
|
+
$('#topd').toggle();
|
|
453
|
+
});
|
|
454
|
+
},
|
|
455
|
+
})}
|
|
457
456
|
</div>
|
|
458
457
|
<div class="w-100 border-bottom mt-2 ${Storage.select_function === 'user-editor' ? `d-none` : ``}"></div>
|
|
459
458
|
<ul class="list-group list-group-flush mt-2">
|
|
460
459
|
${(() => {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
},
|
|
483
|
-
}
|
|
484
|
-
).then((data) => {
|
|
485
|
-
resolve(data.left);
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
},
|
|
489
|
-
divCreate: {
|
|
490
|
-
class: `ms-n2 mt-n2`,
|
|
460
|
+
return gvc.bindView(() => {
|
|
461
|
+
const id = glitter.getUUID();
|
|
462
|
+
return {
|
|
463
|
+
bind: id,
|
|
464
|
+
view: () => {
|
|
465
|
+
return new Promise(async (resolve, reject) => {
|
|
466
|
+
PageEditor.pageSelctor(
|
|
467
|
+
gvc,
|
|
468
|
+
(d3: any) => {
|
|
469
|
+
glitter.share.clearSelectItem();
|
|
470
|
+
data.data = d3;
|
|
471
|
+
glitter.setUrlParameter('page', d3.tag);
|
|
472
|
+
glitter.share.reloadEditor();
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
filter: (data) => {
|
|
476
|
+
if (Storage.select_function === 'user-editor') {
|
|
477
|
+
return data.page_config && data.page_config.support_editor === 'true';
|
|
478
|
+
} else {
|
|
479
|
+
return data.page_type == Storage.select_page_type;
|
|
480
|
+
}
|
|
491
481
|
},
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
|
|
482
|
+
}
|
|
483
|
+
).then((data) => {
|
|
484
|
+
resolve(data.left);
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
},
|
|
488
|
+
divCreate: {
|
|
489
|
+
class: `ms-n2 mt-n2`,
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
});
|
|
493
|
+
})()}
|
|
495
494
|
</ul>`;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
495
|
+
},
|
|
496
|
+
divCreate: {
|
|
497
|
+
class: 'dropdown-menu',
|
|
498
|
+
style: `margin-top: 50px;max-height: calc(100vh - 100px);width:${document.body.clientWidth < 768 ? 200 : 260}px;overflow-y: scroll;`,
|
|
499
|
+
option: [{key: 'id', value: 'topd'}],
|
|
500
|
+
},
|
|
501
|
+
onCreate: () => {
|
|
502
|
+
$('.tooltip')!.remove();
|
|
503
|
+
($('[data-bs-toggle="tooltip"]') as any).tooltip();
|
|
504
|
+
},
|
|
505
|
+
};
|
|
506
|
+
})}
|
|
508
507
|
</div>`;
|
|
509
|
-
}
|
|
510
508
|
})()}
|
|
511
509
|
|
|
512
510
|
<div
|