@tmagic/editor 1.5.0-beta.9 → 1.5.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/dist/{style.css → tmagic-editor.css} +228 -22
- package/dist/tmagic-editor.js +1670 -1012
- package/dist/tmagic-editor.umd.cjs +1705 -1048
- package/package.json +14 -12
- package/src/Editor.vue +24 -6
- package/src/components/CodeBlockEditor.vue +14 -8
- package/src/components/CodeParams.vue +5 -5
- package/src/components/ContentMenu.vue +18 -18
- package/src/components/FloatingBox.vue +3 -3
- package/src/components/Resizer.vue +4 -4
- package/src/components/ScrollBar.vue +3 -3
- package/src/components/ScrollViewer.vue +3 -3
- package/src/components/SplitView.vue +2 -2
- package/src/components/ToolButton.vue +2 -1
- package/src/editorProps.ts +6 -2
- package/src/fields/Code.vue +1 -2
- package/src/fields/CodeSelect.vue +13 -11
- package/src/fields/CodeSelectCol.vue +32 -5
- package/src/fields/CondOpSelect.vue +5 -2
- package/src/fields/DataSourceFields.vue +31 -12
- package/src/fields/DataSourceInput.vue +2 -2
- package/src/fields/DataSourceMethods.vue +72 -14
- package/src/fields/DataSourceMocks.vue +0 -1
- package/src/fields/DisplayConds.vue +8 -3
- package/src/fields/EventSelect.vue +28 -12
- package/src/fields/KeyValue.vue +17 -12
- package/src/fields/UISelect.vue +6 -3
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use-code-block-edit.ts +3 -3
- package/src/hooks/use-data-source-edit.ts +3 -2
- package/src/hooks/use-filter.ts +1 -1
- package/src/hooks/use-getso.ts +7 -7
- package/src/hooks/use-node-status.ts +2 -2
- package/src/index.ts +2 -1
- package/src/initService.ts +177 -74
- package/src/layouts/CodeEditor.vue +2 -2
- package/src/layouts/Framework.vue +13 -12
- package/src/layouts/NavMenu.vue +2 -2
- package/src/layouts/page-bar/AddButton.vue +29 -9
- package/src/layouts/page-bar/PageBar.vue +79 -66
- package/src/layouts/page-bar/PageBarScrollContainer.vue +84 -98
- package/src/layouts/page-bar/PageList.vue +5 -3
- package/src/layouts/page-bar/Search.vue +67 -0
- package/src/layouts/props-panel/FormPanel.vue +123 -0
- package/src/layouts/props-panel/PropsPanel.vue +146 -0
- package/src/layouts/props-panel/use-style-panel.ts +29 -0
- package/src/layouts/sidebar/Sidebar.vue +7 -1
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +18 -2
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +35 -4
- package/src/layouts/sidebar/code-block/useContentMenu.ts +83 -0
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +7 -5
- package/src/layouts/sidebar/data-source/DataSourceList.vue +13 -8
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +40 -4
- package/src/layouts/sidebar/data-source/useContentMenu.ts +81 -0
- package/src/layouts/sidebar/layer/LayerMenu.vue +7 -13
- package/src/layouts/sidebar/layer/LayerPanel.vue +11 -4
- package/src/layouts/sidebar/layer/use-click.ts +2 -2
- package/src/layouts/sidebar/layer/use-keybinding.ts +2 -2
- package/src/layouts/sidebar/layer/use-node-status.ts +2 -3
- package/src/layouts/workspace/Workspace.vue +13 -3
- package/src/layouts/workspace/viewer/NodeListMenu.vue +3 -3
- package/src/layouts/workspace/viewer/Stage.vue +41 -11
- package/src/layouts/workspace/viewer/StageOverlay.vue +2 -2
- package/src/layouts/workspace/viewer/ViewerMenu.vue +4 -6
- package/src/services/dataSource.ts +12 -5
- package/src/services/dep.ts +61 -13
- package/src/services/editor.ts +46 -51
- package/src/services/storage.ts +2 -1
- package/src/services/ui.ts +1 -0
- package/src/theme/common/var.scss +12 -10
- package/src/theme/component-list-panel.scss +9 -7
- package/src/theme/content-menu.scss +7 -5
- package/src/theme/data-source.scss +3 -1
- package/src/theme/floating-box.scss +4 -2
- package/src/theme/framework.scss +7 -5
- package/src/theme/index.scss +4 -5
- package/src/theme/key-value.scss +2 -2
- package/src/theme/layer-panel.scss +3 -1
- package/src/theme/layout.scss +1 -1
- package/src/theme/nav-menu.scss +7 -5
- package/src/theme/page-bar.scss +51 -27
- package/src/theme/props-panel.scss +81 -1
- package/src/theme/resizer.scss +1 -1
- package/src/theme/search-input.scss +1 -0
- package/src/theme/sidebar.scss +4 -2
- package/src/theme/stage.scss +3 -1
- package/src/theme/theme.scss +28 -28
- package/src/theme/tree.scss +14 -12
- package/src/type.ts +10 -1
- package/src/utils/content-menu.ts +2 -2
- package/src/utils/data-source/formConfigs/http.ts +2 -0
- package/src/utils/data-source/index.ts +2 -2
- package/src/utils/editor.ts +78 -22
- package/src/utils/idle-task.ts +36 -4
- package/src/utils/props.ts +48 -6
- package/types/index.d.ts +2312 -2080
- package/src/hooks/use-data-source-method.ts +0 -100
- package/src/layouts/PropsPanel.vue +0 -131
- package/src/layouts/page-bar/SwitchTypeButton.vue +0 -45
package/src/services/editor.ts
CHANGED
|
@@ -20,10 +20,20 @@ import { reactive, toRaw } from 'vue';
|
|
|
20
20
|
import { cloneDeep, get, isObject, mergeWith, uniq } from 'lodash-es';
|
|
21
21
|
import type { Writable } from 'type-fest';
|
|
22
22
|
|
|
23
|
-
import type { Id, MApp,
|
|
23
|
+
import type { Id, MApp, MContainer, MNode, MPage, MPageFragment, TargetOptions } from '@tmagic/core';
|
|
24
24
|
import { NodeType, Target, Watcher } from '@tmagic/core';
|
|
25
|
+
import type { ChangeRecord } from '@tmagic/form';
|
|
25
26
|
import { isFixed } from '@tmagic/stage';
|
|
26
|
-
import {
|
|
27
|
+
import {
|
|
28
|
+
calcValueByFontsize,
|
|
29
|
+
getElById,
|
|
30
|
+
getNodeInfo,
|
|
31
|
+
getNodePath,
|
|
32
|
+
isNumber,
|
|
33
|
+
isPage,
|
|
34
|
+
isPageFragment,
|
|
35
|
+
isPop,
|
|
36
|
+
} from '@tmagic/utils';
|
|
27
37
|
|
|
28
38
|
import BaseService from '@editor/services//BaseService';
|
|
29
39
|
import propsService from '@editor/services//props';
|
|
@@ -59,7 +69,7 @@ export interface EditorEvents {
|
|
|
59
69
|
select: [node: MNode | null];
|
|
60
70
|
add: [nodes: MNode[]];
|
|
61
71
|
remove: [nodes: MNode[]];
|
|
62
|
-
update: [nodes: MNode[]];
|
|
72
|
+
update: [nodes: { newNode: MNode; oldNode: MNode; changeRecords?: ChangeRecord[] }[]];
|
|
63
73
|
'move-layer': [offset: number | LayerOffset];
|
|
64
74
|
'drag-to': [data: { targetIndex: number; configs: MNode | MNode[]; targetParent: MContainer }];
|
|
65
75
|
'history-change': [data: MPage | MPageFragment];
|
|
@@ -175,36 +185,7 @@ class Editor extends BaseService {
|
|
|
175
185
|
root = toRaw(root);
|
|
176
186
|
}
|
|
177
187
|
|
|
178
|
-
|
|
179
|
-
node: null,
|
|
180
|
-
parent: null,
|
|
181
|
-
page: null,
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
if (!root) return info;
|
|
185
|
-
|
|
186
|
-
if (id === root.id) {
|
|
187
|
-
info.node = root;
|
|
188
|
-
return info;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const path = getNodePath(id, root.items);
|
|
192
|
-
|
|
193
|
-
if (!path.length) return info;
|
|
194
|
-
|
|
195
|
-
path.unshift(root);
|
|
196
|
-
|
|
197
|
-
info.node = path[path.length - 1] as MComponent;
|
|
198
|
-
info.parent = path[path.length - 2] as MContainer;
|
|
199
|
-
|
|
200
|
-
path.forEach((item) => {
|
|
201
|
-
if (isPage(item) || isPageFragment(item)) {
|
|
202
|
-
info.page = item as MPage | MPageFragment;
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
return info;
|
|
188
|
+
return getNodeInfo(id, root);
|
|
208
189
|
}
|
|
209
190
|
|
|
210
191
|
/**
|
|
@@ -494,11 +475,11 @@ class Editor extends BaseService {
|
|
|
494
475
|
if (isPage(node)) {
|
|
495
476
|
this.state.pageLength -= 1;
|
|
496
477
|
|
|
497
|
-
await selectDefault(
|
|
478
|
+
await selectDefault(rootItems);
|
|
498
479
|
} else if (isPageFragment(node)) {
|
|
499
480
|
this.state.pageFragmentLength -= 1;
|
|
500
481
|
|
|
501
|
-
await selectDefault(
|
|
482
|
+
await selectDefault(rootItems);
|
|
502
483
|
} else {
|
|
503
484
|
await this.select(parent);
|
|
504
485
|
stage?.select(parent.id);
|
|
@@ -529,7 +510,10 @@ class Editor extends BaseService {
|
|
|
529
510
|
this.emit('remove', nodes);
|
|
530
511
|
}
|
|
531
512
|
|
|
532
|
-
public async doUpdate(
|
|
513
|
+
public async doUpdate(
|
|
514
|
+
config: MNode,
|
|
515
|
+
{ changeRecords = [] }: { changeRecords?: ChangeRecord[] } = {},
|
|
516
|
+
): Promise<{ newNode: MNode; oldNode: MNode; changeRecords?: ChangeRecord[] }> {
|
|
533
517
|
const root = this.get('root');
|
|
534
518
|
if (!root) throw new Error('root为空');
|
|
535
519
|
|
|
@@ -539,7 +523,7 @@ class Editor extends BaseService {
|
|
|
539
523
|
|
|
540
524
|
if (!info.node) throw new Error(`获取不到id为${config.id}的节点`);
|
|
541
525
|
|
|
542
|
-
const node =
|
|
526
|
+
const node = toRaw(info.node);
|
|
543
527
|
|
|
544
528
|
let newConfig = await this.toggleFixedPosition(toRaw(config), node, root);
|
|
545
529
|
|
|
@@ -561,7 +545,11 @@ class Editor extends BaseService {
|
|
|
561
545
|
|
|
562
546
|
if (newConfig.type === NodeType.ROOT) {
|
|
563
547
|
this.set('root', newConfig as MApp);
|
|
564
|
-
return
|
|
548
|
+
return {
|
|
549
|
+
oldNode: node,
|
|
550
|
+
newNode: newConfig,
|
|
551
|
+
changeRecords,
|
|
552
|
+
};
|
|
565
553
|
}
|
|
566
554
|
|
|
567
555
|
const { parent } = info;
|
|
@@ -586,11 +574,7 @@ class Editor extends BaseService {
|
|
|
586
574
|
nodes.splice(targetIndex, 1, newConfig);
|
|
587
575
|
this.set('nodes', [...nodes]);
|
|
588
576
|
|
|
589
|
-
|
|
590
|
-
config: cloneDeep(newConfig),
|
|
591
|
-
parentId: parent.id,
|
|
592
|
-
root: cloneDeep(root),
|
|
593
|
-
});
|
|
577
|
+
// update后会触发依赖收集,收集完后会掉stage.update方法
|
|
594
578
|
|
|
595
579
|
if (isPage(newConfig) || isPageFragment(newConfig)) {
|
|
596
580
|
this.set('page', newConfig as MPage | MPageFragment);
|
|
@@ -598,7 +582,11 @@ class Editor extends BaseService {
|
|
|
598
582
|
|
|
599
583
|
this.addModifiedNodeId(newConfig.id);
|
|
600
584
|
|
|
601
|
-
return
|
|
585
|
+
return {
|
|
586
|
+
oldNode: node,
|
|
587
|
+
newNode: newConfig,
|
|
588
|
+
changeRecords,
|
|
589
|
+
};
|
|
602
590
|
}
|
|
603
591
|
|
|
604
592
|
/**
|
|
@@ -606,17 +594,20 @@ class Editor extends BaseService {
|
|
|
606
594
|
* @param config 新的节点配置,配置中需要有id信息
|
|
607
595
|
* @returns 更新后的节点配置
|
|
608
596
|
*/
|
|
609
|
-
public async update(
|
|
597
|
+
public async update(
|
|
598
|
+
config: MNode | MNode[],
|
|
599
|
+
data: { changeRecords?: ChangeRecord[] } = {},
|
|
600
|
+
): Promise<MNode | MNode[]> {
|
|
610
601
|
const nodes = Array.isArray(config) ? config : [config];
|
|
611
602
|
|
|
612
|
-
const
|
|
603
|
+
const updateData = await Promise.all(nodes.map((node) => this.doUpdate(node, data)));
|
|
613
604
|
|
|
614
|
-
if (
|
|
605
|
+
if (updateData[0].oldNode?.type !== NodeType.ROOT) {
|
|
615
606
|
this.pushHistoryState();
|
|
616
607
|
}
|
|
617
608
|
|
|
618
|
-
this.emit('update',
|
|
619
|
-
return Array.isArray(config) ?
|
|
609
|
+
this.emit('update', updateData);
|
|
610
|
+
return Array.isArray(config) ? updateData.map((item) => item.newNode) : updateData[0].newNode;
|
|
620
611
|
}
|
|
621
612
|
|
|
622
613
|
/**
|
|
@@ -863,7 +854,7 @@ class Editor extends BaseService {
|
|
|
863
854
|
|
|
864
855
|
const layout = await this.getLayout(target);
|
|
865
856
|
|
|
866
|
-
const newConfig = mergeWith(cloneDeep(node), config, (
|
|
857
|
+
const newConfig = mergeWith(cloneDeep(node), config, (_objValue, srcValue) => {
|
|
867
858
|
if (Array.isArray(srcValue)) {
|
|
868
859
|
return srcValue;
|
|
869
860
|
}
|
|
@@ -875,7 +866,11 @@ class Editor extends BaseService {
|
|
|
875
866
|
await stage.select(targetId);
|
|
876
867
|
|
|
877
868
|
const targetParent = this.getParentById(target.id);
|
|
878
|
-
await stage.update({
|
|
869
|
+
await stage.update({
|
|
870
|
+
config: cloneDeep(target),
|
|
871
|
+
parentId: targetParent?.id,
|
|
872
|
+
root: cloneDeep(root),
|
|
873
|
+
});
|
|
879
874
|
|
|
880
875
|
await this.select(newConfig);
|
|
881
876
|
stage.select(newConfig.id);
|
package/src/services/storage.ts
CHANGED
package/src/services/ui.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
$theme-color: #2882e0;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
$font-color: #313a40;
|
|
4
|
+
$border-color: #d9dbdd;
|
|
5
|
+
$hover-color: #f3f5f9;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
$nav-height: 35px;
|
|
8
|
+
$nav-color: #313a40;
|
|
9
|
+
$nav--background-color: #ffffff;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
$sidebar-heder-background-color: $theme-color;
|
|
12
|
+
$sidebar-content-background-color: #ffffff;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
$page-bar-height: 32px;
|
|
15
|
+
|
|
16
|
+
$props-style-panel-width: 300px;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.ui-component-panel {
|
|
2
4
|
&.tmagic-design-collapse {
|
|
3
5
|
border-top: 0 !important;
|
|
4
6
|
margin-top: 48px;
|
|
5
|
-
background-color:
|
|
7
|
+
background-color: $sidebar-content-background-color;
|
|
6
8
|
|
|
7
9
|
.tmagic-design-collapse-item {
|
|
8
10
|
> div:first-of-type {
|
|
9
|
-
border-bottom: 1px solid
|
|
11
|
+
border-bottom: 1px solid $border-color;
|
|
10
12
|
margin-bottom: 10px;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
.el-collapse-item__header,
|
|
15
17
|
.t-collapse-panel__header {
|
|
16
|
-
background:
|
|
17
|
-
color:
|
|
18
|
+
background: $sidebar-content-background-color;
|
|
19
|
+
color: $font-color;
|
|
18
20
|
height: 25px;
|
|
19
21
|
line-height: 25px;
|
|
20
22
|
padding-left: 10px;
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
|
|
29
31
|
.el-collapse-item__wrap,
|
|
30
32
|
.t-collapse-panel__body {
|
|
31
|
-
background:
|
|
33
|
+
background: $sidebar-content-background-color;
|
|
32
34
|
border-bottom: 0;
|
|
33
35
|
|
|
34
36
|
.el-collapse-item__content,
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
text-overflow: ellipsis;
|
|
45
47
|
margin: 5px 10px;
|
|
46
48
|
box-sizing: border-box;
|
|
47
|
-
color:
|
|
49
|
+
color: $font-color;
|
|
48
50
|
flex-direction: column;
|
|
49
51
|
width: 42px;
|
|
50
52
|
cursor: pointer;
|
|
@@ -57,7 +59,7 @@
|
|
|
57
59
|
line-height: 40px;
|
|
58
60
|
border-radius: 5px;
|
|
59
61
|
color: #909090;
|
|
60
|
-
border: 1px solid
|
|
62
|
+
border: 1px solid $border-color;
|
|
61
63
|
display: flex;
|
|
62
64
|
justify-content: space-evenly;
|
|
63
65
|
align-items: center;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.magic-editor-content-menu {
|
|
2
4
|
position: fixed;
|
|
3
5
|
font-size: 12px;
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
|
|
30
32
|
.el-button--text,
|
|
31
33
|
i {
|
|
32
|
-
color:
|
|
34
|
+
color: $font-color;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.magic-editor-icon {
|
|
@@ -46,20 +48,20 @@
|
|
|
46
48
|
|
|
47
49
|
&.button {
|
|
48
50
|
&:hover {
|
|
49
|
-
background-color:
|
|
51
|
+
background-color: $hover-color;
|
|
50
52
|
.tmagic-design-button,
|
|
51
53
|
.tmagic-design-button:active,
|
|
52
54
|
.tmagic-design-button:focus {
|
|
53
|
-
color:
|
|
55
|
+
color: $font-color;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
&.menu-item i {
|
|
57
|
-
color:
|
|
59
|
+
color: $font-color;
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
&.active {
|
|
62
|
-
background-color:
|
|
64
|
+
background-color: $theme-color;
|
|
63
65
|
.tmagic-design-button,
|
|
64
66
|
.tmagic-design-button:active,
|
|
65
67
|
.tmagic-design-button:focus {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.m-editor-float-box {
|
|
2
4
|
position: absolute;
|
|
3
5
|
background-color: #fff;
|
|
4
6
|
z-index: 100;
|
|
5
|
-
border: 1px solid
|
|
7
|
+
border: 1px solid $border-color;
|
|
6
8
|
display: flex;
|
|
7
9
|
flex-direction: column;
|
|
8
10
|
max-height: 100%;
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
display: flex;
|
|
18
20
|
justify-content: space-between;
|
|
19
21
|
align-items: center;
|
|
20
|
-
border-bottom: 1px solid
|
|
22
|
+
border-bottom: 1px solid $border-color;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
.m-editor-float-box-body {
|
package/src/theme/framework.scss
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.m-editor {
|
|
2
4
|
display: flex;
|
|
3
5
|
flex-direction: column;
|
|
4
6
|
width: 100%;
|
|
5
7
|
|
|
6
8
|
&-content {
|
|
7
|
-
height: calc(100% - #{
|
|
9
|
+
height: calc(100% - #{$nav-height});
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
&-framework-center {
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
&-framework-left {
|
|
17
|
-
background-color:
|
|
19
|
+
background-color: $sidebar-content-background-color;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
&-framework-center .el-scrollbar__view {
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
justify-content: center;
|
|
33
35
|
align-items: center;
|
|
34
36
|
flex-direction: column;
|
|
35
|
-
height: calc(100% - #{
|
|
37
|
+
height: calc(100% - #{$page-bar-height});
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
&-content {
|
|
@@ -61,8 +63,8 @@
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
&:hover {
|
|
64
|
-
border-color:
|
|
65
|
-
color:
|
|
66
|
+
border-color: $theme-color;
|
|
67
|
+
color: $theme-color;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
}
|
package/src/theme/index.scss
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@import "./theme.scss";
|
|
1
|
+
@use "@tmagic/design/src/theme/index.scss" as tMagicDesign;
|
|
2
|
+
@use "@tmagic/table/src/theme/index.scss" as tMagicTable;
|
|
3
|
+
@use "@tmagic/form/src/theme/index.scss" as tMagicForm;
|
|
4
|
+
@use "./theme.scss";
|
|
6
5
|
|
|
7
6
|
.fade-enter-active,
|
|
8
7
|
.fade-leave-active {
|
package/src/theme/key-value.scss
CHANGED
package/src/theme/layout.scss
CHANGED
package/src/theme/nav-menu.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.m-editor-nav-menu {
|
|
2
4
|
display: flex;
|
|
3
5
|
z-index: 5;
|
|
@@ -5,13 +7,13 @@
|
|
|
5
7
|
justify-content: space-between;
|
|
6
8
|
-webkit-box-align: center;
|
|
7
9
|
align-items: center;
|
|
8
|
-
background-color:
|
|
10
|
+
background-color: $nav--background-color;
|
|
9
11
|
font-size: 19.2px;
|
|
10
|
-
color:
|
|
12
|
+
color: $nav-color;
|
|
11
13
|
font-weight: 400;
|
|
12
14
|
box-sizing: border-box;
|
|
13
15
|
margin: 0px;
|
|
14
|
-
flex: 0 0
|
|
16
|
+
flex: 0 0 $nav-height;
|
|
15
17
|
border-bottom: 1px solid #d8dee8;
|
|
16
18
|
|
|
17
19
|
> div {
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.is-text > i {
|
|
57
|
-
color:
|
|
59
|
+
color: $font-color;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
.icon {
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
.menu-item-text {
|
|
69
|
-
color:
|
|
71
|
+
color: $nav-color;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
&.rule {
|
package/src/theme/page-bar.scss
CHANGED
|
@@ -1,45 +1,34 @@
|
|
|
1
|
+
@use "common/var" as *;
|
|
2
|
+
|
|
1
3
|
.m-editor-page-bar-tabs {
|
|
2
4
|
position: fixed;
|
|
3
5
|
bottom: 0;
|
|
4
6
|
left: 0;
|
|
5
7
|
width: 100%;
|
|
6
|
-
|
|
7
|
-
.tmagic-design-button.m-editor-page-bar-switch-type-button {
|
|
8
|
-
margin-left: 10px;
|
|
9
|
-
position: relative;
|
|
10
|
-
top: 1px;
|
|
11
|
-
border-radius: 3px 3px 0 0;
|
|
12
|
-
border: 1px solid $--border-color;
|
|
13
|
-
border-bottom: 1px solid transparent;
|
|
14
|
-
padding: 5px 10px;
|
|
15
|
-
|
|
16
|
-
&.active {
|
|
17
|
-
background-color: #f3f3f3;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
8
|
+
user-select: none;
|
|
20
9
|
}
|
|
21
10
|
|
|
22
11
|
.m-editor-page-list-item {
|
|
23
12
|
display: flex;
|
|
24
13
|
width: 100%;
|
|
25
|
-
height:
|
|
26
|
-
line-height:
|
|
27
|
-
color:
|
|
14
|
+
height: $page-bar-height;
|
|
15
|
+
line-height: $page-bar-height;
|
|
16
|
+
color: $font-color;
|
|
28
17
|
z-index: 2;
|
|
29
18
|
overflow: hidden;
|
|
30
19
|
&:hover {
|
|
31
|
-
background-color:
|
|
20
|
+
background-color: $hover-color;
|
|
32
21
|
}
|
|
33
22
|
}
|
|
34
23
|
|
|
35
24
|
.m-editor-page-bar {
|
|
36
25
|
display: flex;
|
|
37
26
|
width: 100%;
|
|
38
|
-
height:
|
|
39
|
-
line-height:
|
|
40
|
-
color:
|
|
27
|
+
height: $page-bar-height;
|
|
28
|
+
line-height: $page-bar-height;
|
|
29
|
+
color: $font-color;
|
|
41
30
|
background-color: #f3f3f3;
|
|
42
|
-
border-top: 1px solid
|
|
31
|
+
border-top: 1px solid $border-color;
|
|
43
32
|
z-index: 2;
|
|
44
33
|
overflow: hidden;
|
|
45
34
|
|
|
@@ -51,7 +40,7 @@
|
|
|
51
40
|
&-item {
|
|
52
41
|
padding: 0 10px;
|
|
53
42
|
cursor: pointer;
|
|
54
|
-
border-right: 1px solid
|
|
43
|
+
border-right: 1px solid $border-color;
|
|
55
44
|
display: flex;
|
|
56
45
|
justify-items: center;
|
|
57
46
|
align-items: center;
|
|
@@ -70,6 +59,11 @@
|
|
|
70
59
|
&-icon {
|
|
71
60
|
position: relative;
|
|
72
61
|
z-index: 1;
|
|
62
|
+
|
|
63
|
+
.icon-active {
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
color: $theme-color;
|
|
66
|
+
}
|
|
73
67
|
}
|
|
74
68
|
|
|
75
69
|
&-title {
|
|
@@ -78,6 +72,18 @@
|
|
|
78
72
|
white-space: nowrap;
|
|
79
73
|
overflow: hidden;
|
|
80
74
|
}
|
|
75
|
+
|
|
76
|
+
&-left-icon,
|
|
77
|
+
&-right-icon {
|
|
78
|
+
position: absolute;
|
|
79
|
+
right: 0;
|
|
80
|
+
top: 0;
|
|
81
|
+
height: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&-left-icon {
|
|
85
|
+
right: 34px;
|
|
86
|
+
}
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
|
|
@@ -91,13 +97,31 @@
|
|
|
91
97
|
transition: all 0.2s ease 0s;
|
|
92
98
|
padding: 5px 14px;
|
|
93
99
|
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
color: $--font-color;
|
|
100
|
+
.tmagic-design-button {
|
|
101
|
+
color: $font-color;
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
&:hover {
|
|
100
|
-
background-color:
|
|
105
|
+
background-color: $hover-color;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.active {
|
|
109
|
+
.tmagic-design-button {
|
|
110
|
+
color: $theme-color;
|
|
111
|
+
}
|
|
101
112
|
}
|
|
102
113
|
}
|
|
103
114
|
}
|
|
115
|
+
|
|
116
|
+
.m-editor-page-bar-search-panel {
|
|
117
|
+
position: absolute;
|
|
118
|
+
bottom: $page-bar-height;
|
|
119
|
+
border: 1px solid $border-color;
|
|
120
|
+
padding: 6px 10px;
|
|
121
|
+
width: 100%;
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
|
|
124
|
+
.tmagic-design-form-item {
|
|
125
|
+
margin-bottom: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|