@tmagic/editor 1.8.0-beta.2 → 1.8.0-beta.21
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/es/Editor.vue_vue_type_script_setup_true_lang.js +43 -9
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +22 -98
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +32 -9
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +68 -17
- package/dist/es/components/Icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/Resizer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollBar.js +0 -1
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ScrollViewer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SearchInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/SplitView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/es/components/Tree.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/TreeNode.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/components/ViewForm.js +5 -0
- package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/es/editorProps.js +9 -1
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +16 -5
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +81 -44
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +10 -3
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +7 -19
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +13 -6
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +11 -8
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +39 -12
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +11 -20
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +11 -6
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +30 -14
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +11 -4
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +38 -6
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +156 -155
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +8 -10
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +28 -6
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +31 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +50 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +50 -0
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +7 -7
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +6 -3
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +29 -6
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +32 -6
- package/dist/es/fields/StyleSetter/icons/display/Block.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/Flex.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/Inline.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/InlineBlock.js +1 -1
- package/dist/es/fields/StyleSetter/icons/display/None.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +11 -3
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +11 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +17 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +19 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +19 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +37 -3
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +33 -3
- package/dist/es/fields/StyleSetter/icons/text-align/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/Left.js +1 -1
- package/dist/es/fields/StyleSetter/icons/text-align/Right.js +1 -1
- package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +56 -30
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +35 -26
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +76 -48
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -23
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +7 -4
- package/dist/es/fields/UISelect.js +0 -1
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +5 -2
- package/dist/es/hooks/use-code-block-edit.js +6 -3
- package/dist/es/hooks/use-compare-form.js +119 -0
- package/dist/es/hooks/use-data-source-edit.js +5 -2
- package/dist/es/hooks/use-stage.js +9 -4
- package/dist/es/icons/CenterIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/icons/CodeIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/icons/DatasourceIcon.js +17 -0
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/index.js +24 -10
- package/dist/es/initService.js +19 -13
- package/dist/es/layouts/AddPageBox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +24 -12
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +25 -18
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/es/layouts/NavMenuColumn.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +25 -38
- package/dist/es/layouts/history-list/BucketTab.js +5 -0
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +177 -88
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +139 -37
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +164 -107
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +44 -9
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +49 -53
- package/dist/es/layouts/history-list/composables.js +138 -108
- package/dist/es/layouts/history-list/useHistoryList.js +56 -0
- package/dist/es/layouts/history-list/useHistoryRevert.js +317 -0
- package/dist/es/layouts/page-bar/AddButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/es/layouts/page-bar/PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/PageList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/page-bar/Search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +50 -7
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +33 -13
- package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
- package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +26 -38
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +19 -4
- package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +23 -6
- package/dist/es/layouts/sidebar/data-source/DataSourceList.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +27 -5
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +19 -4
- package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.js +5 -0
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
- package/dist/es/layouts/sidebar/layer/use-node-status.js +2 -2
- package/dist/es/layouts/workspace/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/Workspace.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/workspace/viewer/StageOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/es/plugin.js +5 -2
- package/dist/es/services/codeBlock.js +137 -56
- package/dist/es/services/dataSource.js +122 -52
- package/dist/es/services/dep.js +162 -41
- package/dist/es/services/editor.js +613 -179
- package/dist/es/services/events.js +2 -2
- package/dist/es/services/history.js +350 -386
- package/dist/es/services/keybinding.js +6 -6
- package/dist/es/services/props.js +3 -2
- package/dist/es/services/storage.js +2 -2
- package/dist/es/services/ui.js +10 -2
- package/dist/es/style.css +549 -113
- package/dist/es/utils/config.js +4 -1
- package/dist/es/utils/const.js +2 -2
- package/dist/es/utils/content-menu.js +19 -11
- package/dist/es/utils/data-source/index.js +34 -11
- package/dist/es/utils/dep/collect-worker-client.js +114 -0
- package/dist/es/utils/dep/idle-task.js +70 -22
- package/dist/es/utils/dep/worker.js +1 -1
- package/dist/es/utils/editor.js +103 -49
- package/dist/es/utils/event.js +135 -0
- package/dist/es/utils/history.js +220 -0
- package/dist/es/utils/indexed-db.js +86 -0
- package/dist/es/utils/monaco-editor.js +22 -6
- package/dist/es/utils/operator.js +2 -2
- package/dist/es/utils/props.js +114 -33
- package/dist/es/utils/type-match-rules.js +367 -0
- package/dist/es/utils/undo-redo.js +60 -1
- package/dist/style.css +549 -113
- package/dist/themes/magic-admin.css +3028 -0
- package/dist/tmagic-editor.umd.cjs +14403 -10121
- package/package.json +8 -8
- package/src/Editor.vue +43 -2
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CompareForm.vue +18 -146
- package/src/components/ContentMenu.vue +44 -8
- package/src/components/FloatingBox.vue +84 -9
- package/src/components/ScrollBar.vue +0 -67
- package/src/components/ToolButton.vue +2 -2
- package/src/components/ViewForm.vue +55 -0
- package/src/editorProps.ts +30 -0
- package/src/fields/Code.vue +10 -2
- package/src/fields/CodeLink.vue +2 -5
- package/src/fields/CodeSelect.vue +54 -40
- package/src/fields/CodeSelectCol.vue +8 -1
- package/src/fields/CondOpSelect.vue +2 -24
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +16 -2
- package/src/fields/DataSourceFieldSelect/Index.vue +14 -5
- package/src/fields/DataSourceFields.vue +42 -8
- package/src/fields/DataSourceInput.vue +10 -28
- package/src/fields/DataSourceMethodSelect.vue +9 -4
- package/src/fields/DataSourceMethods.vue +42 -21
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/fields/DisplayConds.vue +18 -1
- package/src/fields/EventSelect.vue +152 -166
- package/src/fields/StyleSetter/Index.vue +3 -12
- package/src/fields/StyleSetter/components/Border.vue +15 -6
- package/src/fields/StyleSetter/icons/align-items/Center.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexEnd.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/FlexStart.vue +19 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceAround.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/SpaceBetween.vue +34 -0
- package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
- package/src/fields/StyleSetter/icons/background-repeat/NoRepeat.vue +20 -4
- package/src/fields/StyleSetter/icons/background-repeat/Repeat.vue +10 -28
- package/src/fields/StyleSetter/icons/background-repeat/RepeatX.vue +4 -5
- package/src/fields/StyleSetter/icons/background-repeat/RepeatY.vue +4 -5
- package/src/fields/StyleSetter/icons/flex-direction/Column.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/ColumnReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/Row.vue +4 -3
- package/src/fields/StyleSetter/icons/flex-direction/RowReverse.vue +4 -3
- package/src/fields/StyleSetter/icons/justify-content/Center.vue +5 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexEnd.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/FlexStart.vue +15 -2
- package/src/fields/StyleSetter/icons/justify-content/SpaceAround.vue +28 -3
- package/src/fields/StyleSetter/icons/justify-content/SpaceBetween.vue +28 -2
- package/src/fields/StyleSetter/pro/Background.vue +99 -55
- package/src/fields/StyleSetter/pro/Border.vue +9 -11
- package/src/fields/StyleSetter/pro/Font.vue +66 -64
- package/src/fields/StyleSetter/pro/Layout.vue +211 -139
- package/src/fields/StyleSetter/pro/Position.vue +69 -67
- package/src/fields/StyleSetter/pro/Transform.vue +23 -25
- package/src/fields/UISelect.vue +0 -12
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-code-block-edit.ts +4 -3
- package/src/hooks/use-compare-form.ts +187 -0
- package/src/hooks/use-data-source-edit.ts +2 -2
- package/src/hooks/use-stage.ts +5 -3
- package/src/icons/DatasourceIcon.vue +7 -0
- package/src/index.ts +12 -0
- package/src/initService.ts +26 -16
- package/src/layouts/CodeEditor.vue +34 -11
- package/src/layouts/Framework.vue +15 -8
- package/src/layouts/NavMenu.vue +3 -3
- package/src/layouts/history-list/Bucket.vue +33 -41
- package/src/layouts/history-list/BucketTab.vue +72 -0
- package/src/layouts/history-list/GroupRow.vue +190 -93
- package/src/layouts/history-list/HistoryDiffDialog.vue +169 -90
- package/src/layouts/history-list/HistoryListPanel.vue +191 -95
- package/src/layouts/history-list/InitialRow.vue +38 -8
- package/src/layouts/history-list/PageTab.vue +67 -43
- package/src/layouts/history-list/composables.ts +239 -125
- package/src/layouts/history-list/useHistoryList.ts +60 -0
- package/src/layouts/history-list/useHistoryRevert.ts +425 -0
- package/src/layouts/page-bar/PageBar.vue +4 -2
- package/src/layouts/props-panel/FormPanel.vue +72 -6
- package/src/layouts/props-panel/PropsPanel.vue +62 -18
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/ComponentListPanel.vue +10 -6
- package/src/layouts/sidebar/Sidebar.vue +13 -6
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +5 -5
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +5 -2
- package/src/layouts/sidebar/code-block/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +34 -2
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +29 -4
- package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/layer/LayerMenu.vue +21 -13
- package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
- package/src/layouts/sidebar/layer/LayerNodeTool.vue +7 -4
- package/src/layouts/sidebar/layer/LayerPanel.vue +4 -1
- package/src/layouts/sidebar/layer/use-click.ts +3 -3
- package/src/layouts/sidebar/layer/use-node-status.ts +2 -2
- package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
- package/src/layouts/workspace/viewer/Stage.vue +1 -1
- package/src/layouts/workspace/viewer/ViewerMenu.vue +15 -15
- package/src/plugin.ts +6 -3
- package/src/services/codeBlock.ts +152 -47
- package/src/services/dataSource.ts +120 -41
- package/src/services/dep.ts +292 -47
- package/src/services/editor.ts +820 -224
- package/src/services/events.ts +3 -3
- package/src/services/history.ts +449 -412
- package/src/services/keybinding.ts +6 -6
- package/src/services/ui.ts +33 -5
- package/src/theme/code-block.scss +37 -0
- package/src/theme/common/var.scss +1 -1
- package/src/theme/component-list-panel.scss +2 -2
- package/src/theme/data-source-field.scss +4 -0
- package/src/theme/display-conds.scss +11 -0
- package/src/theme/event.scss +70 -1
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/framework.scss +4 -1
- package/src/theme/history-list-panel.scss +157 -23
- package/src/theme/layer-node-content.scss +14 -0
- package/src/theme/nav-menu.scss +5 -1
- package/src/theme/page-bar.scss +0 -4
- package/src/theme/props-panel.scss +5 -4
- package/src/theme/scroll-bar.scss +64 -0
- package/src/theme/style-setter/border.scss +17 -5
- package/src/theme/theme.scss +4 -0
- package/src/theme/themes/magic-admin/index.scss +214 -0
- package/src/theme/ui-select.scss +9 -0
- package/src/type.ts +668 -124
- package/src/utils/config.ts +9 -1
- package/src/utils/const.ts +3 -2
- package/src/utils/content-menu.ts +20 -11
- package/src/utils/data-source/index.ts +32 -12
- package/src/utils/dep/collect-worker-client.ts +149 -0
- package/src/utils/dep/idle-task.ts +104 -35
- package/src/utils/dep/worker.ts +113 -9
- package/src/utils/editor.ts +166 -60
- package/src/utils/event.ts +237 -0
- package/src/utils/history.ts +286 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/indexed-db.ts +122 -0
- package/src/utils/monaco-editor.ts +27 -0
- package/src/utils/operator.ts +2 -2
- package/src/utils/props.ts +114 -11
- package/src/utils/type-match-rules.ts +684 -0
- package/src/utils/undo-redo.ts +88 -0
- package/types/index.d.ts +1990 -517
- package/dist/es/layouts/history-list/CodeBlockTab.js +0 -5
- package/dist/es/layouts/history-list/CodeBlockTab.vue_vue_type_script_setup_true_lang.js +0 -62
- package/dist/es/layouts/history-list/DataSourceTab.js +0 -5
- package/dist/es/layouts/history-list/DataSourceTab.vue_vue_type_script_setup_true_lang.js +0 -62
- package/src/layouts/history-list/CodeBlockTab.vue +0 -61
- package/src/layouts/history-list/DataSourceTab.vue +0 -61
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import KeyController, { KeyControllerEvent } from 'keycon';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { isPageOrFragment } from '@tmagic/utils';
|
|
4
4
|
|
|
5
5
|
import { KeyBindingCacheItem, KeyBindingCommand, KeyBindingItem } from '@editor/type';
|
|
6
6
|
|
|
@@ -19,8 +19,8 @@ class Keybinding extends BaseService {
|
|
|
19
19
|
[KeyBindingCommand.DELETE_NODE]: () => {
|
|
20
20
|
const nodes = editorService.get('nodes');
|
|
21
21
|
|
|
22
|
-
if (!nodes ||
|
|
23
|
-
editorService.remove(nodes);
|
|
22
|
+
if (!nodes || isPageOrFragment(nodes[0])) return;
|
|
23
|
+
editorService.remove(nodes, { historySource: 'shortcut' });
|
|
24
24
|
},
|
|
25
25
|
[KeyBindingCommand.COPY_NODE]: () => {
|
|
26
26
|
const nodes = editorService.get('nodes');
|
|
@@ -29,13 +29,13 @@ class Keybinding extends BaseService {
|
|
|
29
29
|
[KeyBindingCommand.CUT_NODE]: () => {
|
|
30
30
|
const nodes = editorService.get('nodes');
|
|
31
31
|
|
|
32
|
-
if (!nodes ||
|
|
32
|
+
if (!nodes || isPageOrFragment(nodes[0])) return;
|
|
33
33
|
editorService.copy(nodes);
|
|
34
|
-
editorService.remove(nodes);
|
|
34
|
+
editorService.remove(nodes, { historySource: 'shortcut' });
|
|
35
35
|
},
|
|
36
36
|
[KeyBindingCommand.PASTE_NODE]: () => {
|
|
37
37
|
const nodes = editorService.get('nodes');
|
|
38
|
-
nodes && editorService.paste({ offsetX: 10, offsetY: 10 });
|
|
38
|
+
nodes && editorService.paste({ offsetX: 10, offsetY: 10 }, undefined, { historySource: 'shortcut' });
|
|
39
39
|
},
|
|
40
40
|
[KeyBindingCommand.UNDO]: () => {
|
|
41
41
|
editorService.undo();
|
package/src/services/ui.ts
CHANGED
|
@@ -27,6 +27,9 @@ import {
|
|
|
27
27
|
DEFAULT_LEFT_COLUMN_WIDTH,
|
|
28
28
|
DEFAULT_RIGHT_COLUMN_WIDTH,
|
|
29
29
|
LEFT_COLUMN_WIDTH_STORAGE_KEY,
|
|
30
|
+
MIN_CENTER_COLUMN_WIDTH,
|
|
31
|
+
MIN_LEFT_COLUMN_WIDTH,
|
|
32
|
+
MIN_RIGHT_COLUMN_WIDTH,
|
|
30
33
|
RIGHT_COLUMN_WIDTH_STORAGE_KEY,
|
|
31
34
|
} from '@editor/utils/const';
|
|
32
35
|
|
|
@@ -46,14 +49,18 @@ const state = shallowReactive<UiState>({
|
|
|
46
49
|
width: 375,
|
|
47
50
|
height: 817,
|
|
48
51
|
},
|
|
52
|
+
// 先给 columnWidth 留占位,真正的 clamp 逻辑在 state 创建完成后
|
|
53
|
+
// 用 state.minLeftColumnWidth / state.minRightColumnWidth 作为下限重新赋值 —
|
|
54
|
+
// 这样以后从外部(比如 uiService.set('minLeftColumnWidth', ...))动态改最小宽度,
|
|
55
|
+
// 只改一处 state 字段即可,不用同步 MIN_* 常量。
|
|
49
56
|
columnWidth: {
|
|
50
|
-
left:
|
|
51
|
-
storageService.getItem(LEFT_COLUMN_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) || DEFAULT_LEFT_COLUMN_WIDTH,
|
|
57
|
+
left: 0,
|
|
52
58
|
center: 0,
|
|
53
|
-
right:
|
|
54
|
-
storageService.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) ||
|
|
55
|
-
DEFAULT_RIGHT_COLUMN_WIDTH,
|
|
59
|
+
right: 0,
|
|
56
60
|
},
|
|
61
|
+
minLeftColumnWidth: MIN_LEFT_COLUMN_WIDTH,
|
|
62
|
+
minCenterColumnWidth: MIN_CENTER_COLUMN_WIDTH,
|
|
63
|
+
minRightColumnWidth: MIN_RIGHT_COLUMN_WIDTH,
|
|
57
64
|
showGuides: true,
|
|
58
65
|
hasGuides: false,
|
|
59
66
|
showRule: true,
|
|
@@ -62,6 +69,7 @@ const state = shallowReactive<UiState>({
|
|
|
62
69
|
showPageListButton: true,
|
|
63
70
|
hideSlideBar: false,
|
|
64
71
|
sideBarItems: [],
|
|
72
|
+
sideBarActiveTabName: '',
|
|
65
73
|
navMenuRect: {
|
|
66
74
|
left: 0,
|
|
67
75
|
top: 0,
|
|
@@ -76,6 +84,20 @@ const state = shallowReactive<UiState>({
|
|
|
76
84
|
},
|
|
77
85
|
});
|
|
78
86
|
|
|
87
|
+
// 左右两栏宽度延后初始化:
|
|
88
|
+
// - 优先取 storage 里用户上次拖到的值;storage 空时回落到 DEFAULT_*;
|
|
89
|
+
// - 再用 state.min*ColumnWidth 兜底,防止历史 storage 里存的是老版本或用户拖过头
|
|
90
|
+
// 留下的"比当前 min 还小"的数值。放到 state 之后写是因为初始化时无法在同一个
|
|
91
|
+
// 对象字面量里读到自己的其它字段。
|
|
92
|
+
state.columnWidth.left = Math.max(
|
|
93
|
+
storageService.getItem(LEFT_COLUMN_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) || DEFAULT_LEFT_COLUMN_WIDTH,
|
|
94
|
+
state.minLeftColumnWidth,
|
|
95
|
+
);
|
|
96
|
+
state.columnWidth.right = Math.max(
|
|
97
|
+
storageService.getItem(RIGHT_COLUMN_WIDTH_STORAGE_KEY, { protocol: Protocol.NUMBER }) || DEFAULT_RIGHT_COLUMN_WIDTH,
|
|
98
|
+
state.minRightColumnWidth,
|
|
99
|
+
);
|
|
100
|
+
|
|
79
101
|
const canUsePluginMethods = {
|
|
80
102
|
async: ['zoom', 'calcZoom'] as const,
|
|
81
103
|
sync: [] as const,
|
|
@@ -104,7 +126,13 @@ class Ui extends BaseService {
|
|
|
104
126
|
mask?.showRule(value as unknown as boolean);
|
|
105
127
|
}
|
|
106
128
|
|
|
129
|
+
const preValue = state[name];
|
|
130
|
+
|
|
107
131
|
state[name] = value;
|
|
132
|
+
|
|
133
|
+
if (preValue !== value) {
|
|
134
|
+
this.emit('state-change', name, value, preValue);
|
|
135
|
+
}
|
|
108
136
|
}
|
|
109
137
|
|
|
110
138
|
public get<K extends keyof UiState>(name: K) {
|
|
@@ -1,3 +1,40 @@
|
|
|
1
1
|
.m-fields-code-select {
|
|
2
2
|
width: 100%;
|
|
3
|
+
> .el-card.tmagic-design-card--flat {
|
|
4
|
+
background-color: transparent;
|
|
5
|
+
margin-bottom: 10px;
|
|
6
|
+
> .el-card__body {
|
|
7
|
+
padding-left: 0;
|
|
8
|
+
.code-select-content {
|
|
9
|
+
> .m-fields-group-list {
|
|
10
|
+
> .tmagic-design-card--flat.el-card {
|
|
11
|
+
padding-left: 16px;
|
|
12
|
+
padding-right: 16px;
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
border: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.el-card__body {
|
|
21
|
+
.tmagic-design-form-item {
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.code-select-content {
|
|
26
|
+
> .m-fields-group-list {
|
|
27
|
+
> .tmagic-design-card--flat {
|
|
28
|
+
> .el-card__header {
|
|
29
|
+
padding: 16px 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.create-button {
|
|
35
|
+
&.fullWidth {
|
|
36
|
+
width: 100%;
|
|
37
|
+
margin: 0 0 16px 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
3
40
|
}
|
package/src/theme/event.scss
CHANGED
|
@@ -2,8 +2,35 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
.fullWidth {
|
|
4
4
|
width: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
&.create-button {
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
&.m-container-ui-event {
|
|
10
|
+
width: calc(100% - 32px);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
.event-select-container {
|
|
14
|
+
padding: 0 16px;
|
|
15
|
+
> .el-card.tmagic-design-card--flat {
|
|
16
|
+
> .el-card__header {
|
|
17
|
+
border-bottom: 1px solid #ebeef5;
|
|
18
|
+
}
|
|
19
|
+
> .el-card__body {
|
|
20
|
+
padding-bottom: 16px;
|
|
21
|
+
.m-fields-group-list-footer {
|
|
22
|
+
div {
|
|
23
|
+
justify-content: flex-start !important;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
.el-card.tmagic-design-card--flat {
|
|
27
|
+
> .el-card__header {
|
|
28
|
+
padding: 16px 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
5
33
|
}
|
|
6
|
-
|
|
7
34
|
.event-select-code {
|
|
8
35
|
margin-left: 20px;
|
|
9
36
|
width: auto;
|
|
@@ -35,3 +62,45 @@
|
|
|
35
62
|
margin-right: 5px;
|
|
36
63
|
}
|
|
37
64
|
}
|
|
65
|
+
|
|
66
|
+
.event-select-container {
|
|
67
|
+
padding: 0 16px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.event-select-header {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
margin-bottom: 8px;
|
|
75
|
+
.event-select-title {
|
|
76
|
+
color: #0f1113;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
line-height: 24px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
.event-item-header {
|
|
83
|
+
position: relative;
|
|
84
|
+
width: 100%;
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
.event-item-title {
|
|
89
|
+
color: #0f1113;
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
line-height: 24px;
|
|
93
|
+
margin-bottom: 8px;
|
|
94
|
+
}
|
|
95
|
+
.event-item-delete-button {
|
|
96
|
+
color: #0f1113;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.el-form-item {
|
|
100
|
+
.el-form-item {
|
|
101
|
+
&.is-error {
|
|
102
|
+
margin-bottom: 18px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -25,10 +25,18 @@
|
|
|
25
25
|
.m-editor-float-box-body {
|
|
26
26
|
overflow: auto;
|
|
27
27
|
flex: 1;
|
|
28
|
-
padding: 0 16px;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
.m-editor-floating-box-moveable {
|
|
33
32
|
opacity: 0;
|
|
34
33
|
}
|
|
34
|
+
|
|
35
|
+
.m-editor-float-box-drag-mask {
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
background-color: transparent;
|
|
42
|
+
}
|
package/src/theme/framework.scss
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
width: 100%;
|
|
7
7
|
|
|
8
8
|
&-content {
|
|
9
|
-
|
|
9
|
+
// 与 nav-menu.scss 的 `--editor-nav-height` 联动:默认 fallback 到 SCSS
|
|
10
|
+
// `$nav-height`(35px),主题覆盖时两处会同时切成同一个高度,保证 nav 和
|
|
11
|
+
// 主内容区总高度 = 100%。
|
|
12
|
+
height: calc(100% - var(--editor-nav-height, #{$nav-height}));
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
&-framework-center {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
position: absolute;
|
|
14
14
|
top: 4px;
|
|
15
15
|
right: 4px;
|
|
16
|
-
z-index:
|
|
16
|
+
z-index: 2;
|
|
17
17
|
display: flex;
|
|
18
18
|
align-items: center;
|
|
19
19
|
height: 40px;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
color: #909399;
|
|
22
22
|
|
|
23
23
|
&:hover {
|
|
24
|
-
color: #409eff;
|
|
24
|
+
color: var(--el-color-primary, #409eff);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -45,6 +45,28 @@
|
|
|
45
45
|
list-style: none;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
// 历史列表工具条:放置「清空」等列表级操作,右对齐。
|
|
49
|
+
.m-editor-history-list-toolbar {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: flex-end;
|
|
53
|
+
padding: 0 4px 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 「清空」按钮:红色文字按钮,强调破坏性操作(点击后会二次确认)。
|
|
57
|
+
.m-editor-history-list-clear {
|
|
58
|
+
padding: 2px 8px;
|
|
59
|
+
border-radius: 4px;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
color: #f56c6c;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
user-select: none;
|
|
64
|
+
|
|
65
|
+
&:hover {
|
|
66
|
+
background-color: rgba(245, 108, 108, 0.12);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
48
70
|
.m-editor-history-list-item {
|
|
49
71
|
display: flex;
|
|
50
72
|
align-items: center;
|
|
@@ -74,7 +96,7 @@
|
|
|
74
96
|
// 故这里仅作用于「非合并组」的单步条目,避免与卡片样式互相干扰。
|
|
75
97
|
&.is-current:not(.m-editor-history-list-group.is-merged) {
|
|
76
98
|
background-color: rgba(64, 158, 255, 0.1);
|
|
77
|
-
box-shadow: inset 2px 0 0 #409eff;
|
|
99
|
+
box-shadow: inset 2px 0 0 var(--el-color-primary, #409eff);
|
|
78
100
|
|
|
79
101
|
&:hover {
|
|
80
102
|
background-color: rgba(64, 158, 255, 0.16);
|
|
@@ -82,7 +104,7 @@
|
|
|
82
104
|
|
|
83
105
|
.m-editor-history-list-item-desc {
|
|
84
106
|
font-weight: 600;
|
|
85
|
-
color: #409eff;
|
|
107
|
+
color: var(--el-color-primary, #409eff);
|
|
86
108
|
}
|
|
87
109
|
}
|
|
88
110
|
}
|
|
@@ -125,19 +147,19 @@
|
|
|
125
147
|
&.is-merged {
|
|
126
148
|
margin: 4px 0;
|
|
127
149
|
padding: 4px 8px 6px;
|
|
128
|
-
background-color: rgba(
|
|
129
|
-
border: 1px solid rgba(
|
|
130
|
-
border-left: 3px solid #
|
|
150
|
+
background-color: rgba(47, 84, 235, 0.06);
|
|
151
|
+
border: 1px solid rgba(47, 84, 235, 0.18);
|
|
152
|
+
border-left: 3px solid #2f54eb;
|
|
131
153
|
border-radius: 4px;
|
|
132
154
|
|
|
133
155
|
// 卡片本体已经有背景色,hover 状态以更深的同色提示交互
|
|
134
156
|
&:hover {
|
|
135
|
-
background-color: rgba(
|
|
157
|
+
background-color: rgba(47, 84, 235, 0.1);
|
|
136
158
|
}
|
|
137
159
|
|
|
138
160
|
.m-editor-history-list-group-head {
|
|
139
161
|
font-weight: 600;
|
|
140
|
-
color: #
|
|
162
|
+
color: #1d39c4;
|
|
141
163
|
}
|
|
142
164
|
|
|
143
165
|
// 已撤销态:整张卡片去色
|
|
@@ -155,11 +177,11 @@
|
|
|
155
177
|
&.is-current {
|
|
156
178
|
background-color: rgba(64, 158, 255, 0.08);
|
|
157
179
|
border-color: rgba(64, 158, 255, 0.3);
|
|
158
|
-
border-left-color: #409eff;
|
|
180
|
+
border-left-color: var(--el-color-primary, #409eff);
|
|
159
181
|
box-shadow: none; // 覆盖 .is-current 公共的 inset 阴影
|
|
160
182
|
|
|
161
183
|
.m-editor-history-list-group-head {
|
|
162
|
-
color: #409eff;
|
|
184
|
+
color: var(--el-color-primary, #409eff);
|
|
163
185
|
}
|
|
164
186
|
}
|
|
165
187
|
}
|
|
@@ -169,7 +191,7 @@
|
|
|
169
191
|
margin: 6px 0 0 6px;
|
|
170
192
|
padding: 0;
|
|
171
193
|
list-style: none;
|
|
172
|
-
border-left: 1px dashed rgba(
|
|
194
|
+
border-left: 1px dashed rgba(47, 84, 235, 0.45);
|
|
173
195
|
|
|
174
196
|
li {
|
|
175
197
|
display: flex;
|
|
@@ -185,7 +207,7 @@
|
|
|
185
207
|
cursor: pointer;
|
|
186
208
|
|
|
187
209
|
&:hover {
|
|
188
|
-
background-color: rgba(
|
|
210
|
+
background-color: rgba(47, 84, 235, 0.1);
|
|
189
211
|
}
|
|
190
212
|
}
|
|
191
213
|
|
|
@@ -194,7 +216,7 @@
|
|
|
194
216
|
}
|
|
195
217
|
|
|
196
218
|
&.is-current {
|
|
197
|
-
color: #409eff;
|
|
219
|
+
color: var(--el-color-primary, #409eff);
|
|
198
220
|
font-weight: 600;
|
|
199
221
|
background-color: rgba(64, 158, 255, 0.08);
|
|
200
222
|
border-radius: 3px;
|
|
@@ -209,12 +231,16 @@
|
|
|
209
231
|
font-size: 10px;
|
|
210
232
|
line-height: 16px;
|
|
211
233
|
color: #fff;
|
|
212
|
-
background-color: #409eff;
|
|
234
|
+
background-color: var(--el-color-primary, #409eff);
|
|
213
235
|
font-weight: 500;
|
|
214
236
|
}
|
|
215
237
|
|
|
216
238
|
.m-editor-history-list-item-index {
|
|
217
239
|
flex: 0 0 auto;
|
|
240
|
+
// 固定最小宽度并右对齐:序号位数不一(#6 / #16)时右边界仍统一,
|
|
241
|
+
// 使紧随其后的「类型」徽标在各行间对齐成整齐的一列。
|
|
242
|
+
min-width: 30px;
|
|
243
|
+
text-align: right;
|
|
218
244
|
color: #909399;
|
|
219
245
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
220
246
|
font-size: 11px;
|
|
@@ -222,6 +248,25 @@
|
|
|
222
248
|
white-space: nowrap;
|
|
223
249
|
}
|
|
224
250
|
|
|
251
|
+
// 合并组头部展示的是步骤区间(如 #10-#20),宽度本就不定、也无需与单步行对齐,
|
|
252
|
+
// 恢复自然宽度与左对齐,避免被强制成固定列后显得突兀。
|
|
253
|
+
.m-editor-history-list-group.is-merged
|
|
254
|
+
> .m-editor-history-list-group-head
|
|
255
|
+
> .m-editor-history-list-item-index {
|
|
256
|
+
min-width: 0;
|
|
257
|
+
text-align: left;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// 操作时间:弱化展示,紧贴在描述之后、各操作按钮之前。
|
|
261
|
+
.m-editor-history-list-item-time {
|
|
262
|
+
flex: 0 0 auto;
|
|
263
|
+
color: #a8abb2;
|
|
264
|
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
265
|
+
font-size: 11px;
|
|
266
|
+
font-weight: 400; // 防止被合并组头部的粗体继承
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
}
|
|
269
|
+
|
|
225
270
|
.m-editor-history-list-item-op {
|
|
226
271
|
flex: 0 0 auto;
|
|
227
272
|
padding: 0 6px;
|
|
@@ -240,7 +285,7 @@
|
|
|
240
285
|
}
|
|
241
286
|
|
|
242
287
|
&.op-update {
|
|
243
|
-
background-color: #
|
|
288
|
+
background-color: #e6a23c;
|
|
244
289
|
}
|
|
245
290
|
|
|
246
291
|
&.op-initial {
|
|
@@ -271,6 +316,48 @@
|
|
|
271
316
|
white-space: nowrap;
|
|
272
317
|
}
|
|
273
318
|
|
|
319
|
+
// 「操作途径」徽标:浅灰描边胶囊,弱化展示来源(画布 / 图层 / 配置面板…),不抢占描述焦点。
|
|
320
|
+
.m-editor-history-list-item-source {
|
|
321
|
+
flex: 0 0 auto;
|
|
322
|
+
padding: 0 6px;
|
|
323
|
+
border: 1px solid #dcdfe6;
|
|
324
|
+
border-radius: 8px;
|
|
325
|
+
font-size: 10px;
|
|
326
|
+
line-height: 14px;
|
|
327
|
+
color: #909399;
|
|
328
|
+
background-color: #f4f4f5;
|
|
329
|
+
white-space: nowrap;
|
|
330
|
+
font-weight: 400; // 防止被合并组头部的粗体继承
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// 「操作人」徽标:浅蓝描边胶囊,弱化展示操作人,仅在 step.operator 有值时渲染。
|
|
334
|
+
.m-editor-history-list-item-operator {
|
|
335
|
+
flex: 0 0 auto;
|
|
336
|
+
padding: 0 6px;
|
|
337
|
+
border: 1px solid #c6e2ff;
|
|
338
|
+
border-radius: 8px;
|
|
339
|
+
font-size: 10px;
|
|
340
|
+
line-height: 14px;
|
|
341
|
+
color: #409eff;
|
|
342
|
+
background-color: #ecf5ff;
|
|
343
|
+
white-space: nowrap;
|
|
344
|
+
font-weight: 400; // 防止被合并组头部的粗体继承
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// 「已保存」徽标:绿色实心胶囊,标记最近一次保存对应的历史记录(与 historyService.markSaved 对应)。
|
|
348
|
+
.m-editor-history-list-item-saved {
|
|
349
|
+
flex: 0 0 auto;
|
|
350
|
+
padding: 0 6px;
|
|
351
|
+
border-radius: 8px;
|
|
352
|
+
font-size: 10px;
|
|
353
|
+
line-height: 16px;
|
|
354
|
+
color: #fff;
|
|
355
|
+
background-color: #67c23a;
|
|
356
|
+
white-space: nowrap;
|
|
357
|
+
font-weight: 500;
|
|
358
|
+
letter-spacing: 0.2px;
|
|
359
|
+
}
|
|
360
|
+
|
|
274
361
|
// 「合并 N 步」徽标:紫色实心胶囊,与合并组卡片色系一致,醒目区分单步条目。
|
|
275
362
|
.m-editor-history-list-item-merge {
|
|
276
363
|
flex: 0 0 auto;
|
|
@@ -279,18 +366,36 @@
|
|
|
279
366
|
font-size: 10px;
|
|
280
367
|
line-height: 16px;
|
|
281
368
|
color: #fff;
|
|
282
|
-
background-color: #
|
|
369
|
+
background-color: #2f54eb;
|
|
283
370
|
font-weight: 500;
|
|
284
371
|
letter-spacing: 0.2px;
|
|
285
372
|
}
|
|
286
373
|
|
|
374
|
+
// 操作区:把「回滚 / 回到 / 查看差异」收敛为一个统一容器,默认隐藏,
|
|
375
|
+
// 仅在指针悬停于所在行时显示。静止状态下每行最右侧固定为「时间」,
|
|
376
|
+
// 各行因此能对齐成整齐的右侧列,避免按钮数量不一导致的参差错乱。
|
|
377
|
+
.m-editor-history-list-item-actions {
|
|
378
|
+
display: none;
|
|
379
|
+
flex: 0 0 auto;
|
|
380
|
+
align-items: center;
|
|
381
|
+
gap: 6px;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.m-editor-history-list-group-head:hover > .m-editor-history-list-item-actions,
|
|
385
|
+
.m-editor-history-list-substeps
|
|
386
|
+
> li:hover
|
|
387
|
+
> .m-editor-history-list-item-actions,
|
|
388
|
+
.m-editor-history-list-initial:hover > .m-editor-history-list-item-actions {
|
|
389
|
+
display: flex;
|
|
390
|
+
}
|
|
391
|
+
|
|
287
392
|
.m-editor-history-list-item-diff {
|
|
288
393
|
flex: 0 0 auto;
|
|
289
394
|
padding: 0 6px;
|
|
290
395
|
border-radius: 2px;
|
|
291
396
|
font-size: 10px;
|
|
292
397
|
line-height: 16px;
|
|
293
|
-
color: #409eff;
|
|
398
|
+
color: var(--el-color-primary, #409eff);
|
|
294
399
|
background-color: rgba(64, 158, 255, 0.1);
|
|
295
400
|
cursor: pointer;
|
|
296
401
|
user-select: none;
|
|
@@ -300,21 +405,39 @@
|
|
|
300
405
|
}
|
|
301
406
|
}
|
|
302
407
|
|
|
408
|
+
// 「回到」按钮:将历史游标移动到该 step。使用绿色色系,
|
|
409
|
+
// 与红色「回滚」、蓝色「查看差异」区分,也避免与紧邻的灰色「来源」徽标混淆。
|
|
410
|
+
.m-editor-history-list-item-goto {
|
|
411
|
+
flex: 0 0 auto;
|
|
412
|
+
padding: 0 6px;
|
|
413
|
+
border-radius: 2px;
|
|
414
|
+
font-size: 10px;
|
|
415
|
+
line-height: 16px;
|
|
416
|
+
color: #529b2e;
|
|
417
|
+
background-color: rgba(103, 194, 58, 0.12);
|
|
418
|
+
cursor: pointer;
|
|
419
|
+
user-select: none;
|
|
420
|
+
|
|
421
|
+
&:hover {
|
|
422
|
+
background-color: rgba(103, 194, 58, 0.24);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
303
426
|
// 「回滚」按钮:类 git revert,把目标 step 反向应用一次作为新提交。
|
|
304
|
-
//
|
|
427
|
+
// 使用红色色调,强调其为"破坏性/可逆操作",与「查看差异」「跳转」区分开。
|
|
305
428
|
.m-editor-history-list-item-revert {
|
|
306
429
|
flex: 0 0 auto;
|
|
307
430
|
padding: 0 6px;
|
|
308
431
|
border-radius: 2px;
|
|
309
432
|
font-size: 10px;
|
|
310
433
|
line-height: 16px;
|
|
311
|
-
color: #
|
|
312
|
-
background-color: rgba(
|
|
434
|
+
color: #f56c6c;
|
|
435
|
+
background-color: rgba(245, 108, 108, 0.12);
|
|
313
436
|
cursor: pointer;
|
|
314
437
|
user-select: none;
|
|
315
438
|
|
|
316
439
|
&:hover {
|
|
317
|
-
background-color: rgba(
|
|
440
|
+
background-color: rgba(245, 108, 108, 0.25);
|
|
318
441
|
}
|
|
319
442
|
}
|
|
320
443
|
|
|
@@ -348,7 +471,7 @@
|
|
|
348
471
|
flex: 1 1 auto;
|
|
349
472
|
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
350
473
|
font-size: 11px;
|
|
351
|
-
color: #409eff;
|
|
474
|
+
color: var(--el-color-primary, #409eff);
|
|
352
475
|
overflow: hidden;
|
|
353
476
|
text-overflow: ellipsis;
|
|
354
477
|
white-space: nowrap;
|
|
@@ -369,6 +492,17 @@
|
|
|
369
492
|
flex-direction: column;
|
|
370
493
|
}
|
|
371
494
|
|
|
495
|
+
.m-editor-history-diff-dialog-notice {
|
|
496
|
+
margin-bottom: 8px;
|
|
497
|
+
padding: 8px 12px;
|
|
498
|
+
background-color: #fdf6ec;
|
|
499
|
+
border: 1px solid #faecd8;
|
|
500
|
+
border-radius: 4px;
|
|
501
|
+
color: #e6a23c;
|
|
502
|
+
font-size: 13px;
|
|
503
|
+
line-height: 1.5;
|
|
504
|
+
}
|
|
505
|
+
|
|
372
506
|
.m-editor-history-diff-dialog-header {
|
|
373
507
|
display: flex;
|
|
374
508
|
align-items: center;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.m-editor-layer-node-content {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
|
|
5
|
+
&.is-invalid .m-editor-layer-node-label {
|
|
6
|
+
color: var(--el-color-danger, #f56c6c);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.m-editor-layer-node-error-icon {
|
|
10
|
+
margin-left: 4px;
|
|
11
|
+
color: var(--el-color-danger, #f56c6c);
|
|
12
|
+
cursor: help;
|
|
13
|
+
}
|
|
14
|
+
}
|
package/src/theme/nav-menu.scss
CHANGED
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
font-weight: 400;
|
|
14
14
|
box-sizing: border-box;
|
|
15
15
|
margin: 0px;
|
|
16
|
-
|
|
16
|
+
// 用 CSS 变量做主题化开关:默认没设 `--editor-nav-height` 时回落到
|
|
17
|
+
// SCSS 变量 `$nav-height`(common/var.scss,35px);主题(如 magic-admin)
|
|
18
|
+
// 只需在祖先节点声明 `--editor-nav-height: 40px` 即可运行时覆盖,避免
|
|
19
|
+
// 走 `@use with` 那条对加载顺序极敏感的 SCSS 模块配置路径。
|
|
20
|
+
flex: 0 0 var(--editor-nav-height, #{$nav-height});
|
|
17
21
|
border-bottom: 1px solid #d8dee8;
|
|
18
22
|
|
|
19
23
|
> div {
|