@tmagic/editor 1.8.4-beta.1 → 1.8.5
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.js +1 -2
- package/dist/es/Editor.vue_vue_type_script_setup_true_lang.js +5 -6
- package/dist/es/_virtual/_plugin-vue_export-helper.js +1 -2
- package/dist/es/components/CodeBlockEditor.js +1 -2
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/es/components/CodeParams.js +1 -2
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/CompareForm.js +1 -2
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/ContentMenu.js +1 -2
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/FloatingBox.js +1 -2
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/Icon.js +1 -2
- package/dist/es/components/Icon.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/Resizer.js +1 -2
- package/dist/es/components/Resizer.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/ScrollBar.js +1 -2
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/ScrollViewer.js +1 -2
- package/dist/es/components/ScrollViewer.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/SearchInput.js +1 -2
- package/dist/es/components/SearchInput.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/SplitView.js +1 -2
- package/dist/es/components/SplitView.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/ToolButton.js +1 -2
- package/dist/es/components/ToolButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/Tree.js +1 -2
- package/dist/es/components/Tree.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/components/TreeNode.js +1 -2
- package/dist/es/components/TreeNode.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/components/ViewForm.js +1 -2
- package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/editorProps.js +1 -2
- package/dist/es/fields/Code.js +1 -2
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/CodeLink.js +1 -2
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/CodeSelect.js +1 -2
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/CodeSelectCol.js +1 -2
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +14 -12
- package/dist/es/fields/CondOpSelect.js +1 -2
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.js +1 -2
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/fields/DataSourceFieldSelect/Index.js +1 -2
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/fields/DataSourceFields.js +1 -2
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/es/fields/DataSourceInput.js +1 -2
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/fields/DataSourceMethodSelect.js +1 -2
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +17 -10
- package/dist/es/fields/DataSourceMethods.js +1 -2
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/DataSourceMocks.js +1 -2
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/es/fields/DataSourceSelect.js +1 -2
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/fields/DisplayConds.js +1 -2
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/EventSelect.js +1 -2
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/KeyValue.js +1 -2
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/fields/PageFragmentSelect.js +1 -2
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/fields/StyleSetter/Index.js +1 -2
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.js +1 -2
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/components/Border.js +1 -2
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/components/Box.js +1 -2
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/configs.js +113 -15
- package/dist/es/fields/StyleSetter/icons/align-items/Baseline.js +45 -0
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +1 -2
- package/dist/es/fields/StyleSetter/icons/align-items/End.js +42 -0
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +1 -2
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +1 -2
- package/dist/es/fields/StyleSetter/icons/align-items/Normal.js +33 -0
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +1 -2
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +1 -2
- package/dist/es/fields/StyleSetter/icons/align-items/Start.js +42 -0
- package/dist/es/fields/StyleSetter/icons/align-items/Stretch.js +37 -0
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +1 -2
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +1 -2
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +1 -2
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +1 -2
- package/dist/es/fields/StyleSetter/icons/background-repeat/Round.js +45 -0
- package/dist/es/fields/StyleSetter/icons/background-repeat/Space.js +16 -0
- package/dist/es/fields/StyleSetter/icons/display/Block.js +1 -2
- package/dist/es/fields/StyleSetter/icons/display/Flex.js +1 -2
- package/dist/es/fields/StyleSetter/icons/display/Grid.js +13 -0
- package/dist/es/fields/StyleSetter/icons/display/Inline.js +1 -2
- package/dist/es/fields/StyleSetter/icons/display/InlineBlock.js +1 -2
- package/dist/es/fields/StyleSetter/icons/display/InlineFlex.js +13 -0
- package/dist/es/fields/StyleSetter/icons/display/InlineGrid.js +13 -0
- package/dist/es/fields/StyleSetter/icons/display/None.js +1 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/Column.js +1 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +1 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +1 -2
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +1 -2
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceEvenly.js +16 -0
- package/dist/es/fields/StyleSetter/icons/text-align/Center.js +1 -2
- package/dist/es/fields/StyleSetter/icons/text-align/End.js +13 -0
- package/dist/es/fields/StyleSetter/icons/text-align/Justify.js +13 -0
- package/dist/es/fields/StyleSetter/icons/text-align/Left.js +1 -2
- package/dist/es/fields/StyleSetter/icons/text-align/MatchParent.js +13 -0
- package/dist/es/fields/StyleSetter/icons/text-align/Right.js +1 -2
- package/dist/es/fields/StyleSetter/icons/text-align/Start.js +13 -0
- package/dist/es/fields/StyleSetter/pro/Background.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Border.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/fields/StyleSetter/pro/Font.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Layout.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/fields/StyleSetter/pro/Position.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Transform.js +1 -2
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/fields/UISelect.js +1 -2
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +7 -5
- package/dist/es/fields/configs/codeSelect.js +1 -2
- package/dist/es/fields/configs/displayConds.js +1 -2
- package/dist/es/fields/configs/eventSelect.js +2 -3
- package/dist/es/fields/configs/stickyAddButton.js +1 -2
- package/dist/es/fields/headless-validation.js +2 -3
- package/dist/es/hooks/use-code-block-edit.js +1 -2
- package/dist/es/hooks/use-compare-form.js +1 -2
- package/dist/es/hooks/use-data-source-edit.js +1 -2
- package/dist/es/hooks/use-editor-content-height.js +1 -2
- package/dist/es/hooks/use-filter.js +1 -2
- package/dist/es/hooks/use-float-box.js +1 -2
- package/dist/es/hooks/use-form-context.js +1 -2
- package/dist/es/hooks/use-getso.js +1 -2
- package/dist/es/hooks/use-next-float-box-position.js +1 -2
- package/dist/es/hooks/use-node-status.js +1 -2
- package/dist/es/hooks/use-services.js +1 -2
- package/dist/es/hooks/use-stage.js +3 -4
- package/dist/es/hooks/use-window-rect.js +1 -2
- package/dist/es/icons/CenterIcon.js +1 -2
- package/dist/es/icons/CenterIcon.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/icons/CodeIcon.js +1 -2
- package/dist/es/icons/CodeIcon.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/icons/DatasourceIcon.js +1 -2
- package/dist/es/icons/FolderMinusIcon.js +1 -2
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/index.js +27 -27
- package/dist/es/initService.js +2 -3
- package/dist/es/layouts/AddPageBox.js +1 -2
- package/dist/es/layouts/AddPageBox.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/CodeEditor.js +1 -2
- package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/Framework.js +1 -2
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/es/layouts/NavMenu.js +1 -2
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/NavMenuColumn.js +1 -2
- package/dist/es/layouts/NavMenuColumn.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/Bucket.js +1 -2
- package/dist/es/layouts/history-list/Bucket.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/BucketTab.js +1 -2
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/GroupRow.js +1 -2
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/HistoryDiffDialog.js +1 -2
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/history-list/HistoryListPanel.js +1 -2
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/history-list/InitialRow.js +1 -2
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/PageTab.js +1 -2
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/history-list/composables.js +1 -2
- package/dist/es/layouts/history-list/useHistoryList.js +1 -2
- package/dist/es/layouts/history-list/useHistoryRevert.js +1 -2
- package/dist/es/layouts/page-bar/AddButton.js +1 -2
- package/dist/es/layouts/page-bar/AddButton.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/page-bar/PageBar.js +1 -2
- package/dist/es/layouts/page-bar/PageBar.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/page-bar/PageBarScrollContainer.js +1 -2
- package/dist/es/layouts/page-bar/PageBarScrollContainer.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/page-bar/PageList.js +1 -2
- package/dist/es/layouts/page-bar/PageList.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/page-bar/Search.js +1 -2
- package/dist/es/layouts/page-bar/Search.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/props-panel/FormPanel.js +1 -2
- package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +7 -5
- package/dist/es/layouts/props-panel/PropsPanel.js +1 -2
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +14 -7
- package/dist/es/layouts/props-panel/use-style-panel.js +1 -2
- package/dist/es/layouts/sidebar/ComponentListPanel.js +1 -2
- package/dist/es/layouts/sidebar/ComponentListPanel.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/sidebar/Sidebar.js +1 -2
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.js +1 -2
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +49 -33
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.js +1 -2
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceAddButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/sidebar/data-source/DataSourceList.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceList.vue_vue_type_script_setup_true_lang.js +30 -20
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.js +1 -2
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +5 -10
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerMenu.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerMenu.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerNodeContent.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/sidebar/layer/LayerNodeTool.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerNodeTool.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerPanel.js +1 -2
- package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/sidebar/layer/use-click.js +1 -2
- package/dist/es/layouts/sidebar/layer/use-drag.js +1 -2
- package/dist/es/layouts/sidebar/layer/use-keybinding.js +1 -2
- package/dist/es/layouts/sidebar/layer/use-node-status.js +1 -2
- package/dist/es/layouts/workspace/Breadcrumb.js +1 -2
- package/dist/es/layouts/workspace/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/workspace/Workspace.js +1 -2
- package/dist/es/layouts/workspace/Workspace.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/es/layouts/workspace/viewer/NodeListMenu.js +1 -2
- package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/es/layouts/workspace/viewer/Stage.js +1 -2
- package/dist/es/layouts/workspace/viewer/Stage.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/es/layouts/workspace/viewer/StageOverlay.js +1 -2
- package/dist/es/layouts/workspace/viewer/StageOverlay.vue_vue_type_script_setup_true_lang.js +2 -3
- package/dist/es/layouts/workspace/viewer/ViewerMenu.js +1 -2
- package/dist/es/layouts/workspace/viewer/ViewerMenu.vue_vue_type_script_setup_true_lang.js +4 -5
- package/dist/es/plugin.js +13 -14
- package/dist/es/sdk/index.js +2 -3
- package/dist/es/sdk/services/BaseService.js +1 -2
- package/dist/es/sdk/services/CodeBlock.js +1 -2
- package/dist/es/sdk/services/ComponentList.js +1 -2
- package/dist/es/sdk/services/DataSource.js +2 -3
- package/dist/es/sdk/services/Dep.js +2 -3
- package/dist/es/sdk/services/Editor.js +32 -13
- package/dist/es/sdk/services/Events.js +1 -2
- package/dist/es/sdk/services/History.js +2 -3
- package/dist/es/sdk/services/Props.js +2 -3
- package/dist/es/sdk/services/WebStorage.js +1 -2
- package/dist/es/sdk/utils/dep.js +1 -2
- package/dist/es/sdk/utils/operator.js +1 -2
- package/dist/es/sdk/utils/position.js +1 -2
- package/dist/es/sdk/utils/props.js +4 -5
- package/dist/es/sdk/validate/index.js +1 -2
- package/dist/es/sdk/wiring.js +1 -2
- package/dist/es/services/keybinding.js +2 -3
- package/dist/es/services/sdk-instance.js +3 -4
- package/dist/es/services/stageOverlay.js +2 -3
- package/dist/es/services/ui.js +1 -2
- package/dist/es/style.css +36 -0
- package/dist/es/type.js +1 -2
- package/dist/es/utils/code-block.js +1 -2
- package/dist/es/utils/config.js +1 -2
- package/dist/es/utils/const.js +1 -2
- package/dist/es/utils/content-menu.js +1 -2
- package/dist/es/utils/data-source/formConfigs/base.js +1 -2
- package/dist/es/utils/data-source/formConfigs/http.js +1 -2
- package/dist/es/utils/data-source/index.js +1 -2
- package/dist/es/utils/dep/collect-worker-client.js +1 -2
- package/dist/es/utils/dep/idle-task.js +1 -2
- package/dist/es/utils/dep/worker.js +2 -3
- package/dist/es/utils/editor.js +1 -2
- package/dist/es/utils/event.js +2 -3
- package/dist/es/utils/history.js +1 -2
- package/dist/es/utils/indexed-db.js +1 -2
- package/dist/es/utils/keybinding-config.js +1 -2
- package/dist/es/utils/logger.js +1 -2
- package/dist/es/utils/monaco-editor.js +1 -2
- package/dist/es/utils/operator.js +2 -3
- package/dist/es/utils/props.js +1 -2
- package/dist/es/utils/scroll-viewer.js +1 -2
- package/dist/es/utils/tree.js +1 -2
- package/dist/es/utils/type-match-rules.js +2 -3
- package/dist/es/utils/undo-redo.js +1 -2
- package/dist/style.css +36 -0
- package/dist/themes/magic-admin.css +36 -0
- package/dist/tmagic-editor-headless.umd.cjs +817 -650
- package/dist/tmagic-editor-sdk.umd.cjs +239 -426
- package/dist/tmagic-editor.umd.cjs +1313 -1312
- package/package.json +9 -9
- package/src/fields/CodeSelectCol.vue +12 -14
- package/src/fields/DataSourceMethodSelect.vue +17 -6
- package/src/fields/StyleSetter/configs.ts +63 -14
- package/src/fields/StyleSetter/icons/align-items/Baseline.vue +8 -0
- package/src/fields/StyleSetter/icons/align-items/End.vue +8 -0
- package/src/fields/StyleSetter/icons/align-items/Normal.vue +6 -0
- package/src/fields/StyleSetter/icons/align-items/Start.vue +8 -0
- package/src/fields/StyleSetter/icons/align-items/Stretch.vue +7 -0
- package/src/fields/StyleSetter/icons/align-items/index.ts +5 -0
- package/src/fields/StyleSetter/icons/background-repeat/Round.vue +8 -0
- package/src/fields/StyleSetter/icons/background-repeat/Space.vue +9 -0
- package/src/fields/StyleSetter/icons/background-repeat/index.ts +2 -0
- package/src/fields/StyleSetter/icons/display/Grid.vue +7 -0
- package/src/fields/StyleSetter/icons/display/InlineFlex.vue +7 -0
- package/src/fields/StyleSetter/icons/display/InlineGrid.vue +7 -0
- package/src/fields/StyleSetter/icons/display/index.ts +3 -0
- package/src/fields/StyleSetter/icons/justify-content/SpaceEvenly.vue +11 -0
- package/src/fields/StyleSetter/icons/justify-content/index.ts +1 -0
- package/src/fields/StyleSetter/icons/text-align/End.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Justify.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/MatchParent.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/Start.vue +7 -0
- package/src/fields/StyleSetter/icons/text-align/index.ts +4 -0
- package/src/fields/UISelect.vue +3 -1
- package/src/fields/configs/eventSelect.ts +1 -1
- package/src/layouts/props-panel/FormPanel.vue +3 -0
- package/src/layouts/props-panel/PropsPanel.vue +7 -0
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +51 -26
- package/src/layouts/sidebar/data-source/DataSourceList.vue +24 -8
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +3 -8
- package/src/sdk/services/Editor.ts +40 -16
- package/src/sdk/utils/props.ts +3 -3
- package/src/theme/tree.scss +12 -0
- package/src/theme/ui-select.scss +31 -0
- package/src/type.ts +13 -0
- package/types/index.d.ts +55 -4
- package/types/sdk.d.ts +13 -3
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.8.
|
|
2
|
+
"version": "1.8.5",
|
|
3
3
|
"name": "@tmagic/editor",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
@@ -58,6 +58,11 @@
|
|
|
58
58
|
],
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@element-plus/icons-vue": "^2.3.2",
|
|
61
|
+
"@tmagic/design": "1.8.5",
|
|
62
|
+
"@tmagic/form": "1.8.5",
|
|
63
|
+
"@tmagic/stage": "1.8.5",
|
|
64
|
+
"@tmagic/table": "1.8.5",
|
|
65
|
+
"@tmagic/utils": "1.8.5",
|
|
61
66
|
"buffer": "^6.0.3",
|
|
62
67
|
"deep-object-diff": "^1.1.9",
|
|
63
68
|
"emmet-monaco-es": "^5.7.0",
|
|
@@ -67,12 +72,7 @@
|
|
|
67
72
|
"lodash-es": "^4.18.1",
|
|
68
73
|
"moveable": "^0.53.0",
|
|
69
74
|
"serialize-javascript": "^7.1.1",
|
|
70
|
-
"sortablejs": "^1.15.7"
|
|
71
|
-
"@tmagic/design": "1.8.4-beta.1",
|
|
72
|
-
"@tmagic/form": "1.8.4-beta.1",
|
|
73
|
-
"@tmagic/stage": "1.8.4-beta.1",
|
|
74
|
-
"@tmagic/utils": "1.8.4-beta.1",
|
|
75
|
-
"@tmagic/table": "1.8.4-beta.1"
|
|
75
|
+
"sortablejs": "^1.15.7"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/events": "^3.0.3",
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"@vue/test-utils": "^2.5.1"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
+
"@tmagic/core": "1.8.5",
|
|
85
86
|
"monaco-editor": "^0.55.1 ",
|
|
86
87
|
"type-fest": "^5.2.0",
|
|
87
88
|
"typescript": "^6.0.3",
|
|
88
|
-
"vue": "^3.5.44"
|
|
89
|
-
"@tmagic/core": "1.8.4-beta.1"
|
|
89
|
+
"vue": "^3.5.44"
|
|
90
90
|
},
|
|
91
91
|
"peerDependenciesMeta": {
|
|
92
92
|
"typescript": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</template>
|
|
54
54
|
|
|
55
55
|
<script lang="ts" setup>
|
|
56
|
-
import { computed, inject
|
|
56
|
+
import { computed, inject } from 'vue';
|
|
57
57
|
import { Edit, View } from '@element-plus/icons-vue';
|
|
58
58
|
import { isEmpty, map } from 'lodash-es';
|
|
59
59
|
|
|
@@ -132,16 +132,14 @@ const getParamItemsConfig = (codeId?: Id): CodeParamStatement[] => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
const codeDsl = computed(() => codeBlockService.getCodeDsl());
|
|
135
|
-
const paramsConfig = ref<CodeParamStatement[]>(getParamItemsConfig(props.model[props.name]));
|
|
136
135
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
);
|
|
136
|
+
/**
|
|
137
|
+
* 参数字段配置跟随当前 model / codeDsl 派生,而不是 setup 期的一次性快照。
|
|
138
|
+
*
|
|
139
|
+
* 同类型组件切换选中时字段实例会被复用,且新节点的 codeId 可能与旧节点相同,
|
|
140
|
+
* 按值 watch 不会触发,参数配置会停留在上一个节点上。
|
|
141
|
+
*/
|
|
142
|
+
const paramsConfig = computed<CodeParamStatement[]>(() => getParamItemsConfig(props.model[props.name]));
|
|
145
143
|
|
|
146
144
|
const selectConfig: SelectConfig = {
|
|
147
145
|
type: 'select',
|
|
@@ -161,8 +159,8 @@ const selectConfig: SelectConfig = {
|
|
|
161
159
|
};
|
|
162
160
|
|
|
163
161
|
const onCodeIdChangeHandler = (value: any) => {
|
|
164
|
-
//
|
|
165
|
-
|
|
162
|
+
// model 尚未写入新值(由 MForm 收到 change 后统一写回),参数字段配置先按新 codeId 算
|
|
163
|
+
const nextParamsConfig = getParamItemsConfig(value);
|
|
166
164
|
|
|
167
165
|
const changeRecords = [
|
|
168
166
|
{
|
|
@@ -173,8 +171,8 @@ const onCodeIdChangeHandler = (value: any) => {
|
|
|
173
171
|
|
|
174
172
|
changeRecords.push({
|
|
175
173
|
propPath: props.prop.replace(`${props.name}`, 'params'),
|
|
176
|
-
value:
|
|
177
|
-
? createValues(mForm,
|
|
174
|
+
value: nextParamsConfig.length
|
|
175
|
+
? createValues(mForm, nextParamsConfig as unknown as FormItemConfig[], {}, props.model.params)
|
|
178
176
|
: {},
|
|
179
177
|
});
|
|
180
178
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script lang="ts" setup name="">
|
|
39
|
-
import { computed, inject
|
|
39
|
+
import { computed, inject } from 'vue';
|
|
40
40
|
import { Edit, View } from '@element-plus/icons-vue';
|
|
41
41
|
|
|
42
42
|
import type { Id } from '@tmagic/core';
|
|
@@ -85,6 +85,7 @@ const notEditable = computed(() => filterFunction(mForm, props.config.notEditabl
|
|
|
85
85
|
const isCompare = computed(() => Boolean(mForm?.isCompare));
|
|
86
86
|
|
|
87
87
|
const dataSources = computed(() => dataSourceService.get('dataSources'));
|
|
88
|
+
const codeOptions = inject('codeOptions', {});
|
|
88
89
|
|
|
89
90
|
const isCustomMethod = computed(() => {
|
|
90
91
|
const [id, name] = props.model[props.name];
|
|
@@ -125,7 +126,7 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
|
|
|
125
126
|
return type;
|
|
126
127
|
},
|
|
127
128
|
language: 'javascript',
|
|
128
|
-
options:
|
|
129
|
+
options: codeOptions,
|
|
129
130
|
autosize: {
|
|
130
131
|
minRows: 1,
|
|
131
132
|
maxRows: 10,
|
|
@@ -146,7 +147,16 @@ const getParamItemsConfig = ([dataSourceId, methodName]: [Id, string] = ['', '']
|
|
|
146
147
|
}));
|
|
147
148
|
};
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
/**
|
|
151
|
+
* 参数字段配置跟随当前 model 派生,而不是 setup 期的一次性快照。
|
|
152
|
+
*
|
|
153
|
+
* 属性面板在同类型组件之间切换选中时会复用表单字段实例,此时 model 已换成新节点;
|
|
154
|
+
* 快照会让「新节点的方法」配上「旧节点的参数字段」,看起来像两个组件的事件配置混在了一起。
|
|
155
|
+
* 数据源列表异步就绪时也能随 computed 自动补齐参数配置。
|
|
156
|
+
*/
|
|
157
|
+
const paramsConfig = computed<CodeParamStatement[]>(() =>
|
|
158
|
+
getParamItemsConfig(props.model[props.name || 'dataSourceMethod']),
|
|
159
|
+
);
|
|
150
160
|
|
|
151
161
|
const methodsOptions = computed(
|
|
152
162
|
() =>
|
|
@@ -176,7 +186,8 @@ const cascaderConfig = computed<CascaderConfig>(() => ({
|
|
|
176
186
|
* 参数值修改更新
|
|
177
187
|
*/
|
|
178
188
|
const onChangeHandler = (value: any) => {
|
|
179
|
-
|
|
189
|
+
// model 尚未写入新值(由 MForm 收到 change 后统一写回),参数字段配置先按新选中的方法算
|
|
190
|
+
const nextParamsConfig = getParamItemsConfig(value);
|
|
180
191
|
|
|
181
192
|
const changeRecords = [
|
|
182
193
|
{
|
|
@@ -187,8 +198,8 @@ const onChangeHandler = (value: any) => {
|
|
|
187
198
|
|
|
188
199
|
changeRecords.push({
|
|
189
200
|
propPath: props.prop.replace(`${props.name}`, 'params'),
|
|
190
|
-
value:
|
|
191
|
-
? createValues(mForm,
|
|
201
|
+
value: nextParamsConfig.length
|
|
202
|
+
? createValues(mForm, nextParamsConfig as unknown as FormItemConfig[], {}, props.model.params)
|
|
192
203
|
: {},
|
|
193
204
|
});
|
|
194
205
|
|
|
@@ -8,14 +8,35 @@ import type { validateDataSourceFieldSelect } from '@editor/utils/type-match-rul
|
|
|
8
8
|
|
|
9
9
|
import BackgroundPosition from './components/BackgroundPosition.vue';
|
|
10
10
|
import {
|
|
11
|
+
AlignItemsBaseline,
|
|
11
12
|
AlignItemsCenter,
|
|
13
|
+
AlignItemsEnd,
|
|
12
14
|
AlignItemsFlexEnd,
|
|
13
15
|
AlignItemsFlexStart,
|
|
16
|
+
AlignItemsNormal,
|
|
14
17
|
AlignItemsSpaceAround,
|
|
15
18
|
AlignItemsSpaceBetween,
|
|
19
|
+
AlignItemsStart,
|
|
20
|
+
AlignItemsStretch,
|
|
16
21
|
} from './icons/align-items';
|
|
17
|
-
import {
|
|
18
|
-
|
|
22
|
+
import {
|
|
23
|
+
BackgroundNoRepeat,
|
|
24
|
+
BackgroundRepeat,
|
|
25
|
+
BackgroundRepeatRound,
|
|
26
|
+
BackgroundRepeatSpace,
|
|
27
|
+
BackgroundRepeatX,
|
|
28
|
+
BackgroundRepeatY,
|
|
29
|
+
} from './icons/background-repeat';
|
|
30
|
+
import {
|
|
31
|
+
DisplayBlock,
|
|
32
|
+
DisplayFlex,
|
|
33
|
+
DisplayGrid,
|
|
34
|
+
DisplayInline,
|
|
35
|
+
DisplayInlineBlock,
|
|
36
|
+
DisplayInlineFlex,
|
|
37
|
+
DisplayInlineGrid,
|
|
38
|
+
DisplayNone,
|
|
39
|
+
} from './icons/display';
|
|
19
40
|
import {
|
|
20
41
|
FlexDirectionColumn,
|
|
21
42
|
FlexDirectionColumnReverse,
|
|
@@ -28,8 +49,17 @@ import {
|
|
|
28
49
|
JustifyContentFlexStart,
|
|
29
50
|
JustifyContentSpaceAround,
|
|
30
51
|
JustifyContentSpaceBetween,
|
|
52
|
+
JustifyContentSpaceEvenly,
|
|
31
53
|
} from './icons/justify-content';
|
|
32
|
-
import {
|
|
54
|
+
import {
|
|
55
|
+
AlignCenter,
|
|
56
|
+
AlignEnd,
|
|
57
|
+
AlignJustify,
|
|
58
|
+
AlignLeft,
|
|
59
|
+
AlignMatchParent,
|
|
60
|
+
AlignRight,
|
|
61
|
+
AlignStart,
|
|
62
|
+
} from './icons/text-align';
|
|
33
63
|
|
|
34
64
|
/**
|
|
35
65
|
* 「布局」面板配置。
|
|
@@ -71,6 +101,9 @@ export const createLayoutConfig = (theme: string): FormConfig => [
|
|
|
71
101
|
icon: markRaw(DisplayNone),
|
|
72
102
|
tooltip: '隐藏 none',
|
|
73
103
|
},
|
|
104
|
+
{ value: 'inline-flex', icon: markRaw(DisplayInlineFlex), tooltip: '内联弹性布局 inline-flex' },
|
|
105
|
+
{ value: 'grid', icon: markRaw(DisplayGrid), tooltip: '网格布局 grid' },
|
|
106
|
+
{ value: 'inline-grid', icon: markRaw(DisplayInlineGrid), tooltip: '内联网格布局 inline-grid' },
|
|
74
107
|
],
|
|
75
108
|
}),
|
|
76
109
|
defineFormItem({
|
|
@@ -121,6 +154,7 @@ export const createLayoutConfig = (theme: string): FormConfig => [
|
|
|
121
154
|
icon: markRaw(JustifyContentSpaceAround),
|
|
122
155
|
tooltip: '横向平分 space-around',
|
|
123
156
|
},
|
|
157
|
+
{ value: 'space-evenly', icon: markRaw(JustifyContentSpaceEvenly), tooltip: '等间距分布 space-evenly' },
|
|
124
158
|
],
|
|
125
159
|
display: (_mForm, { model }: { model: Record<any, any> }) => model.display === 'flex',
|
|
126
160
|
}),
|
|
@@ -145,6 +179,11 @@ export const createLayoutConfig = (theme: string): FormConfig => [
|
|
|
145
179
|
icon: markRaw(AlignItemsSpaceAround),
|
|
146
180
|
tooltip: '横向平分 space-around',
|
|
147
181
|
},
|
|
182
|
+
{ value: 'stretch', icon: markRaw(AlignItemsStretch), tooltip: '拉伸填满 stretch' },
|
|
183
|
+
{ value: 'baseline', icon: markRaw(AlignItemsBaseline), tooltip: '基线对齐 baseline' },
|
|
184
|
+
{ value: 'normal', icon: markRaw(AlignItemsNormal), tooltip: '默认 normal' },
|
|
185
|
+
{ value: 'start', icon: markRaw(AlignItemsStart), tooltip: '起始对齐 start' },
|
|
186
|
+
{ value: 'end', icon: markRaw(AlignItemsEnd), tooltip: '结束对齐 end' },
|
|
148
187
|
],
|
|
149
188
|
display: (_mForm, { model }: { model: Record<any, any> }) => model.display === 'flex',
|
|
150
189
|
}),
|
|
@@ -222,9 +261,9 @@ export const createLayoutConfig = (theme: string): FormConfig => [
|
|
|
222
261
|
items: [
|
|
223
262
|
{
|
|
224
263
|
type: 'data-source-field-select',
|
|
225
|
-
text: '
|
|
264
|
+
text: '透明度(0-1)',
|
|
226
265
|
name: 'opacity',
|
|
227
|
-
labelWidth: '
|
|
266
|
+
labelWidth: '100px',
|
|
228
267
|
dataSourceFieldType: ['string', 'number'],
|
|
229
268
|
fieldConfig: {
|
|
230
269
|
type: 'text',
|
|
@@ -445,6 +484,8 @@ export const createBackgroundConfig = (): FormConfig => [
|
|
|
445
484
|
icon: markRaw(BackgroundRepeat),
|
|
446
485
|
tooltip: '垂直和水平方向重复 repeat',
|
|
447
486
|
},
|
|
487
|
+
{ value: 'space', icon: markRaw(BackgroundRepeatSpace), tooltip: '不裁剪、均匀留白 space' },
|
|
488
|
+
{ value: 'round', icon: markRaw(BackgroundRepeatRound), tooltip: '缩放铺满 round' },
|
|
448
489
|
],
|
|
449
490
|
}),
|
|
450
491
|
defineFormItem({
|
|
@@ -502,9 +543,9 @@ export const createFontConfig = (validateDataSourceField: typeof validateDataSou
|
|
|
502
543
|
fieldConfig: {
|
|
503
544
|
type: 'select',
|
|
504
545
|
allowCreate: true,
|
|
505
|
-
options: ['normal', 'bold']
|
|
546
|
+
options: ['normal', 'bold', 'bolder', 'lighter']
|
|
506
547
|
.concat(
|
|
507
|
-
Array(
|
|
548
|
+
Array(9)
|
|
508
549
|
.fill(1)
|
|
509
550
|
.map((x, i) => `${i + 1}00`),
|
|
510
551
|
)
|
|
@@ -575,10 +616,16 @@ export const createFontConfig = (validateDataSourceField: typeof validateDataSou
|
|
|
575
616
|
type: 'radioGroup',
|
|
576
617
|
childType: 'button',
|
|
577
618
|
labelWidth: '68px',
|
|
619
|
+
// 7 个值统一用图标按钮:带中文文案会因字数不同撑出不同宽度,换行后列线和边框错开。
|
|
620
|
+
// 中文说明放在 tooltip 里,与 display / justifyContent 等布局选项保持一致。
|
|
578
621
|
options: [
|
|
579
|
-
{ value: 'left', icon: markRaw(AlignLeft), tooltip: '左对齐
|
|
580
|
-
{ value: 'center', icon: markRaw(AlignCenter), tooltip: '居中对齐 center'
|
|
581
|
-
{ value: 'right', icon: markRaw(AlignRight), tooltip: '右对齐 right'
|
|
622
|
+
{ value: 'left', icon: markRaw(AlignLeft), tooltip: '左对齐 left' },
|
|
623
|
+
{ value: 'center', icon: markRaw(AlignCenter), tooltip: '居中对齐 center' },
|
|
624
|
+
{ value: 'right', icon: markRaw(AlignRight), tooltip: '右对齐 right' },
|
|
625
|
+
{ value: 'start', icon: markRaw(AlignStart), tooltip: '起始对齐 start' },
|
|
626
|
+
{ value: 'end', icon: markRaw(AlignEnd), tooltip: '结束对齐 end' },
|
|
627
|
+
{ value: 'justify', icon: markRaw(AlignJustify), tooltip: '两端对齐 justify' },
|
|
628
|
+
{ value: 'match-parent', icon: markRaw(AlignMatchParent), tooltip: '按父级方向对齐 match-parent' },
|
|
582
629
|
],
|
|
583
630
|
}),
|
|
584
631
|
];
|
|
@@ -680,10 +727,12 @@ export const createBorderDirectionConfig = (direction: string) =>
|
|
|
680
727
|
type: 'data-source-field-select',
|
|
681
728
|
fieldConfig: {
|
|
682
729
|
type: 'select',
|
|
683
|
-
options: ['
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
730
|
+
options: ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'].map(
|
|
731
|
+
(item) => ({
|
|
732
|
+
value: item,
|
|
733
|
+
text: item,
|
|
734
|
+
}),
|
|
735
|
+
),
|
|
687
736
|
},
|
|
688
737
|
},
|
|
689
738
|
],
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="2" y="3" width="2.5" height="8" rx="0.5" />
|
|
4
|
+
<rect x="6.75" y="6" width="2.5" height="5" rx="0.5" />
|
|
5
|
+
<rect x="11.5" y="1" width="2.5" height="10" rx="0.5" />
|
|
6
|
+
<rect x="0.75" y="11.25" width="14.5" height="0.75" rx="0.375" />
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="2" y="2" width="9" height="1" rx="0.5" />
|
|
4
|
+
<path d="M11 0.75L14 2.5 11 4.25Z" />
|
|
5
|
+
<rect x="3" y="10" width="10" height="4" rx="0.5" fill="none" stroke="currentColor" />
|
|
6
|
+
<rect x="1" y="14.5" width="14" height="0.5" rx="0.25" fill-opacity="0.3" />
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="1" y="1" width="14" height="14" rx="1" fill="none" stroke="currentColor" stroke-opacity="0.3" />
|
|
4
|
+
<rect x="3" y="5.5" width="10" height="5" rx="0.5" fill="none" stroke="currentColor" />
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="2" y="2" width="9" height="1" rx="0.5" />
|
|
4
|
+
<path d="M11 0.75L14 2.5 11 4.25Z" />
|
|
5
|
+
<rect x="3" y="6" width="10" height="4" rx="0.5" fill="none" stroke="currentColor" />
|
|
6
|
+
<rect x="1" y="5" width="14" height="0.5" rx="0.25" fill-opacity="0.3" />
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="1" y="1" width="14" height="14" rx="1" fill="none" stroke="currentColor" stroke-opacity="0.3" />
|
|
4
|
+
<rect x="3" y="2" width="10" height="12" rx="0.5" fill="none" stroke="currentColor" />
|
|
5
|
+
<path d="M8 4.5L9.75 6.5H8.75V9.5H9.75L8 11.5 6.25 9.5H7.25V6.5H6.25Z" />
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export { default as AlignItemsBaseline } from './Baseline.vue';
|
|
1
2
|
export { default as AlignItemsCenter } from './Center.vue';
|
|
3
|
+
export { default as AlignItemsEnd } from './End.vue';
|
|
2
4
|
export { default as AlignItemsFlexEnd } from './FlexEnd.vue';
|
|
3
5
|
export { default as AlignItemsFlexStart } from './FlexStart.vue';
|
|
6
|
+
export { default as AlignItemsNormal } from './Normal.vue';
|
|
4
7
|
export { default as AlignItemsSpaceAround } from './SpaceAround.vue';
|
|
5
8
|
export { default as AlignItemsSpaceBetween } from './SpaceBetween.vue';
|
|
9
|
+
export { default as AlignItemsStart } from './Start.vue';
|
|
10
|
+
export { default as AlignItemsStretch } from './Stretch.vue';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="1" y="1" width="6.5" height="6.5" rx="0.5" />
|
|
4
|
+
<rect x="8.5" y="1" width="6.5" height="6.5" rx="0.5" />
|
|
5
|
+
<rect x="1" y="8.5" width="6.5" height="6.5" rx="0.5" />
|
|
6
|
+
<rect x="8.5" y="8.5" width="6.5" height="6.5" rx="0.5" />
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="0.5" y="0.5" width="15" height="15" rx="1" fill="none" stroke="currentColor" stroke-opacity="0.3" />
|
|
4
|
+
<rect x="3.5" y="3.5" width="3" height="3" rx="0.5" />
|
|
5
|
+
<rect x="9.5" y="3.5" width="3" height="3" rx="0.5" />
|
|
6
|
+
<rect x="3.5" y="9.5" width="3" height="3" rx="0.5" />
|
|
7
|
+
<rect x="9.5" y="9.5" width="3" height="3" rx="0.5" />
|
|
8
|
+
</svg>
|
|
9
|
+
</template>
|
|
@@ -2,3 +2,5 @@ export { default as BackgroundRepeat } from './Repeat.vue';
|
|
|
2
2
|
export { default as BackgroundRepeatX } from './RepeatX.vue';
|
|
3
3
|
export { default as BackgroundRepeatY } from './RepeatY.vue';
|
|
4
4
|
export { default as BackgroundNoRepeat } from './NoRepeat.vue';
|
|
5
|
+
export { default as BackgroundRepeatRound } from './Round.vue';
|
|
6
|
+
export { default as BackgroundRepeatSpace } from './Space.vue';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM416 256v512H368V256h48zM656 256v512H608V256h48zM768 368v48H256V368h512zM768 608v48H256V608h512z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM288 400v48H128V400h160zM288 576v48H128V576h160zM896 400v48H736V400h160zM896 576v48H736V576h160zM704 320v384H320V320h384zM656 368H368v288h288V368zM448 416v192H384V416h64zM544 416v192H480V416h64zM640 416v192H576V416h64z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M960 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H64a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h896z m0 64H64v640h896V192zM288 400v48H128V400h160zM288 576v48H128V576h160zM896 400v48H736V400h160zM896 576v48H736V576h160zM704 320v384H320V320h384zM656 368H368v288h288V368zM496 384v112H384V384h112zM640 384v112H528V384h112zM496 528v112H384V528h112zM640 528v112H528V528h112z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { default as DisplayBlock } from './Block.vue';
|
|
2
2
|
export { default as DisplayFlex } from './Flex.vue';
|
|
3
|
+
export { default as DisplayGrid } from './Grid.vue';
|
|
3
4
|
export { default as DisplayInline } from './Inline.vue';
|
|
4
5
|
export { default as DisplayInlineBlock } from './InlineBlock.vue';
|
|
6
|
+
export { default as DisplayInlineFlex } from './InlineFlex.vue';
|
|
7
|
+
export { default as DisplayInlineGrid } from './InlineGrid.vue';
|
|
5
8
|
export { default as DisplayNone } from './None.vue';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor">
|
|
3
|
+
<rect x="3" y="4.5" width="1.5" height="7" rx="0.25" fill="none" stroke="currentColor" />
|
|
4
|
+
<rect x="7.5" y="4.5" width="1.5" height="7" rx="0.25" fill="none" stroke="currentColor" />
|
|
5
|
+
<rect x="12" y="4.5" width="1.5" height="7" rx="0.25" fill="none" stroke="currentColor" />
|
|
6
|
+
<rect x="1.25" y="2" width="0.5" height="12" rx="0.25" fill-opacity="0.3" />
|
|
7
|
+
<rect x="6" y="2" width="0.5" height="12" rx="0.25" fill-opacity="0.3" />
|
|
8
|
+
<rect x="10.5" y="2" width="0.5" height="12" rx="0.25" fill-opacity="0.3" />
|
|
9
|
+
<rect x="15" y="2" width="0.5" height="12" rx="0.25" fill-opacity="0.3" />
|
|
10
|
+
</svg>
|
|
11
|
+
</template>
|
|
@@ -3,3 +3,4 @@ export { default as JustifyContentFlexEnd } from './FlexEnd.vue';
|
|
|
3
3
|
export { default as JustifyContentFlexStart } from './FlexStart.vue';
|
|
4
4
|
export { default as JustifyContentSpaceAround } from './SpaceAround.vue';
|
|
5
5
|
export { default as JustifyContentSpaceBetween } from './SpaceBetween.vue';
|
|
6
|
+
export { default as JustifyContentSpaceEvenly } from './SpaceEvenly.vue';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M128 96h64v192H128zM224 160h544v64H224zM768 96L896 192 768 288zM256 384h640v64H256zM128 512h768v64H128zM384 640h512v64H384zM192 768h704v64H192z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M128 128h768v85.333333H128z m0 170.666667h768v85.333333H128z m0 170.666666h768v85.333334H128z m0 170.666667h768v85.333333H128z m0 170.666667h768v85.333333H128z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M64 64h896v48H64z m0 848h896v48H64z m0-800h48v800H64z m848 0h48v800h-48zM192 208h416v64H192z m416-48L768 240 608 320zM464 368h96v96h-96z m-64 96h224l-112 128zM192 608h640v56H192z m0 112h512v56H192z m0 112h576v56H192z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
d="M128 96h64v192H128zM224 160h544v64H224zM768 96L896 192 768 288zM128 384h640v64H128zM128 512h768v64H128zM128 640h512v64H128zM128 768h704v64H128z"
|
|
5
|
+
></path>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default as AlignLeft } from './Left.vue';
|
|
2
2
|
export { default as AlignCenter } from './Center.vue';
|
|
3
3
|
export { default as AlignRight } from './Right.vue';
|
|
4
|
+
export { default as AlignEnd } from './End.vue';
|
|
5
|
+
export { default as AlignJustify } from './Justify.vue';
|
|
6
|
+
export { default as AlignMatchParent } from './MatchParent.vue';
|
|
7
|
+
export { default as AlignStart } from './Start.vue';
|
package/src/fields/UISelect.vue
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<template v-if="val">
|
|
9
9
|
<TMagicTooltip v-if="!isCompare" content="清除" placement="top">
|
|
10
10
|
<TMagicButton
|
|
11
|
+
class="m-fields-ui-select__clear"
|
|
11
12
|
style="padding: 0"
|
|
12
13
|
type="danger"
|
|
13
14
|
:icon="Close"
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
|
|
21
22
|
<TMagicTooltip content="点击选中组件" placement="top">
|
|
22
23
|
<TMagicButton
|
|
24
|
+
class="m-fields-ui-select__name"
|
|
23
25
|
link
|
|
24
26
|
style="padding: 0; margin: 0"
|
|
25
27
|
:disabled="disabled"
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
@click="selectNode(val)"
|
|
28
30
|
@mouseenter="highlight(val)"
|
|
29
31
|
@mouseleave="unhighlight"
|
|
30
|
-
>{{ `${toName}_${val}` }}</TMagicButton
|
|
32
|
+
><span class="m-fields-ui-select__label">{{ `${toName}_${val}` }}</span></TMagicButton
|
|
31
33
|
>
|
|
32
34
|
</TMagicTooltip>
|
|
33
35
|
</template>
|
|
@@ -240,7 +240,7 @@ export const createActionsConfig = (config: EventSelectConfig): GroupListConfig
|
|
|
240
240
|
expandAll: true,
|
|
241
241
|
enableToggleMode: false,
|
|
242
242
|
titlePrefix: '动作',
|
|
243
|
-
|
|
243
|
+
labelWidth: '90px',
|
|
244
244
|
flat: true,
|
|
245
245
|
...stickyAddButton('新增动作'),
|
|
246
246
|
items: [
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
:size="propsPanelSize"
|
|
13
13
|
:init-values="values"
|
|
14
14
|
:config="config"
|
|
15
|
+
:form-key="formKey"
|
|
15
16
|
:type-match-valid="enablePropsFormValidate"
|
|
16
17
|
:context="formContext"
|
|
17
18
|
:validate-on-init="enablePropsFormValidate"
|
|
@@ -72,6 +73,8 @@ defineOptions({
|
|
|
72
73
|
const props = defineProps<{
|
|
73
74
|
config: FormConfig;
|
|
74
75
|
values: FormValue;
|
|
76
|
+
/** 当前选中节点的 id:切换节点后让 MForm 重挂叶子字段,避免表单实例状态串台 */
|
|
77
|
+
formKey?: string | number;
|
|
75
78
|
disabledShowSrc?: boolean;
|
|
76
79
|
labelWidth?: string;
|
|
77
80
|
codeValueKey?: string;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
:class="{ 'show-style-panel': showStylePanel }"
|
|
8
8
|
:config="curFormConfig"
|
|
9
9
|
:values="values"
|
|
10
|
+
:form-key="formKey"
|
|
10
11
|
:disabledShowSrc="disabledShowSrc"
|
|
11
12
|
@submit="(v, eventData, error) => submit(v, eventData, error, 'props')"
|
|
12
13
|
@submit-error="errorHandler"
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
code-value-key="style"
|
|
25
26
|
:config="styleFormConfig"
|
|
26
27
|
:values="values"
|
|
28
|
+
:form-key="formKey"
|
|
27
29
|
:disabledShowSrc="disabledShowSrc"
|
|
28
30
|
@submit="(v, eventData, error) => submit(v, eventData, error, 'style')"
|
|
29
31
|
@submit-error="errorHandler"
|
|
@@ -103,6 +105,11 @@ const values = ref<FormValue>({});
|
|
|
103
105
|
const curFormConfig = ref<any>([]);
|
|
104
106
|
const node = computed(() => editorService.get('node'));
|
|
105
107
|
const nodes = computed(() => editorService.get('nodes'));
|
|
108
|
+
// 同类型组件的配置结构完全一致,MForm 不会重建整棵表单树;用节点 id 标识数据实体,
|
|
109
|
+
// 让叶子字段在切换选中时重挂,避免上一个节点的字段本地状态(如事件动作参数)串到新节点。
|
|
110
|
+
// 必须跟随 values 而不是 node:values 在 getPropsConfig 异步返回后才更新,
|
|
111
|
+
// 若 key 先于 values 变化,叶子字段会以旧节点的值重挂,新值到达后不再重挂。
|
|
112
|
+
const formKey = computed(() => values.value.id ?? '');
|
|
106
113
|
|
|
107
114
|
const styleFormConfig = [
|
|
108
115
|
{
|