@tmagic/editor 1.0.0-beta.8 → 1.0.0-rc.10
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 -0
- package/dist/style.css +94 -45
- package/dist/tmagic-editor.es.js +1622 -2069
- package/dist/tmagic-editor.es.js.map +1 -1
- package/dist/tmagic-editor.umd.js +1621 -2071
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/dist/types/src/Editor.vue.d.ts +50 -2
- package/dist/types/src/fields/Code.vue.d.ts +4 -4
- package/dist/types/src/fields/CodeLink.vue.d.ts +1 -3
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/layouts/CodeEditor.vue.d.ts +13 -4
- package/dist/types/src/layouts/Framework.vue.d.ts +15 -3
- package/dist/types/src/layouts/PropsPanel.vue.d.ts +4 -5
- package/dist/types/src/layouts/sidebar/ComponentListPanel.vue.d.ts +2 -1
- package/dist/types/src/layouts/sidebar/Sidebar.vue.d.ts +2 -3
- package/dist/types/src/layouts/sidebar/TabPane.vue.d.ts +14 -0
- package/dist/types/src/layouts/workspace/Workspace.vue.d.ts +5 -31
- package/dist/types/src/services/BaseService.d.ts +5 -2
- package/dist/types/src/services/editor.d.ts +16 -6
- package/dist/types/src/services/history.d.ts +2 -18
- package/dist/types/src/services/props.d.ts +8 -2
- package/dist/types/src/services/ui.d.ts +2 -0
- package/dist/types/src/type.d.ts +25 -9
- package/dist/types/src/utils/editor.d.ts +5 -10
- package/dist/types/src/utils/polyfills.d.ts +0 -0
- package/dist/types/src/utils/props.d.ts +8 -1
- package/package.json +35 -12
- package/src/Editor.vue +44 -9
- package/src/components/ContentMenu.vue +140 -0
- package/src/components/ScrollViewer.vue +1 -1
- package/src/components/ToolButton.vue +72 -31
- package/src/fields/UISelect.vue +14 -6
- package/src/index.ts +2 -0
- package/src/layouts/AddPageBox.vue +3 -1
- package/src/layouts/CodeEditor.vue +20 -13
- package/src/layouts/Framework.vue +20 -7
- package/src/layouts/PropsPanel.vue +5 -4
- package/src/layouts/sidebar/ComponentListPanel.vue +25 -3
- package/src/layouts/sidebar/LayerMenu.vue +93 -95
- package/src/layouts/sidebar/LayerPanel.vue +80 -59
- package/src/layouts/sidebar/Sidebar.vue +13 -52
- package/src/layouts/sidebar/TabPane.vue +68 -0
- package/src/layouts/workspace/PageBar.vue +145 -17
- package/src/layouts/workspace/Stage.vue +65 -91
- package/src/layouts/workspace/ViewerMenu.vue +122 -68
- package/src/layouts/workspace/Workspace.vue +125 -42
- package/src/services/BaseService.ts +71 -23
- package/src/services/editor.ts +231 -69
- package/src/services/history.ts +7 -0
- package/src/services/props.ts +64 -9
- package/src/services/ui.ts +35 -5
- package/src/theme/common/var.scss +3 -2
- package/src/theme/component-list-panel.scss +2 -0
- package/src/theme/content-menu.scss +33 -26
- package/src/theme/layer-panel.scss +10 -0
- package/src/theme/nav-menu.scss +6 -2
- package/src/theme/page-bar.scss +42 -2
- package/src/theme/props-panel.scss +19 -17
- package/src/theme/workspace.scss +4 -0
- package/src/type.ts +27 -9
- package/src/utils/editor.ts +37 -56
- package/src/utils/polyfills.ts +8 -0
- package/src/utils/props.ts +50 -8
- package/LICENSE +0 -5432
- package/dist/types/src/components/ToolButton.vue.d.ts +0 -35
- package/dist/types/src/fields/UISelect.vue.d.ts +0 -32
- package/dist/types/src/layouts/sidebar/LayerMenu.vue.d.ts +0 -31
- package/dist/types/src/layouts/sidebar/LayerPanel.vue.d.ts +0 -973
- package/dist/types/src/layouts/workspace/PageBar.vue.d.ts +0 -11
- package/dist/types/src/layouts/workspace/Stage.vue.d.ts +0 -192
- package/dist/types/src/layouts/workspace/ViewerMenu.vue.d.ts +0 -18
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -30
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# [文档](https://tencent.github.io/tmagic-editor/docs/)
|
package/dist/style.css
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
justify-content: space-between;
|
|
14
14
|
-webkit-box-align: center;
|
|
15
15
|
align-items: center;
|
|
16
|
-
background-color: #
|
|
16
|
+
background-color: #ffffff;
|
|
17
17
|
font-size: 19.2px;
|
|
18
18
|
color: #070303;
|
|
19
19
|
font-weight: 400;
|
|
@@ -48,12 +48,15 @@
|
|
|
48
48
|
display: flex !important;
|
|
49
49
|
transition: all 0.3s ease 0s;
|
|
50
50
|
border-bottom: 2px solid transparent;
|
|
51
|
-
margin: 0
|
|
51
|
+
margin: 0;
|
|
52
52
|
}
|
|
53
53
|
.m-editor-nav-menu .menu-item .is-disabled {
|
|
54
54
|
opacity: 0.5;
|
|
55
55
|
}
|
|
56
|
-
.m-editor-nav-menu .menu-item .
|
|
56
|
+
.m-editor-nav-menu .menu-item .is-text {
|
|
57
|
+
padding: 5px;
|
|
58
|
+
}
|
|
59
|
+
.m-editor-nav-menu .menu-item .is-text,
|
|
57
60
|
.m-editor-nav-menu .menu-item i {
|
|
58
61
|
color: #070303;
|
|
59
62
|
}
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
flex: 1;
|
|
85
88
|
}
|
|
86
89
|
.m-editor-framework-left {
|
|
87
|
-
background-color: #
|
|
90
|
+
background-color: #ffffff;
|
|
88
91
|
}
|
|
89
92
|
.m-editor-framework-center .el-scrollbar__view {
|
|
90
93
|
height: 100%;
|
|
@@ -153,11 +156,11 @@
|
|
|
153
156
|
border: 0;
|
|
154
157
|
height: auto;
|
|
155
158
|
padding: 8px;
|
|
156
|
-
color:
|
|
159
|
+
color: rgb(255, 255, 255);
|
|
157
160
|
box-sizing: border-box;
|
|
158
161
|
}
|
|
159
162
|
.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active {
|
|
160
|
-
background: #
|
|
163
|
+
background: #ffffff;
|
|
161
164
|
border: 0;
|
|
162
165
|
}
|
|
163
166
|
.m-editor-sidebar.el-tabs--left .el-tabs__header .el-tabs__item.is-left.is-left.is-active i {
|
|
@@ -174,7 +177,7 @@
|
|
|
174
177
|
color: rgba(255, 255, 255, 0.6);
|
|
175
178
|
}
|
|
176
179
|
.m-editor-sidebar.el-tabs--left .el-tabs__header i:hover {
|
|
177
|
-
color:
|
|
180
|
+
color: rgb(255, 255, 255);
|
|
178
181
|
}
|
|
179
182
|
.m-editor-sidebar.el-tabs--left .el-tabs__header .magic-editor-tab-panel-title {
|
|
180
183
|
font-size: 12px;
|
|
@@ -205,10 +208,10 @@
|
|
|
205
208
|
height: 100%;
|
|
206
209
|
}
|
|
207
210
|
.magic-editor-layer-panel {
|
|
208
|
-
background: #
|
|
211
|
+
background: #ffffff;
|
|
209
212
|
}
|
|
210
213
|
.magic-editor-layer-panel .search-input {
|
|
211
|
-
background: #
|
|
214
|
+
background: #ffffff;
|
|
212
215
|
color: #bbbbbb;
|
|
213
216
|
padding: 10px;
|
|
214
217
|
position: absolute;
|
|
@@ -242,13 +245,21 @@
|
|
|
242
245
|
}
|
|
243
246
|
.magic-editor-layer-panel,
|
|
244
247
|
.magic-editor-layer-panel .el-tree {
|
|
245
|
-
background-color: #
|
|
248
|
+
background-color: #ffffff;
|
|
246
249
|
color: #313a40;
|
|
247
250
|
}
|
|
248
251
|
.magic-editor-layer-panel .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
|
|
249
252
|
background-color: #2882e0;
|
|
250
253
|
color: #fff;
|
|
251
254
|
}
|
|
255
|
+
.magic-editor-layer-panel .cus-tree-node {
|
|
256
|
+
width: 100%;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
}
|
|
259
|
+
.magic-editor-layer-panel .cus-tree-node-hover {
|
|
260
|
+
background-color: #f3f5f9;
|
|
261
|
+
width: 100%;
|
|
262
|
+
}
|
|
252
263
|
.magic-editor-layer-panel .el-tree-node:focus > .el-tree-node__content {
|
|
253
264
|
background-color: #2882e0;
|
|
254
265
|
color: #fff;
|
|
@@ -257,7 +268,7 @@
|
|
|
257
268
|
width: 100%;
|
|
258
269
|
height: 25px;
|
|
259
270
|
margin-left: 10px;
|
|
260
|
-
background: #
|
|
271
|
+
background: #ffffff;
|
|
261
272
|
font-style: italic;
|
|
262
273
|
color: #555554;
|
|
263
274
|
position: absolute;
|
|
@@ -269,7 +280,7 @@
|
|
|
269
280
|
height: 100%;
|
|
270
281
|
border-top: 0 !important;
|
|
271
282
|
margin-top: 50px;
|
|
272
|
-
background-color: #
|
|
283
|
+
background-color: #ffffff;
|
|
273
284
|
}
|
|
274
285
|
.ui-component-panel .search-input {
|
|
275
286
|
background: #f8fbff;
|
|
@@ -279,6 +290,7 @@
|
|
|
279
290
|
top: 0;
|
|
280
291
|
left: 0;
|
|
281
292
|
box-sizing: border-box;
|
|
293
|
+
z-index: 1;
|
|
282
294
|
}
|
|
283
295
|
.ui-component-panel .search-input .el-input__prefix {
|
|
284
296
|
padding: 10px;
|
|
@@ -291,7 +303,7 @@
|
|
|
291
303
|
margin-bottom: 10px;
|
|
292
304
|
}
|
|
293
305
|
.ui-component-panel .el-collapse-item__header {
|
|
294
|
-
background: #
|
|
306
|
+
background: #ffffff;
|
|
295
307
|
color: #070303;
|
|
296
308
|
height: 25px;
|
|
297
309
|
line-height: 25px;
|
|
@@ -303,7 +315,7 @@
|
|
|
303
315
|
font-size: 14px;
|
|
304
316
|
}
|
|
305
317
|
.ui-component-panel .el-collapse-item__wrap {
|
|
306
|
-
background: #
|
|
318
|
+
background: #ffffff;
|
|
307
319
|
border-bottom: 0;
|
|
308
320
|
}
|
|
309
321
|
.ui-component-panel .el-collapse-item__wrap .el-collapse-item__content {
|
|
@@ -320,6 +332,7 @@
|
|
|
320
332
|
color: #070303;
|
|
321
333
|
flex-direction: column;
|
|
322
334
|
width: 42px;
|
|
335
|
+
cursor: pointer;
|
|
323
336
|
}
|
|
324
337
|
.ui-component-panel .el-collapse-item__wrap .component-item i {
|
|
325
338
|
font-size: 20px;
|
|
@@ -401,6 +414,9 @@
|
|
|
401
414
|
width: 100%;
|
|
402
415
|
user-select: none;
|
|
403
416
|
}
|
|
417
|
+
.m-editor-workspace:focus-visible {
|
|
418
|
+
outline: 0;
|
|
419
|
+
}
|
|
404
420
|
.m-editor-page-bar {
|
|
405
421
|
position: fixed;
|
|
406
422
|
bottom: 0;
|
|
@@ -409,84 +425,117 @@
|
|
|
409
425
|
width: 100%;
|
|
410
426
|
height: 32px;
|
|
411
427
|
line-height: 32px;
|
|
412
|
-
background-color: #f3f3f3;
|
|
413
428
|
color: #070303;
|
|
429
|
+
background-color: #f3f3f3;
|
|
414
430
|
border-top: 1px solid #d9dbdd;
|
|
415
431
|
z-index: 2;
|
|
432
|
+
overflow: hidden;
|
|
433
|
+
}
|
|
434
|
+
.m-editor-page-bar-items {
|
|
435
|
+
display: flex;
|
|
436
|
+
transition: transform 0.3s;
|
|
416
437
|
}
|
|
417
|
-
.m-editor-page-bar
|
|
438
|
+
.m-editor-page-bar-item {
|
|
418
439
|
padding: 0 10px;
|
|
419
440
|
cursor: pointer;
|
|
420
441
|
border-right: 1px solid #d9dbdd;
|
|
421
442
|
display: flex;
|
|
422
443
|
justify-items: center;
|
|
423
444
|
align-items: center;
|
|
445
|
+
background-color: #f3f3f3;
|
|
424
446
|
}
|
|
425
|
-
.m-editor-page-bar
|
|
447
|
+
.m-editor-page-bar-item.active {
|
|
426
448
|
background-color: #fff;
|
|
427
449
|
cursor: text;
|
|
428
450
|
}
|
|
429
|
-
.m-editor-page-bar
|
|
451
|
+
.m-editor-page-bar-item.active .m-editor-page-bar-menu-icon {
|
|
430
452
|
cursor: pointer;
|
|
431
453
|
}
|
|
454
|
+
.m-editor-page-bar-item-icon {
|
|
455
|
+
position: relative;
|
|
456
|
+
z-index: 1;
|
|
457
|
+
}
|
|
458
|
+
.m-editor-page-bar-item-title {
|
|
459
|
+
max-width: 150px;
|
|
460
|
+
text-overflow: ellipsis;
|
|
461
|
+
white-space: nowrap;
|
|
462
|
+
overflow: hidden;
|
|
463
|
+
}
|
|
464
|
+
.page-bar-popover.el-popper.el-popover {
|
|
465
|
+
padding: 10px 0;
|
|
466
|
+
}
|
|
467
|
+
.page-bar-popover .menu-item {
|
|
468
|
+
cursor: pointer;
|
|
469
|
+
transition: all 0.2s ease 0s;
|
|
470
|
+
padding: 5px 14px;
|
|
471
|
+
}
|
|
472
|
+
.page-bar-popover .menu-item .el-button--text,
|
|
473
|
+
.page-bar-popover .menu-item i {
|
|
474
|
+
color: #070303;
|
|
475
|
+
}
|
|
476
|
+
.page-bar-popover .menu-item:hover {
|
|
477
|
+
background-color: #f3f5f9;
|
|
478
|
+
}
|
|
432
479
|
.m-editor-props-panel {
|
|
433
480
|
padding: 0 10px;
|
|
434
481
|
}
|
|
435
|
-
.m-editor-props-panel .el-form-item__label {
|
|
482
|
+
.m-editor-props-panel.small .el-form-item__label {
|
|
436
483
|
font-size: 12px;
|
|
437
484
|
}
|
|
438
|
-
.m-editor-props-panel .m-fieldset legend {
|
|
485
|
+
.m-editor-props-panel.small .m-fieldset legend {
|
|
439
486
|
font-size: 12px;
|
|
440
487
|
}
|
|
441
|
-
.m-editor-props-panel .el-tabs__item {
|
|
488
|
+
.m-editor-props-panel.small .el-tabs__item {
|
|
442
489
|
font-size: 12px;
|
|
443
490
|
}
|
|
444
|
-
.m-editor-props-panel
|
|
445
|
-
|
|
446
|
-
.m-editor-props-panel p {
|
|
447
|
-
font-size: 12px;
|
|
491
|
+
.m-editor-props-panel .el-input__wrapper {
|
|
492
|
+
border-radius: 0;
|
|
448
493
|
}
|
|
449
|
-
.m-editor-props-panel-popper span,
|
|
450
|
-
.m-editor-props-panel-popper a,
|
|
451
|
-
.m-editor-props-panel-popper p {
|
|
494
|
+
.m-editor-props-panel-popper.small span,
|
|
495
|
+
.m-editor-props-panel-popper.small a,
|
|
496
|
+
.m-editor-props-panel-popper.small p {
|
|
452
497
|
font-size: 12px;
|
|
453
498
|
}
|
|
454
499
|
.magic-editor-content-menu {
|
|
455
500
|
position: fixed;
|
|
456
501
|
font-size: 12px;
|
|
457
502
|
background: #fff;
|
|
458
|
-
color: #333;
|
|
459
503
|
box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);
|
|
460
504
|
z-index: 9999;
|
|
461
505
|
transform-origin: 0% 0%;
|
|
462
506
|
font-weight: 600;
|
|
463
507
|
padding: 4px 0px;
|
|
508
|
+
overflow: auto;
|
|
509
|
+
max-height: 100%;
|
|
464
510
|
}
|
|
465
|
-
.magic-editor-content-menu .
|
|
466
|
-
width: 100%;
|
|
467
|
-
height: 0;
|
|
468
|
-
border-color: rgba(155, 155, 155, 0.1);
|
|
469
|
-
}
|
|
470
|
-
.magic-editor-content-menu .subMenu {
|
|
471
|
-
position: absolute;
|
|
472
|
-
right: 0;
|
|
473
|
-
transform: translate(100%, 0);
|
|
474
|
-
background-color: #fff;
|
|
511
|
+
.magic-editor-content-menu .menu-item {
|
|
475
512
|
color: #333;
|
|
476
|
-
box-shadow: 0 2px 8px 2px rgba(68, 73, 77, 0.16);
|
|
477
|
-
top: 0;
|
|
478
|
-
height: 223px;
|
|
479
|
-
}
|
|
480
|
-
.magic-editor-content-menu-item {
|
|
481
513
|
display: flex;
|
|
482
514
|
-webkit-box-align: center;
|
|
483
515
|
align-items: center;
|
|
484
516
|
cursor: pointer;
|
|
485
517
|
min-width: 140px;
|
|
486
518
|
transition: all 0.2s ease 0s;
|
|
487
|
-
padding:
|
|
519
|
+
padding: 5px 14px;
|
|
488
520
|
border-left: 2px solid transparent;
|
|
489
521
|
}
|
|
522
|
+
.magic-editor-content-menu .menu-item .el-button {
|
|
523
|
+
width: 100%;
|
|
524
|
+
justify-content: flex-start;
|
|
525
|
+
}
|
|
526
|
+
.magic-editor-content-menu .menu-item .el-button--text,
|
|
527
|
+
.magic-editor-content-menu .menu-item i {
|
|
528
|
+
color: #070303;
|
|
529
|
+
}
|
|
530
|
+
.magic-editor-content-menu .menu-item.divider {
|
|
531
|
+
padding: 0 14px;
|
|
532
|
+
}
|
|
533
|
+
.magic-editor-content-menu .menu-item.divider .el-divider {
|
|
534
|
+
margin: 0;
|
|
535
|
+
}
|
|
536
|
+
.magic-editor-content-menu .menu-item:hover {
|
|
537
|
+
background-color: #f3f5f9;
|
|
538
|
+
}
|
|
490
539
|
.m-editor-stage {
|
|
491
540
|
position: relative;
|
|
492
541
|
width: 100%;
|