@tmagic/editor 1.2.14 → 1.2.15
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/dist/style.css +141 -80
- package/dist/tmagic-editor.js +32 -43
- package/dist/tmagic-editor.js.map +1 -1
- package/dist/tmagic-editor.umd.cjs +30 -41
- package/dist/tmagic-editor.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/components/SearchInput.vue +6 -3
- package/src/icons/AppManageIcon.vue +1 -1
- package/src/icons/CodeIcon.vue +1 -10
- package/src/layouts/sidebar/Sidebar.vue +10 -9
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +4 -4
- package/src/services/props.ts +2 -15
- package/src/theme/code-block.scss +4 -66
- package/src/theme/dep-list.scss +59 -0
- package/src/theme/sidebar.scss +26 -6
- package/src/theme/theme.scss +1 -0
- package/types/services/props.d.ts +15 -9
package/dist/style.css
CHANGED
|
@@ -188,28 +188,46 @@
|
|
|
188
188
|
border-color: #2882e0;
|
|
189
189
|
color: #2882e0;
|
|
190
190
|
}
|
|
191
|
-
.m-editor-sidebar {
|
|
191
|
+
.m-editor-sidebar.tmagic-design-tabs {
|
|
192
192
|
height: 100%;
|
|
193
193
|
}
|
|
194
|
-
.m-editor-sidebar.
|
|
194
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header,
|
|
195
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header {
|
|
195
196
|
background: #2882e0;
|
|
196
197
|
border: 0;
|
|
198
|
+
height: 100%;
|
|
199
|
+
}
|
|
200
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav--card,
|
|
201
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav--card {
|
|
202
|
+
background-color: transparent;
|
|
197
203
|
}
|
|
198
|
-
.m-editor-sidebar.
|
|
204
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav--card.t-tabs__nav-item:not(.t-is-disabled):not(.t-is-active):hover,
|
|
205
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav--card.t-tabs__nav-item:not(.t-is-disabled):not(.t-is-active):hover {
|
|
206
|
+
background-color: transparent;
|
|
207
|
+
}
|
|
208
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header.is-left, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header.t-is-left,
|
|
209
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header.is-left,
|
|
210
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header.t-is-left {
|
|
199
211
|
width: 40px;
|
|
200
212
|
margin-right: 0;
|
|
201
213
|
}
|
|
202
|
-
.m-editor-sidebar.
|
|
214
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__nav-wrap,
|
|
215
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__nav-wrap {
|
|
203
216
|
margin: 0;
|
|
204
217
|
}
|
|
205
|
-
.m-editor-sidebar.
|
|
218
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__nav,
|
|
219
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__nav {
|
|
206
220
|
border: 0;
|
|
207
221
|
border-radius: 0;
|
|
208
222
|
}
|
|
209
|
-
.m-editor-sidebar.
|
|
223
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .tab-label,
|
|
224
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .tab-label {
|
|
210
225
|
margin-left: 2px;
|
|
211
226
|
}
|
|
212
|
-
.m-editor-sidebar.
|
|
227
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left,
|
|
228
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item,
|
|
229
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left,
|
|
230
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item {
|
|
213
231
|
line-height: 15px;
|
|
214
232
|
border: 0;
|
|
215
233
|
height: auto;
|
|
@@ -217,37 +235,86 @@
|
|
|
217
235
|
color: white;
|
|
218
236
|
box-sizing: border-box;
|
|
219
237
|
}
|
|
220
|
-
.m-editor-sidebar.el-tabs
|
|
238
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.is-active, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.t-is-active, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.is-active, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active,
|
|
239
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.is-active,
|
|
240
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.t-is-active,
|
|
241
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.is-active,
|
|
242
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.t-is-active,
|
|
243
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.is-active,
|
|
244
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.t-is-active,
|
|
245
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.is-active,
|
|
246
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active,
|
|
247
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.is-active,
|
|
248
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.t-is-active,
|
|
249
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.is-active,
|
|
250
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.t-is-active {
|
|
221
251
|
background: #ffffff;
|
|
222
252
|
border: 0;
|
|
223
253
|
}
|
|
224
|
-
.m-editor-sidebar.el-tabs
|
|
254
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.is-active i, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.t-is-active i, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.is-active i, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active i,
|
|
255
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.is-active i,
|
|
256
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.t-is-active i,
|
|
257
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.is-active i,
|
|
258
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.t-is-active i,
|
|
259
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.is-active i,
|
|
260
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.t-is-active i,
|
|
261
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.is-active i,
|
|
262
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active i,
|
|
263
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.is-active i,
|
|
264
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.t-is-active i,
|
|
265
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.is-active i,
|
|
266
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.t-is-active i {
|
|
225
267
|
color: #353140;
|
|
226
268
|
}
|
|
227
|
-
.m-editor-sidebar.el-tabs
|
|
269
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left.t-is-active .magic-editor-tab-panel-title, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.is-active .magic-editor-tab-panel-title, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active .magic-editor-tab-panel-title,
|
|
270
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.is-active .magic-editor-tab-panel-title,
|
|
271
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left.t-is-active .magic-editor-tab-panel-title,
|
|
272
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.is-active .magic-editor-tab-panel-title,
|
|
273
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left.t-is-active .magic-editor-tab-panel-title,
|
|
274
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.is-active .magic-editor-tab-panel-title,
|
|
275
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left.t-is-active .magic-editor-tab-panel-title,
|
|
276
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.is-active .magic-editor-tab-panel-title,
|
|
277
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left.t-is-active .magic-editor-tab-panel-title,
|
|
278
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.is-active .magic-editor-tab-panel-title,
|
|
279
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left.t-is-active .magic-editor-tab-panel-title,
|
|
280
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.is-active .magic-editor-tab-panel-title,
|
|
281
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left.t-is-active .magic-editor-tab-panel-title {
|
|
228
282
|
color: #353140;
|
|
229
283
|
}
|
|
230
|
-
.m-editor-sidebar.el-
|
|
284
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.is-left:first-child, .m-editor-sidebar.tmagic-design-tabs .el-tabs__header .el-tabs__item.is-left.t-is-left:first-child,
|
|
285
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.is-left:first-child,
|
|
286
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item.t-is-left:first-child,
|
|
287
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.is-left:first-child,
|
|
288
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .el-tabs__item.is-left.t-is-left:first-child,
|
|
289
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.is-left:first-child,
|
|
290
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item.t-is-left:first-child {
|
|
231
291
|
border-right: 0;
|
|
232
292
|
}
|
|
233
|
-
.m-editor-sidebar.
|
|
293
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .t-tabs__nav-item,
|
|
294
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .t-tabs__nav-item {
|
|
295
|
+
padding: 7px;
|
|
296
|
+
}
|
|
297
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header i,
|
|
298
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header i {
|
|
234
299
|
font-size: 25px;
|
|
235
300
|
color: rgba(255, 255, 255, 0.6);
|
|
236
301
|
}
|
|
237
|
-
.m-editor-sidebar.
|
|
302
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header i:hover,
|
|
303
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header i:hover {
|
|
238
304
|
color: white;
|
|
239
305
|
}
|
|
240
|
-
.m-editor-sidebar.
|
|
306
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__header .magic-editor-tab-panel-title,
|
|
307
|
+
.m-editor-sidebar.tmagic-design-tabs .t-tabs__header .magic-editor-tab-panel-title {
|
|
241
308
|
font-size: 12px;
|
|
242
309
|
white-space: normal;
|
|
243
310
|
}
|
|
244
|
-
.m-editor-sidebar .el-scrollbar {
|
|
311
|
+
.m-editor-sidebar.tmagic-design-tabs .el-scrollbar {
|
|
245
312
|
height: 100%;
|
|
246
313
|
}
|
|
247
|
-
.m-editor-sidebar .el-tree {
|
|
314
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tree {
|
|
248
315
|
min-height: 100%;
|
|
249
316
|
}
|
|
250
|
-
.m-editor-sidebar .fold-icon {
|
|
317
|
+
.m-editor-sidebar.tmagic-design-tabs .fold-icon {
|
|
251
318
|
position: absolute;
|
|
252
319
|
bottom: 8px;
|
|
253
320
|
left: 0px;
|
|
@@ -258,11 +325,11 @@
|
|
|
258
325
|
opacity: 0.8;
|
|
259
326
|
cursor: pointer;
|
|
260
327
|
}
|
|
261
|
-
.m-editor-sidebar .fold-icon:hover {
|
|
328
|
+
.m-editor-sidebar.tmagic-design-tabs .fold-icon:hover {
|
|
262
329
|
background: rgba(0, 0, 0, 0.2);
|
|
263
330
|
}
|
|
264
|
-
.m-editor-sidebar .el-tabs__content,
|
|
265
|
-
.m-editor-sidebar .el-tab-pane {
|
|
331
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tabs__content,
|
|
332
|
+
.m-editor-sidebar.tmagic-design-tabs .el-tab-pane {
|
|
266
333
|
height: 100%;
|
|
267
334
|
}
|
|
268
335
|
.magic-editor-layer-panel {
|
|
@@ -618,72 +685,16 @@
|
|
|
618
685
|
.m-editor-code-block-list {
|
|
619
686
|
height: 100%;
|
|
620
687
|
}
|
|
621
|
-
.m-editor-code-block-list .magic-editor-layer-tree {
|
|
622
|
-
padding-top: 48px;
|
|
623
|
-
}
|
|
624
|
-
.m-editor-code-block-list .code-header-wrapper {
|
|
625
|
-
display: flex;
|
|
626
|
-
align-items: center;
|
|
627
|
-
justify-content: center;
|
|
628
|
-
position: absolute;
|
|
629
|
-
top: 0;
|
|
630
|
-
width: 100%;
|
|
631
|
-
z-index: 1;
|
|
632
|
-
}
|
|
633
|
-
.m-editor-code-block-list .code-header-wrapper .search-input {
|
|
634
|
-
flex: 1;
|
|
635
|
-
position: relative;
|
|
636
|
-
}
|
|
637
|
-
.m-editor-code-block-list .code-header-wrapper .create-code-button {
|
|
638
|
-
margin-left: 2px;
|
|
639
|
-
margin-right: 10px;
|
|
640
|
-
}
|
|
641
|
-
.m-editor-code-block-list .divider {
|
|
642
|
-
margin: 10px 0 0 0;
|
|
643
|
-
}
|
|
644
|
-
.m-editor-code-block-list .list-container {
|
|
645
|
-
width: 100%;
|
|
646
|
-
overflow: hidden;
|
|
647
|
-
}
|
|
648
|
-
.m-editor-code-block-list .list-container .list-item {
|
|
649
|
-
display: flex;
|
|
650
|
-
align-items: center;
|
|
651
|
-
width: 100%;
|
|
652
|
-
align-items: center;
|
|
653
|
-
}
|
|
654
|
-
.m-editor-code-block-list .list-container .list-item .right-tool {
|
|
655
|
-
display: flex;
|
|
656
|
-
width: fit-content !important;
|
|
657
|
-
align-items: center;
|
|
658
|
-
margin-right: 10px;
|
|
659
|
-
}
|
|
660
|
-
.m-editor-code-block-list .list-container .list-item .right-tool .edit-icon {
|
|
661
|
-
margin: 0 5px;
|
|
662
|
-
}
|
|
663
688
|
.m-editor-code-block-list .list-container .list-item .codeIcon {
|
|
664
|
-
width:
|
|
665
|
-
height:
|
|
689
|
+
width: 22px;
|
|
690
|
+
height: 22px;
|
|
666
691
|
margin-right: 5px;
|
|
667
692
|
}
|
|
668
693
|
.m-editor-code-block-list .list-container .list-item .compIcon {
|
|
669
|
-
width:
|
|
670
|
-
height:
|
|
694
|
+
width: 22px;
|
|
695
|
+
height: 22px;
|
|
671
696
|
margin-right: 5px;
|
|
672
697
|
}
|
|
673
|
-
.m-editor-code-block-list .list-container .list-item .code-name {
|
|
674
|
-
white-space: nowrap;
|
|
675
|
-
overflow: hidden;
|
|
676
|
-
text-overflow: ellipsis;
|
|
677
|
-
width: 0 !important;
|
|
678
|
-
flex: 1;
|
|
679
|
-
line-height: 22px;
|
|
680
|
-
}
|
|
681
|
-
.m-editor-code-block-list .list-container .list-item .code-name.code {
|
|
682
|
-
color: #000;
|
|
683
|
-
}
|
|
684
|
-
.m-editor-code-block-list .list-container .list-item .code-name.hook {
|
|
685
|
-
color: #909399;
|
|
686
|
-
}
|
|
687
698
|
.m-fields-code-select {
|
|
688
699
|
width: 100%;
|
|
689
700
|
}
|
|
@@ -842,4 +853,54 @@
|
|
|
842
853
|
left: 5px;
|
|
843
854
|
top: 5px;
|
|
844
855
|
z-index: 10;
|
|
856
|
+
}
|
|
857
|
+
.m-editor-dep-list-panel .magic-editor-layer-tree {
|
|
858
|
+
padding-top: 48px;
|
|
859
|
+
}
|
|
860
|
+
.m-editor-dep-list-panel .search-wrapper {
|
|
861
|
+
display: flex;
|
|
862
|
+
align-items: center;
|
|
863
|
+
justify-content: center;
|
|
864
|
+
position: absolute;
|
|
865
|
+
top: 0;
|
|
866
|
+
width: 100%;
|
|
867
|
+
z-index: 1;
|
|
868
|
+
}
|
|
869
|
+
.m-editor-dep-list-panel .search-wrapper .search-input {
|
|
870
|
+
flex: 1;
|
|
871
|
+
position: relative;
|
|
872
|
+
}
|
|
873
|
+
.m-editor-dep-list-panel .search-wrapper .tmagic-design-button {
|
|
874
|
+
margin-right: 10px;
|
|
875
|
+
}
|
|
876
|
+
.m-editor-dep-list-panel .list-container {
|
|
877
|
+
width: 100%;
|
|
878
|
+
overflow: hidden;
|
|
879
|
+
}
|
|
880
|
+
.m-editor-dep-list-panel .list-container .list-item {
|
|
881
|
+
display: flex;
|
|
882
|
+
width: 100%;
|
|
883
|
+
align-items: center;
|
|
884
|
+
}
|
|
885
|
+
.m-editor-dep-list-panel .list-container .list-item .right-tool {
|
|
886
|
+
display: flex;
|
|
887
|
+
width: fit-content !important;
|
|
888
|
+
align-items: center;
|
|
889
|
+
}
|
|
890
|
+
.m-editor-dep-list-panel .list-container .list-item .right-tool .edit-icon {
|
|
891
|
+
margin: 0 5px;
|
|
892
|
+
}
|
|
893
|
+
.m-editor-dep-list-panel .list-container .list-item .name {
|
|
894
|
+
white-space: nowrap;
|
|
895
|
+
overflow: hidden;
|
|
896
|
+
text-overflow: ellipsis;
|
|
897
|
+
width: 0 !important;
|
|
898
|
+
flex: 1;
|
|
899
|
+
line-height: 22px;
|
|
900
|
+
}
|
|
901
|
+
.m-editor-dep-list-panel .list-container .list-item .name.code {
|
|
902
|
+
color: #000;
|
|
903
|
+
}
|
|
904
|
+
.m-editor-dep-list-panel .list-container .list-item .name.hook {
|
|
905
|
+
color: #909399;
|
|
845
906
|
}
|
package/dist/tmagic-editor.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, normalizeStyle, unref, reactive, watch, createElementBlock, normalizeClass, createVNode, withCtx, createElementVNode, resolveDynamicComponent, toRaw, inject, ref, Fragment, renderList, createTextVNode, withModifiers, createCommentVNode, toDisplayString, onMounted, onUnmounted, renderSlot, createSlots, normalizeProps, mergeProps, markRaw, getCurrentInstance, watchEffect, createStaticVNode, withDirectives, Teleport, vShow, nextTick, toHandlers, provide } from 'vue';
|
|
2
2
|
import serialize from 'serialize-javascript';
|
|
3
3
|
import { isEmpty, map, has, throttle, cloneDeep, mergeWith, isObject, uniq, forIn, difference, union, pick, keys } from 'lodash-es';
|
|
4
|
-
import { TMagicCard, TMagicIcon, TMagicButton, TMagicTooltip, TMagicScrollbar, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, tMagicMessage, TMagicInput, tMagicMessageBox, TMagicDrawer, TMagicTree, TMagicCollapse, TMagicCollapseItem, getConfig as getConfig$1,
|
|
4
|
+
import { TMagicCard, TMagicIcon, TMagicButton, TMagicTooltip, TMagicScrollbar, TMagicDivider, TMagicDropdown, TMagicDropdownMenu, TMagicDropdownItem, tMagicMessage, TMagicInput, tMagicMessageBox, TMagicDrawer, TMagicTree, TMagicCollapse, TMagicCollapseItem, getConfig as getConfig$1, TMagicPopover } from '@tmagic/design';
|
|
5
5
|
import { HookType, ActionType, NodeType } from '@tmagic/schema';
|
|
6
6
|
import { Edit, View, Delete, Close, Plus, ArrowDown, Grid, Memo, FullScreen, ScaleToOriginal, ZoomOut, ZoomIn, Right, Back, Search, Files, CopyDocument, Coin, EditPen, ArrowLeftBold, ArrowRightBold, CaretBottom, DocumentCopy, Top, Bottom } from '@element-plus/icons-vue';
|
|
7
7
|
import { createValues, MForm } from '@tmagic/form';
|
|
8
8
|
import * as monaco from 'monaco-editor';
|
|
9
9
|
import Gesto from 'gesto';
|
|
10
|
-
import { isPop, getNodePath, isNumber, isPage, toLine, datetimeFormatter, removeClassNameByClassName } from '@tmagic/utils';
|
|
10
|
+
import { isPop, getNodePath, isNumber, isPage, toLine, guid, datetimeFormatter, removeClassNameByClassName } from '@tmagic/utils';
|
|
11
11
|
import KeyController from 'keycon';
|
|
12
12
|
import StageCore, { GuidesType, getOffset, calcValueByFontsize, CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType } from '@tmagic/stage';
|
|
13
13
|
import { EventEmitter } from 'events';
|
|
@@ -1829,7 +1829,7 @@ class Props extends BaseService {
|
|
|
1829
1829
|
};
|
|
1830
1830
|
}
|
|
1831
1831
|
async createId(type) {
|
|
1832
|
-
return `${type}_${
|
|
1832
|
+
return `${type}_${guid()}`;
|
|
1833
1833
|
}
|
|
1834
1834
|
/**
|
|
1835
1835
|
* 将组件与组件的子元素配置中的id都设置成一个新的ID
|
|
@@ -1872,18 +1872,6 @@ class Props extends BaseService {
|
|
|
1872
1872
|
this.removeAllListeners();
|
|
1873
1873
|
this.removeAllPlugins();
|
|
1874
1874
|
}
|
|
1875
|
-
/**
|
|
1876
|
-
* 生成指定位数的GUID,无【-】格式
|
|
1877
|
-
* @param digit 位数,默认值8
|
|
1878
|
-
* @returns
|
|
1879
|
-
*/
|
|
1880
|
-
guid(digit = 8) {
|
|
1881
|
-
return "x".repeat(digit).replace(/[xy]/g, (c) => {
|
|
1882
|
-
const r = Math.random() * 16 | 0;
|
|
1883
|
-
const v = c === "x" ? r : r & 3 | 8;
|
|
1884
|
-
return v.toString(16);
|
|
1885
|
-
});
|
|
1886
|
-
}
|
|
1887
1875
|
}
|
|
1888
1876
|
const propsService = new Props();
|
|
1889
1877
|
|
|
@@ -3427,9 +3415,18 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
3427
3415
|
size: "small",
|
|
3428
3416
|
placeholder: "输入关键字进行过滤",
|
|
3429
3417
|
clearable: "",
|
|
3430
|
-
"prefix-icon": unref(Search),
|
|
3431
3418
|
onInput: filterTextChangeHandler
|
|
3432
|
-
},
|
|
3419
|
+
}, {
|
|
3420
|
+
prefix: withCtx(() => [
|
|
3421
|
+
createVNode(unref(TMagicIcon), null, {
|
|
3422
|
+
default: withCtx(() => [
|
|
3423
|
+
createVNode(unref(Search))
|
|
3424
|
+
]),
|
|
3425
|
+
_: 1
|
|
3426
|
+
})
|
|
3427
|
+
]),
|
|
3428
|
+
_: 1
|
|
3429
|
+
}, 8, ["modelValue"]);
|
|
3433
3430
|
};
|
|
3434
3431
|
}
|
|
3435
3432
|
});
|
|
@@ -3444,11 +3441,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
3444
3441
|
|
|
3445
3442
|
const _sfc_main$j = {};
|
|
3446
3443
|
|
|
3447
|
-
const _hoisted_1$b = {
|
|
3448
|
-
width: "16px",
|
|
3449
|
-
height: "16px",
|
|
3450
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3451
|
-
};
|
|
3444
|
+
const _hoisted_1$b = { xmlns: "http://www.w3.org/2000/svg" };
|
|
3452
3445
|
const _hoisted_2$6 = /*#__PURE__*/createElementVNode("g", {
|
|
3453
3446
|
fill: "#7C878E",
|
|
3454
3447
|
"fill-rule": "evenodd"
|
|
@@ -3471,20 +3464,18 @@ const AppManageIcon = /*#__PURE__*/_export_sfc(_sfc_main$j, [['render',_sfc_rend
|
|
|
3471
3464
|
const _sfc_main$i = {};
|
|
3472
3465
|
|
|
3473
3466
|
const _hoisted_1$a = {
|
|
3474
|
-
width: "32px",
|
|
3475
|
-
height: "32px",
|
|
3476
3467
|
viewBox: "0 0 32 32",
|
|
3477
3468
|
version: "1.1",
|
|
3478
3469
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3479
3470
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
3480
3471
|
};
|
|
3481
|
-
const _hoisted_2$5 = /*#__PURE__*/createStaticVNode("<
|
|
3482
|
-
const
|
|
3472
|
+
const _hoisted_2$5 = /*#__PURE__*/createStaticVNode("<defs><rect id=\"path-1\" x=\"0\" y=\"0\" width=\"32\" height=\"32\"></rect></defs><g id=\"组件规范\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><g id=\"03图标\" transform=\"translate(-561.000000, -2356.000000)\"><g id=\"icon/line/Universal/code\" transform=\"translate(561.000000, 2356.000000)\"><g id=\"路径\"><mask id=\"mask-2\" fill=\"white\"><use xlink:href=\"#path-1\"></use></mask><use id=\"蒙版\" fill=\"#D8D8D8\" opacity=\"0\" xlink:href=\"#path-1\"></use><path d=\"M21.9284587,7.9482233 L29.8079004,15.827665 C29.9055315,15.9252961 29.9055315,16.0835874 29.8079004,16.1812184 L21.9284587,24.0606602 C21.8308276,24.1582912 21.6725364,24.1582912 21.5749053,24.0606602 L20.3374684,22.8232233 C20.2419143,22.7276698 20.2398813,22.5740096 20.331369,22.4759832 L20.3374687,22.4696702 L26.8027181,16.0044417 L20.3374687,9.53921328 C20.2398372,9.44158265 20.2398369,9.2832914 20.3374679,9.18566017 L21.5749053,7.9482233 C21.6725364,7.85059223 21.8308276,7.85059223 21.9284587,7.9482233 Z M10.3999684,7.9482233 L11.6374053,9.18566017 C11.7329594,9.28121371 11.7349925,9.43487387 11.6435048,9.53290029 L11.637405,9.53921328 L5.17215562,16.0044417 L11.637405,22.4696702 C11.7329593,22.5652236 11.7349926,22.7188837 11.643505,22.8169103 L11.6374053,22.8232233 L10.3999684,24.0606602 C10.3023374,24.1582912 10.1440461,24.1582912 10.046415,24.0606602 L2.1669733,16.1812184 C2.06934223,16.0835874 2.06934223,15.9252961 2.1669733,15.827665 L10.046415,7.9482233 C10.1440461,7.85059223 10.3023374,7.85059223 10.3999684,7.9482233 Z M17.2612532,9.29310422 L18.9262468,9.83189578 C19.0576112,9.87440526 19.1296423,10.0153579 19.0871328,10.1467222 L15.0848232,22.514807 C15.0423138,22.6461714 14.9013612,22.7182025 14.7699968,22.675693 L13.1050032,22.1369014 C12.9736388,22.0943919 12.9016077,21.9534393 12.9441172,21.822075 L16.9464268,9.45399022 C16.9889362,9.32262585 17.1298888,9.25059474 17.2612532,9.29310422 Z\" id=\"形状\" fill=\"#1D1F24\" mask=\"url(#mask-2)\"></path></g></g><g id=\"icon切图\" transform=\"translate(226.000000, 1782.000000)\"></g></g></g>", 2);
|
|
3473
|
+
const _hoisted_4$3 = [
|
|
3483
3474
|
_hoisted_2$5
|
|
3484
3475
|
];
|
|
3485
3476
|
|
|
3486
3477
|
function _sfc_render$1(_ctx, _cache) {
|
|
3487
|
-
return (openBlock(), createElementBlock("svg", _hoisted_1$a,
|
|
3478
|
+
return (openBlock(), createElementBlock("svg", _hoisted_1$a, _hoisted_4$3))
|
|
3488
3479
|
}
|
|
3489
3480
|
const CodeIcon = /*#__PURE__*/_export_sfc(_sfc_main$i, [['render',_sfc_render$1]]);
|
|
3490
3481
|
|
|
@@ -3914,7 +3905,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3914
3905
|
}
|
|
3915
3906
|
});
|
|
3916
3907
|
|
|
3917
|
-
const _hoisted_1$6 = { class: "
|
|
3908
|
+
const _hoisted_1$6 = { class: "search-wrapper" };
|
|
3918
3909
|
const _hoisted_2$2 = /* @__PURE__ */ createTextVNode("新增");
|
|
3919
3910
|
const _hoisted_3 = ["id"];
|
|
3920
3911
|
const _hoisted_4 = { class: "list-item" };
|
|
@@ -4010,7 +4001,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4010
4001
|
}
|
|
4011
4002
|
};
|
|
4012
4003
|
return (_ctx, _cache) => {
|
|
4013
|
-
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-code-block-list" }, {
|
|
4004
|
+
return openBlock(), createBlock(unref(TMagicScrollbar), { class: "m-editor-code-block-list m-editor-dep-list-panel" }, {
|
|
4014
4005
|
default: withCtx(() => [
|
|
4015
4006
|
renderSlot(_ctx.$slots, "code-block-panel-header", {}, () => [
|
|
4016
4007
|
createElementVNode("div", _hoisted_1$6, [
|
|
@@ -4057,8 +4048,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4057
4048
|
class: "compIcon"
|
|
4058
4049
|
})) : createCommentVNode("", true),
|
|
4059
4050
|
createElementVNode("span", {
|
|
4060
|
-
class: normalizeClass(["
|
|
4061
|
-
}, toDisplayString(data.name) + "
|
|
4051
|
+
class: normalizeClass(["name", { code: data.type === "code", hook: data.type === "key" }])
|
|
4052
|
+
}, toDisplayString(data.name) + " (" + toDisplayString(data.id) + ")", 3),
|
|
4062
4053
|
data.type === "code" ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
4063
4054
|
createVNode(unref(TMagicTooltip), {
|
|
4064
4055
|
effect: "dark",
|
|
@@ -4747,7 +4738,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4747
4738
|
},
|
|
4748
4739
|
setup(__props, { expose }) {
|
|
4749
4740
|
const props = __props;
|
|
4750
|
-
const
|
|
4741
|
+
const tabPaneComponent = getConfig$1("components").tabPane;
|
|
4742
|
+
const tabsComponent = getConfig$1("components").tabs;
|
|
4751
4743
|
const activeTabName = ref(props.data?.status);
|
|
4752
4744
|
const getItemConfig = (data) => {
|
|
4753
4745
|
const map = {
|
|
@@ -4792,20 +4784,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4792
4784
|
activeTabName
|
|
4793
4785
|
});
|
|
4794
4786
|
return (_ctx, _cache) => {
|
|
4795
|
-
return __props.data.type === "tabs" && __props.data.items.length ? (openBlock(), createBlock(unref(
|
|
4787
|
+
return __props.data.type === "tabs" && __props.data.items.length ? (openBlock(), createBlock(resolveDynamicComponent(unref(tabsComponent).component), mergeProps({
|
|
4796
4788
|
key: 0,
|
|
4797
|
-
class: "m-editor-sidebar",
|
|
4798
4789
|
modelValue: activeTabName.value,
|
|
4799
4790
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeTabName.value = $event),
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
}, {
|
|
4791
|
+
class: "m-editor-sidebar tmagic-design-tabs"
|
|
4792
|
+
}, unref(tabsComponent).props({ type: "card", tabPosition: "left" })), {
|
|
4803
4793
|
default: withCtx(() => [
|
|
4804
4794
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(sideBarItems), (config, index) => {
|
|
4805
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(
|
|
4806
|
-
key: config.$key || index
|
|
4807
|
-
|
|
4808
|
-
}, {
|
|
4795
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(tabPaneComponent).component), mergeProps(unref(tabPaneComponent).props({ name: config.text }), {
|
|
4796
|
+
key: config.$key || index
|
|
4797
|
+
}), {
|
|
4809
4798
|
label: withCtx(() => [
|
|
4810
4799
|
(openBlock(), createElementBlock("div", {
|
|
4811
4800
|
key: config.text
|
|
@@ -4885,11 +4874,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
4885
4874
|
]), 1040)) : createCommentVNode("", true)
|
|
4886
4875
|
]),
|
|
4887
4876
|
_: 2
|
|
4888
|
-
},
|
|
4877
|
+
}, 1040);
|
|
4889
4878
|
}), 128))
|
|
4890
4879
|
]),
|
|
4891
4880
|
_: 3
|
|
4892
|
-
},
|
|
4881
|
+
}, 16, ["modelValue"])) : createCommentVNode("", true);
|
|
4893
4882
|
};
|
|
4894
4883
|
}
|
|
4895
4884
|
});
|