@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
|
@@ -20,12 +20,29 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<template #tree-node-tool="{ data }">
|
|
23
|
-
<TMagicTooltip v-if="data.type === 'code'" effect="dark" :content="editable ? '编辑' : '查看'" placement="
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
<TMagicTooltip v-if="data.type === 'code'" effect="dark" :content="editable ? '编辑' : '查看'" placement="left">
|
|
24
|
+
<TMagicButton
|
|
25
|
+
link
|
|
26
|
+
:icon="editable ? Edit : View"
|
|
27
|
+
class="edit-icon"
|
|
28
|
+
@click.stop="editCode(`${data.key}`)"
|
|
29
|
+
></TMagicButton>
|
|
28
30
|
</TMagicTooltip>
|
|
31
|
+
<TMagicPopconfirm
|
|
32
|
+
v-if="data.type === 'code' && editable"
|
|
33
|
+
title="确定删除该代码块吗?"
|
|
34
|
+
placement="right"
|
|
35
|
+
:teleported="true"
|
|
36
|
+
@confirm="deleteCode(`${data.key}`, { historySource: 'tree' })"
|
|
37
|
+
>
|
|
38
|
+
<template #reference>
|
|
39
|
+
<span class="delete-icon-wrapper" @click.stop="deleteClickHandler(`${data.key}`)">
|
|
40
|
+
<TMagicTooltip effect="dark" content="删除" placement="right">
|
|
41
|
+
<TMagicButton link :icon="Close" class="edit-icon"></TMagicButton>
|
|
42
|
+
</TMagicTooltip>
|
|
43
|
+
</span>
|
|
44
|
+
</template>
|
|
45
|
+
</TMagicPopconfirm>
|
|
29
46
|
<slot name="code-block-panel-tool" :id="data.key" :data="data"></slot>
|
|
30
47
|
</template>
|
|
31
48
|
</Tree>
|
|
@@ -37,9 +54,8 @@ import { Close, Edit, View } from '@element-plus/icons-vue';
|
|
|
37
54
|
|
|
38
55
|
import type { Id, MNode } from '@tmagic/core';
|
|
39
56
|
import { DepTargetType } from '@tmagic/core';
|
|
40
|
-
import { tMagicMessage,
|
|
57
|
+
import { TMagicButton, tMagicMessage, TMagicPopconfirm, TMagicTooltip } from '@tmagic/design';
|
|
41
58
|
|
|
42
|
-
import Icon from '@editor/components/Icon.vue';
|
|
43
59
|
import Tree from '@editor/components/Tree.vue';
|
|
44
60
|
import { useFilter } from '@editor/hooks/use-filter';
|
|
45
61
|
import { useNodeStatus } from '@editor/hooks/use-node-status';
|
|
@@ -142,29 +158,38 @@ const editCode = (id: string) => {
|
|
|
142
158
|
emit('edit', id);
|
|
143
159
|
};
|
|
144
160
|
|
|
145
|
-
|
|
161
|
+
/** 返回不能删除的原因,可删除时返回 undefined */
|
|
162
|
+
const getDeleteErrorType = (id: string): CodeDeleteErrorType | undefined => {
|
|
146
163
|
const currentCode = codeList.value.find((codeItem) => codeItem.id === id);
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
if (currentCode?.items?.length) {
|
|
165
|
+
return CodeDeleteErrorType.BIND;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return (codeBlockService.getUndeletableList() || []).includes(id) ? CodeDeleteErrorType.UNDELETEABLE : undefined;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/** 删除确认由 TMagicPopconfirm 完成,这里只做校验与删除 */
|
|
172
|
+
const deleteCode = (id: string, { historySource }: { historySource?: HistoryOpSource } = {}) => {
|
|
173
|
+
const errorType = getDeleteErrorType(id);
|
|
174
|
+
|
|
175
|
+
if (errorType) {
|
|
159
176
|
if (typeof props.customError === 'function') {
|
|
160
|
-
props.customError(id,
|
|
177
|
+
props.customError(id, errorType);
|
|
178
|
+
} else if (errorType === CodeDeleteErrorType.BIND) {
|
|
179
|
+
tMagicMessage.error('代码块存在绑定关系,不可删除');
|
|
161
180
|
} else {
|
|
162
|
-
|
|
163
|
-
tMagicMessage.error('代码块存在绑定关系,不可删除');
|
|
164
|
-
} else {
|
|
165
|
-
tMagicMessage.error('代码块不可删除');
|
|
166
|
-
}
|
|
181
|
+
tMagicMessage.error('代码块不可删除');
|
|
167
182
|
}
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
emit('remove', id, { historySource });
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/** 不可删除的代码块点击后直接说明原因,无需等待确认 */
|
|
190
|
+
const deleteClickHandler = (id: string) => {
|
|
191
|
+
if (getDeleteErrorType(id)) {
|
|
192
|
+
deleteCode(id, { historySource: 'tree' });
|
|
168
193
|
}
|
|
169
194
|
};
|
|
170
195
|
|
|
@@ -19,12 +19,29 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
21
21
|
<template #tree-node-tool="{ data }">
|
|
22
|
-
<TMagicTooltip v-if="data.type === 'ds'" effect="dark" :content="editable ? '编辑' : '查看'" placement="
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
<TMagicTooltip v-if="data.type === 'ds'" effect="dark" :content="editable ? '编辑' : '查看'" placement="left">
|
|
23
|
+
<TMagicButton
|
|
24
|
+
link
|
|
25
|
+
:icon="editable ? Edit : View"
|
|
26
|
+
class="edit-icon"
|
|
27
|
+
@click.stop="editHandler(`${data.key}`)"
|
|
28
|
+
></TMagicButton>
|
|
27
29
|
</TMagicTooltip>
|
|
30
|
+
<TMagicPopconfirm
|
|
31
|
+
v-if="data.type === 'ds' && editable"
|
|
32
|
+
title="确定删除?"
|
|
33
|
+
placement="right"
|
|
34
|
+
:teleported="true"
|
|
35
|
+
@confirm="removeHandler(`${data.key}`)"
|
|
36
|
+
>
|
|
37
|
+
<template #reference>
|
|
38
|
+
<span class="delete-icon-wrapper" @click.stop>
|
|
39
|
+
<TMagicTooltip effect="dark" content="删除" placement="right">
|
|
40
|
+
<TMagicButton link :icon="Close" class="edit-icon"></TMagicButton>
|
|
41
|
+
</TMagicTooltip>
|
|
42
|
+
</span>
|
|
43
|
+
</template>
|
|
44
|
+
</TMagicPopconfirm>
|
|
28
45
|
<slot name="data-source-panel-tool" :data="data"></slot>
|
|
29
46
|
</template>
|
|
30
47
|
</Tree>
|
|
@@ -35,9 +52,8 @@ import { computed } from 'vue';
|
|
|
35
52
|
import { Close, Edit, View } from '@element-plus/icons-vue';
|
|
36
53
|
|
|
37
54
|
import { DepData, DepTargetType, Id, MNode } from '@tmagic/core';
|
|
38
|
-
import { TMagicTooltip } from '@tmagic/design';
|
|
55
|
+
import { TMagicButton, TMagicPopconfirm, TMagicTooltip } from '@tmagic/design';
|
|
39
56
|
|
|
40
|
-
import Icon from '@editor/components/Icon.vue';
|
|
41
57
|
import Tree from '@editor/components/Tree.vue';
|
|
42
58
|
import { useFilter } from '@editor/hooks/use-filter';
|
|
43
59
|
import { useNodeStatus } from '@editor/hooks/use-node-status';
|
|
@@ -156,7 +172,7 @@ const editHandler = (id: string) => {
|
|
|
156
172
|
emit('edit', id);
|
|
157
173
|
};
|
|
158
174
|
|
|
159
|
-
const removeHandler =
|
|
175
|
+
const removeHandler = (id: string) => {
|
|
160
176
|
emit('remove', id);
|
|
161
177
|
};
|
|
162
178
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
import { computed, inject, ref, useTemplateRef, watch } from 'vue';
|
|
51
51
|
import { mergeWith } from 'lodash-es';
|
|
52
52
|
|
|
53
|
-
import {
|
|
53
|
+
import { TMagicScrollbar } from '@tmagic/design';
|
|
54
54
|
|
|
55
55
|
import ContentMenu from '@editor/components/ContentMenu.vue';
|
|
56
56
|
import SearchInput from '@editor/components/SearchInput.vue';
|
|
@@ -133,13 +133,8 @@ const addHandler = (type: string) => {
|
|
|
133
133
|
editDialog.value.show();
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
confirmButtonText: '确定',
|
|
139
|
-
cancelButtonText: '取消',
|
|
140
|
-
type: 'warning',
|
|
141
|
-
});
|
|
142
|
-
|
|
136
|
+
/** 删除确认由 DataSourceList 中的 TMagicPopconfirm 完成,这里只负责执行删除 */
|
|
137
|
+
const removeHandler = (id: string) => {
|
|
143
138
|
dataSourceService.remove(id, { historySource: 'tree-contextmenu' });
|
|
144
139
|
};
|
|
145
140
|
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
|
|
36
36
|
import type {
|
|
37
37
|
AddMNode,
|
|
38
|
+
AddOpOptions,
|
|
38
39
|
AsyncHookPlugin,
|
|
39
40
|
AsyncMethodName,
|
|
40
41
|
CanDropInFunction,
|
|
@@ -85,9 +86,11 @@ import { Protocol } from './WebStorage';
|
|
|
85
86
|
|
|
86
87
|
type MoveItem = { node: MNode; parent: MContainer; pageForOp: { name: string; id: Id } | null };
|
|
87
88
|
|
|
88
|
-
/**
|
|
89
|
-
const clampIndex = (index: number | undefined, length: number): number =>
|
|
90
|
-
typeof index === 'number'
|
|
89
|
+
/** 把插入下标收敛到 [0, length]:非整数取整,非法 / 越界(含未记录)一律追加到末尾 */
|
|
90
|
+
const clampIndex = (index: number | undefined, length: number): number => {
|
|
91
|
+
const normalized = typeof index === 'number' ? Math.trunc(index) : length;
|
|
92
|
+
return Number.isFinite(normalized) && normalized >= 0 && normalized <= length ? normalized : length;
|
|
93
|
+
};
|
|
91
94
|
|
|
92
95
|
/**
|
|
93
96
|
* 把「变更前后节点快照」列表归一成 update 类型的 {@link StepDiffItem} 列表,供 {@link StepValue.diff} 使用。
|
|
@@ -434,30 +437,44 @@ class Editor extends BaseService {
|
|
|
434
437
|
return this.config;
|
|
435
438
|
}
|
|
436
439
|
|
|
437
|
-
public async doAdd(node: MNode, parent: MContainer,
|
|
440
|
+
public async doAdd(node: MNode, parent: MContainer, options: AddOpOptions = {}): Promise<MNode> {
|
|
438
441
|
const root = this.get('root');
|
|
439
442
|
|
|
440
443
|
if (!root) throw new Error('root为空');
|
|
441
444
|
|
|
442
445
|
const curNode = this.get('node');
|
|
443
446
|
const stage = this.get('stage');
|
|
447
|
+
const explicitIndex = options.insertIndex;
|
|
444
448
|
|
|
445
|
-
|
|
449
|
+
// 未指定 insertIndex 时需要选中节点作为锚点;显式下标不依赖选中状态
|
|
450
|
+
if (!curNode && explicitIndex === undefined) throw new Error('当前选中节点为空');
|
|
446
451
|
|
|
447
452
|
if ((parent.type === NodeType.ROOT || curNode?.type === NodeType.ROOT) && !isPageOrFragment(node)) {
|
|
448
453
|
throw new Error('app下不能添加组件');
|
|
449
454
|
}
|
|
450
455
|
|
|
451
|
-
//
|
|
452
|
-
// 锚点节点可能已不在 items 中(被删 / DSL
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
456
|
+
// 默认:连续 add 时接在上一个新增节点之后,否则接在当前选中节点之后;
|
|
457
|
+
// 锚点节点可能已不在 items 中(被删 / DSL 整体替换),回退到当前选中节点,都不在则追加到末尾。
|
|
458
|
+
// 指定 insertIndex 时按显式下标插入,批量写入顺序不再受编辑器选中状态影响。
|
|
459
|
+
let insertIndex: number;
|
|
460
|
+
if (explicitIndex === 'end') {
|
|
461
|
+
insertIndex = parent.items.length;
|
|
462
|
+
} else if (typeof explicitIndex === 'number') {
|
|
463
|
+
insertIndex = clampIndex(explicitIndex, parent.items.length);
|
|
464
|
+
} else {
|
|
465
|
+
// 上面的校验已保证锚点分支存在选中节点
|
|
466
|
+
const selectedId = curNode!.id;
|
|
467
|
+
const anchorId = this.lastAdded?.selectedId === selectedId ? this.lastAdded.nodeId : selectedId;
|
|
468
|
+
const anchorIndex = isPageOrFragment(node)
|
|
469
|
+
? -1
|
|
470
|
+
: Math.max(getNodeIndex(anchorId, parent), getNodeIndex(selectedId, parent));
|
|
471
|
+
insertIndex = anchorIndex < 0 ? parent.items.length : anchorIndex + 1;
|
|
472
|
+
}
|
|
458
473
|
|
|
459
474
|
parent.items.splice(insertIndex, 0, node);
|
|
460
|
-
|
|
475
|
+
if (curNode) {
|
|
476
|
+
this.lastAdded = { selectedId: curNode.id, nodeId: node.id };
|
|
477
|
+
}
|
|
461
478
|
|
|
462
479
|
const layout = await this.getLayout(this.toRaw(parent), node as MNode);
|
|
463
480
|
node.style = getInitPositionStyle(node.style, layout);
|
|
@@ -492,7 +509,7 @@ class Editor extends BaseService {
|
|
|
492
509
|
public async add(
|
|
493
510
|
addNode: AddMNode | MNode[],
|
|
494
511
|
parent?: MContainer | null,
|
|
495
|
-
options:
|
|
512
|
+
options: AddOpOptions = {},
|
|
496
513
|
): Promise<MNode | MNode[]> {
|
|
497
514
|
this.captureSelectionBeforeOp();
|
|
498
515
|
|
|
@@ -532,8 +549,15 @@ class Editor extends BaseService {
|
|
|
532
549
|
// 校验放在真正修改 DSL 之前,strict 模式下校验不通过则整批都不会被添加
|
|
533
550
|
const commitInvalid = await this.runGuard(() => this.ctx.validator.guardAdd(targets));
|
|
534
551
|
|
|
552
|
+
// 数字下标是整批节点的起始位置:按父容器分别累计偏移,保证批量写入保持传入顺序
|
|
553
|
+
const explicitIndex = options.insertIndex;
|
|
554
|
+
const offsets = new Map<Id, number>();
|
|
535
555
|
for (const { node, parentNode } of targets) {
|
|
536
|
-
|
|
556
|
+
const offset = offsets.get(parentNode.id) ?? 0;
|
|
557
|
+
offsets.set(parentNode.id, offset + 1);
|
|
558
|
+
const nodeOptions =
|
|
559
|
+
typeof explicitIndex === 'number' ? { ...options, insertIndex: Math.trunc(explicitIndex) + offset } : options;
|
|
560
|
+
newNodes.push(await this.doAdd(node, parentNode, nodeOptions));
|
|
537
561
|
}
|
|
538
562
|
|
|
539
563
|
// record 模式:在写入历史记录之前落库,使历史快照包含本次的错误状态
|
|
@@ -1369,7 +1393,7 @@ class Editor extends BaseService {
|
|
|
1369
1393
|
public async addAndGetHistoryId(
|
|
1370
1394
|
addNode: AddMNode | MNode[],
|
|
1371
1395
|
parent?: MContainer | null,
|
|
1372
|
-
options:
|
|
1396
|
+
options: AddOpOptions = {},
|
|
1373
1397
|
): Promise<DslOpWithHistoryIdsResult<MNode | MNode[]>> {
|
|
1374
1398
|
this.lastPushedHistoryId = null;
|
|
1375
1399
|
const result = await this.add(addNode, parent, options);
|
package/src/sdk/utils/props.ts
CHANGED
|
@@ -176,9 +176,9 @@ export const advancedTabConfig: TabPaneConfig = {
|
|
|
176
176
|
{
|
|
177
177
|
name: 'created',
|
|
178
178
|
text: 'Created',
|
|
179
|
-
labelPosition: 'top',
|
|
180
179
|
type: 'code-select',
|
|
181
180
|
titleExtra: '组件初始化时执行',
|
|
181
|
+
labelWidth: '90px',
|
|
182
182
|
rules: [
|
|
183
183
|
{ typeMatch: true, trigger: 'change' },
|
|
184
184
|
{
|
|
@@ -194,8 +194,8 @@ export const advancedTabConfig: TabPaneConfig = {
|
|
|
194
194
|
{
|
|
195
195
|
name: 'mounted',
|
|
196
196
|
text: 'Mounted',
|
|
197
|
-
labelPosition: 'top',
|
|
198
197
|
type: 'code-select',
|
|
198
|
+
labelWidth: '90px',
|
|
199
199
|
titleExtra: '组件挂载到dom时执行',
|
|
200
200
|
rules: [
|
|
201
201
|
{ typeMatch: true, trigger: 'change' },
|
|
@@ -213,7 +213,7 @@ export const advancedTabConfig: TabPaneConfig = {
|
|
|
213
213
|
name: 'display',
|
|
214
214
|
text: 'Display',
|
|
215
215
|
titleExtra: '控制组件是否渲染,关系的代码块返回值为false时不渲染',
|
|
216
|
-
|
|
216
|
+
labelWidth: '90px',
|
|
217
217
|
type: 'code-select',
|
|
218
218
|
rules: [
|
|
219
219
|
{ typeMatch: true, trigger: 'change' },
|
package/src/theme/tree.scss
CHANGED
|
@@ -76,9 +76,21 @@
|
|
|
76
76
|
display: flex;
|
|
77
77
|
align-items: center;
|
|
78
78
|
|
|
79
|
+
// Element Plus 的 link 按钮左右 padding 是 2px,TDesign 的 text 变体默认
|
|
80
|
+
// 为 calc(var(--td-comp-paddingLR-l) - 1px)(15px),会把工具栏图标按钮撑宽。
|
|
81
|
+
.t-button--variant-text {
|
|
82
|
+
padding-left: 2px;
|
|
83
|
+
padding-right: 2px;
|
|
84
|
+
}
|
|
85
|
+
|
|
79
86
|
.tmagic-design-icon {
|
|
80
87
|
margin-right: 10px;
|
|
81
88
|
}
|
|
89
|
+
|
|
90
|
+
.delete-icon-wrapper {
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
82
94
|
}
|
|
83
95
|
}
|
|
84
96
|
}
|
package/src/theme/ui-select.scss
CHANGED
|
@@ -1,9 +1,40 @@
|
|
|
1
1
|
.m-fields-ui-select {
|
|
2
2
|
cursor: pointer;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
|
|
3
6
|
i {
|
|
4
7
|
margin-right: 3px;
|
|
5
8
|
}
|
|
6
9
|
span {
|
|
7
10
|
color: var(--el-color-primary, #2882e0);
|
|
8
11
|
}
|
|
12
|
+
|
|
13
|
+
.m-fields-ui-select__clear {
|
|
14
|
+
flex: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.m-fields-ui-select__name {
|
|
18
|
+
min-width: 0;
|
|
19
|
+
max-width: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
// 按钮组件会把默认插槽再包一层 span,解除它的最小宽度后文案才能收缩打点
|
|
23
|
+
> span,
|
|
24
|
+
.t-button__text {
|
|
25
|
+
display: block;
|
|
26
|
+
min-width: 0;
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.m-fields-ui-select__label {
|
|
32
|
+
display: block;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
text-align: left;
|
|
39
|
+
}
|
|
9
40
|
}
|
package/src/type.ts
CHANGED
|
@@ -1491,6 +1491,19 @@ export interface DslOpOptions extends HistoryOpOptions {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
// #endregion DslOpOptions
|
|
1493
1493
|
|
|
1494
|
+
// #region AddOpOptions
|
|
1495
|
+
/**
|
|
1496
|
+
* {@link EditorService.add} / {@link EditorService.doAdd} 的额外配置
|
|
1497
|
+
* - insertIndex: 插入下标,落在 [0, 父容器 items.length];'end' 表示固定追加到末尾。
|
|
1498
|
+
* 指定后不再按当前选中节点与上一次新增节点计算锚点,也不要求有选中节点;越界 / 非数字一律追加到末尾。
|
|
1499
|
+
* 批量 add 时数字下标是本批节点的起始位置,按父容器分别累计偏移,保持传入顺序;'end' 逐个追加。
|
|
1500
|
+
* 页面 / 页面片作用于 root.items,同样不再固定追加到末尾。人工添加不传,沿用锚点行为。
|
|
1501
|
+
*/
|
|
1502
|
+
export interface AddOpOptions extends DslOpOptions {
|
|
1503
|
+
insertIndex?: number | 'end';
|
|
1504
|
+
}
|
|
1505
|
+
// #endregion AddOpOptions
|
|
1506
|
+
|
|
1494
1507
|
// #region UpdateOptions
|
|
1495
1508
|
/**
|
|
1496
1509
|
* {@link EditorService.update} / {@link EditorService.doUpdate} 的额外数据
|