@tmagic/editor 1.8.0-manmanyu.9 → 1.8.0
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 +22 -13
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +10 -5
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +21 -122
- package/dist/es/components/ContentMenu.vue_vue_type_script_setup_true_lang.js +21 -5
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +62 -16
- 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 +3 -2
- package/dist/es/components/ScrollBar.js +0 -1
- package/dist/es/components/ScrollBar.vue_vue_type_script_setup_true_lang.js +5 -4
- 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 +1 -1
- 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 +56 -0
- package/dist/es/editorProps.js +7 -1
- package/dist/es/fields/Code.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CodeLink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +30 -113
- package/dist/es/fields/CodeSelectCol.vue_vue_type_script_setup_true_lang.js +2 -2
- 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 +7 -6
- package/dist/es/fields/DataSourceFieldSelect/Index.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +12 -4
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +9 -20
- package/dist/es/fields/DataSourceMethodSelect.vue_vue_type_script_setup_true_name_true_lang.js +2 -2
- package/dist/es/fields/DataSourceMethods.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +9 -4
- package/dist/es/fields/DataSourceSelect.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +10 -110
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +52 -363
- package/dist/es/fields/KeyValue.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/PageFragmentSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +3 -6
- package/dist/es/fields/StyleSetter/components/BackgroundPosition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/StyleSetter/components/Border.vue_vue_type_script_setup_true_lang.js +4 -35
- package/dist/es/fields/StyleSetter/components/Box.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/es/fields/StyleSetter/configs.js +663 -0
- package/dist/es/fields/StyleSetter/icons/align-items/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/FlexEnd.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/FlexStart.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceAround.js +1 -1
- package/dist/es/fields/StyleSetter/icons/align-items/SpaceBetween.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/NoRepeat.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/Repeat.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatX.js +1 -1
- package/dist/es/fields/StyleSetter/icons/background-repeat/RepeatY.js +1 -1
- 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 +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/ColumnReverse.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/Row.js +1 -1
- package/dist/es/fields/StyleSetter/icons/flex-direction/RowReverse.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/Center.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexEnd.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/FlexStart.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceAround.js +1 -1
- package/dist/es/fields/StyleSetter/icons/justify-content/SpaceBetween.js +1 -1
- 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 +29 -106
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +8 -11
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +30 -89
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +29 -297
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +29 -82
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +8 -24
- package/dist/es/fields/UISelect.js +0 -1
- package/dist/es/fields/UISelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/fields/configs/codeSelect.js +98 -0
- package/dist/es/fields/configs/displayConds.js +158 -0
- package/dist/es/fields/configs/eventSelect.js +225 -0
- package/dist/es/fields/configs/stickyAddButton.js +21 -0
- package/dist/es/fields/headless-validation.js +139 -0
- package/dist/es/headless.js +2 -0
- package/dist/es/hooks/use-code-block-edit.js +4 -2
- package/dist/es/hooks/use-compare-form.js +101 -0
- package/dist/es/hooks/use-form-context.js +29 -0
- package/dist/es/hooks/use-stage.js +1 -0
- 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 +1 -1
- package/dist/es/icons/FolderMinusIcon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/index.js +16 -8
- package/dist/es/initService.js +52 -16
- 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 +26 -10
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +11 -8
- package/dist/es/layouts/NavMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +1 -1
- package/dist/es/layouts/history-list/BucketTab.vue_vue_type_script_setup_true_lang.js +8 -5
- package/dist/es/layouts/history-list/GroupRow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +26 -10
- package/dist/es/layouts/history-list/HistoryListPanel.vue_vue_type_script_setup_true_lang.js +11 -13
- package/dist/es/layouts/history-list/InitialRow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/PageTab.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/es/layouts/history-list/composables.js +1 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +38 -33
- 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 +1 -1
- 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 -20
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +53 -35
- 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 +21 -36
- package/dist/es/layouts/sidebar/code-block/CodeBlockList.vue_vue_type_script_setup_true_lang.js +1 -1
- 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 +9 -4
- 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 +4 -4
- 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 +3 -3
- 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 +1 -1
- package/dist/es/layouts/sidebar/layer/LayerPanel.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/es/layouts/sidebar/layer/use-click.js +3 -3
- package/dist/es/layouts/sidebar/layer/use-drag.js +11 -10
- 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 +55 -9
- 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 +8 -8
- package/dist/es/plugin.js +35 -23
- package/dist/es/services/codeBlock.js +8 -3
- package/dist/es/services/dataSource.js +3 -0
- package/dist/es/services/dep.js +162 -41
- package/dist/es/services/editor.js +344 -113
- package/dist/es/services/events.js +4 -4
- package/dist/es/services/history.js +17 -1
- package/dist/es/services/keybinding.js +3 -3
- package/dist/es/services/props.js +2 -1
- package/dist/es/services/storage.js +2 -2
- package/dist/es/services/ui.js +7 -2
- package/dist/es/style.css +277 -114
- package/dist/es/utils/code-block.js +14 -7
- package/dist/es/utils/config.js +4 -1
- package/dist/es/utils/const.js +2 -2
- package/dist/es/utils/content-menu.js +2 -2
- package/dist/es/utils/data-source/index.js +34 -12
- package/dist/es/utils/dep/collect-worker-client.js +154 -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 +4 -2
- package/dist/es/utils/event.js +135 -0
- package/dist/es/utils/monaco-editor.js +22 -6
- package/dist/es/utils/operator.js +2 -2
- package/dist/es/utils/props.js +50 -106
- package/dist/es/utils/type-match-rules.js +356 -0
- package/dist/style.css +277 -114
- package/dist/themes/magic-admin.css +978 -175
- package/dist/tmagic-editor-headless.umd.cjs +10880 -0
- package/dist/tmagic-editor.umd.cjs +12695 -10896
- package/package.json +18 -13
- package/src/Editor.vue +23 -6
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CodeParams.vue +10 -4
- package/src/components/CompareForm.vue +20 -190
- package/src/components/ContentMenu.vue +34 -6
- package/src/components/FloatingBox.vue +71 -7
- package/src/components/ScrollBar.vue +0 -67
- package/src/components/ViewForm.vue +54 -0
- package/src/editorProps.ts +23 -10
- package/src/fields/Code.vue +1 -1
- package/src/fields/CodeSelect.vue +20 -113
- package/src/fields/CodeSelectCol.vue +1 -1
- package/src/fields/CondOpSelect.vue +5 -26
- package/src/fields/DataSourceFieldSelect/FieldSelect.vue +2 -2
- package/src/fields/DataSourceFieldSelect/Index.vue +4 -1
- package/src/fields/DataSourceFields.vue +5 -1
- package/src/fields/DataSourceInput.vue +10 -28
- package/src/fields/DataSourceMethodSelect.vue +1 -1
- package/src/fields/DataSourceMethods.vue +6 -2
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/fields/DataSourceSelect.vue +1 -1
- package/src/fields/DisplayConds.vue +17 -139
- package/src/fields/EventSelect.vue +29 -416
- package/src/fields/KeyValue.vue +1 -1
- package/src/fields/StyleSetter/Index.vue +2 -8
- package/src/fields/StyleSetter/components/Border.vue +4 -38
- package/src/fields/StyleSetter/components/Box.vue +1 -1
- package/src/fields/StyleSetter/components/Position.vue +1 -1
- package/src/fields/StyleSetter/configs.ts +690 -0
- package/src/fields/StyleSetter/pro/Background.vue +9 -64
- package/src/fields/StyleSetter/pro/Border.vue +5 -16
- package/src/fields/StyleSetter/pro/Font.vue +11 -71
- package/src/fields/StyleSetter/pro/Layout.vue +10 -230
- package/src/fields/StyleSetter/pro/Position.vue +11 -82
- package/src/fields/StyleSetter/pro/Transform.vue +6 -34
- package/src/fields/UISelect.vue +0 -12
- package/src/fields/configs/codeSelect.ts +127 -0
- package/src/fields/configs/displayConds.ts +184 -0
- package/src/fields/configs/eventSelect.ts +309 -0
- package/src/fields/configs/stickyAddButton.ts +32 -0
- package/src/fields/headless-validation.ts +177 -0
- package/src/headless.ts +33 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-compare-form.ts +166 -0
- package/src/hooks/use-form-context.ts +56 -0
- package/src/hooks/use-stage.ts +1 -0
- package/src/index.ts +9 -0
- package/src/initService.ts +73 -18
- package/src/layouts/CodeEditor.vue +32 -6
- package/src/layouts/Framework.vue +7 -6
- package/src/layouts/history-list/BucketTab.vue +2 -2
- package/src/layouts/history-list/HistoryDiffDialog.vue +33 -15
- package/src/layouts/history-list/HistoryListPanel.vue +16 -18
- package/src/layouts/history-list/useHistoryRevert.ts +57 -41
- package/src/layouts/props-panel/FormPanel.vue +75 -20
- package/src/layouts/props-panel/PropsPanel.vue +81 -30
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/ComponentListPanel.vue +6 -2
- package/src/layouts/sidebar/Sidebar.vue +5 -3
- 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 +3 -0
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +3 -3
- package/src/layouts/sidebar/data-source/useContentMenu.ts +14 -2
- package/src/layouts/sidebar/layer/LayerMenu.vue +2 -2
- package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
- package/src/layouts/sidebar/layer/LayerPanel.vue +5 -2
- 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 +80 -10
- package/src/layouts/workspace/viewer/ViewerMenu.vue +7 -7
- package/src/plugin.ts +35 -25
- package/src/services/codeBlock.ts +4 -0
- package/src/services/dataSource.ts +3 -0
- package/src/services/dep.ts +292 -47
- package/src/services/editor.ts +383 -120
- package/src/services/events.ts +8 -7
- package/src/services/history.ts +22 -1
- package/src/services/keybinding.ts +3 -3
- package/src/services/ui.ts +26 -5
- package/src/theme/code-block.scss +0 -37
- package/src/theme/display-conds.scss +4 -0
- package/src/theme/event.scss +25 -33
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/framework.scss +4 -1
- package/src/theme/layer-node-content.scss +14 -0
- package/src/theme/nav-menu.scss +5 -1
- package/src/theme/props-panel.scss +17 -3
- package/src/theme/scroll-bar.scss +64 -0
- package/src/theme/theme.scss +3 -0
- package/src/theme/themes/magic-admin/index.scss +109 -9
- package/src/theme/ui-select.scss +9 -0
- package/src/type.ts +216 -6
- package/src/utils/code-block.ts +1 -0
- package/src/utils/config.ts +9 -1
- package/src/utils/const.ts +3 -3
- package/src/utils/content-menu.ts +2 -2
- package/src/utils/data-source/index.ts +31 -12
- package/src/utils/dep/collect-worker-client.ts +215 -0
- package/src/utils/dep/idle-task.ts +104 -35
- package/src/utils/dep/worker.ts +113 -9
- package/src/utils/event.ts +237 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/monaco-editor.ts +27 -0
- package/src/utils/operator.ts +2 -2
- package/src/utils/props.ts +61 -122
- package/src/utils/type-match-rules.ts +697 -0
- package/types/headless.d.ts +17 -0
- package/types/index.d.ts +1199 -724
- package/src/fields/StyleSetter/icons/align-items/index copy.ts +0 -5
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Tencent. All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { EventOption, Id, MComponent, MContainer, MNode } from '@tmagic/core';
|
|
20
|
+
import type { CascaderOption } from '@tmagic/form';
|
|
21
|
+
import { DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX, traverseNode } from '@tmagic/utils';
|
|
22
|
+
|
|
23
|
+
import dataSourceService from '@editor/services/dataSource';
|
|
24
|
+
import editorService from '@editor/services/editor';
|
|
25
|
+
import eventsService from '@editor/services/events';
|
|
26
|
+
import { getCascaderOptionsFromFields } from '@editor/utils/data-source';
|
|
27
|
+
|
|
28
|
+
export const EVENT_NAME_VALUE_SEPARATOR = '.';
|
|
29
|
+
|
|
30
|
+
export type EventNameSelectOption = { text: string; value: string };
|
|
31
|
+
export type EventNameOption = EventOption | CascaderOption | EventNameSelectOption;
|
|
32
|
+
|
|
33
|
+
/** 与 EventSelect 中 checkStrictly 一致:component 为 false,其余为 true */
|
|
34
|
+
export const isEventNameCheckStrictly = (src?: string) => src !== 'component';
|
|
35
|
+
|
|
36
|
+
/** 将动作 method 值规范为与 collectEventNameOptionValues 一致的字符串(cascader 无 valueSeparator 时存数组) */
|
|
37
|
+
export const normalizeCompActionValue = (value: unknown): string => {
|
|
38
|
+
if (Array.isArray(value)) {
|
|
39
|
+
return value.map((item) => `${item}`).join(EVENT_NAME_VALUE_SEPARATOR);
|
|
40
|
+
}
|
|
41
|
+
if (value === null || value === undefined || value === '') {
|
|
42
|
+
return '';
|
|
43
|
+
}
|
|
44
|
+
return `${value}`;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 组装事件名称下拉/级联 options,与 EventSelect 默认 eventNameConfig.options 逻辑一致。
|
|
49
|
+
*/
|
|
50
|
+
export const getEventNameOptions = (
|
|
51
|
+
src: string | undefined,
|
|
52
|
+
formValue: Record<string, any> = {},
|
|
53
|
+
): EventNameOption[] => {
|
|
54
|
+
if (!formValue.type) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (src === 'component') {
|
|
59
|
+
const sourceNode = editorService.getNodeById(formValue.id) || (formValue as MNode);
|
|
60
|
+
let events: EventOption[] | CascaderOption[] = eventsService.getEvent(formValue.type, { node: sourceNode }) || [];
|
|
61
|
+
|
|
62
|
+
if (formValue.type === 'page-fragment-container' && formValue.pageFragmentId) {
|
|
63
|
+
const pageFragment = editorService.get('root')?.items?.find((page) => page.id === formValue.pageFragmentId);
|
|
64
|
+
if (!pageFragment) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
events = [
|
|
69
|
+
{
|
|
70
|
+
label: pageFragment.name || '页面片容器',
|
|
71
|
+
value: pageFragment.id,
|
|
72
|
+
children: events,
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
|
|
76
|
+
(pageFragment.items || []).forEach((item) => {
|
|
77
|
+
traverseNode<MComponent | MContainer>(item, (current) => {
|
|
78
|
+
if (!current.type) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const node = editorService.getNodeById(current.id) || current;
|
|
83
|
+
const nodeEvents = eventsService.getEvent(current.type, { node }) || [];
|
|
84
|
+
(events as CascaderOption[]).push({
|
|
85
|
+
label: `${current.name}_${current.id}`,
|
|
86
|
+
value: `${current.id}`,
|
|
87
|
+
children: nodeEvents,
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return events;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return (events as EventOption[]).map((option) => ({
|
|
96
|
+
text: option.label,
|
|
97
|
+
value: option.value,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (src === 'datasource') {
|
|
102
|
+
const events: EventNameOption[] = dataSourceService.getFormEvent(formValue.type) || [];
|
|
103
|
+
const dataSource = dataSourceService.getDataSourceById(formValue.id);
|
|
104
|
+
const fields = dataSource?.fields || [];
|
|
105
|
+
|
|
106
|
+
if (fields.length > 0) {
|
|
107
|
+
return [
|
|
108
|
+
...events,
|
|
109
|
+
{
|
|
110
|
+
label: '数据变化',
|
|
111
|
+
value: DATA_SOURCE_FIELDS_CHANGE_EVENT_PREFIX,
|
|
112
|
+
children: getCascaderOptionsFromFields(fields),
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return events;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return [];
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** 将 select / cascader options 展平为最终写入 name 的字符串集合(cascader 用 `.` 拼接) */
|
|
124
|
+
export const collectEventNameOptionValues = (
|
|
125
|
+
options: EventNameOption[],
|
|
126
|
+
checkStrictly: boolean,
|
|
127
|
+
prefix: any[] = [],
|
|
128
|
+
result: Set<string> = new Set(),
|
|
129
|
+
): Set<string> => {
|
|
130
|
+
options.forEach((option) => {
|
|
131
|
+
if (typeof option?.value === 'undefined') {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const path = [...prefix, option.value];
|
|
136
|
+
const joined = path.map((item) => `${item}`).join(EVENT_NAME_VALUE_SEPARATOR);
|
|
137
|
+
const children = 'children' in option ? option.children : undefined;
|
|
138
|
+
|
|
139
|
+
if (Array.isArray(children) && children.length) {
|
|
140
|
+
if (checkStrictly) {
|
|
141
|
+
result.add(joined);
|
|
142
|
+
}
|
|
143
|
+
collectEventNameOptionValues(children as EventNameOption[], checkStrictly, path, result);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
result.add(joined);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
return result;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 解析 event-select 允许的 name 集合。
|
|
155
|
+
* 自定义 eventNameConfig.options 时返回 null(跳过枚举校验)。
|
|
156
|
+
*/
|
|
157
|
+
export const getEventNameAllowedValues = (
|
|
158
|
+
config: { src?: string; eventNameConfig?: { options?: unknown } } = {},
|
|
159
|
+
formValue: Record<string, any> = {},
|
|
160
|
+
): Set<string> | null => {
|
|
161
|
+
if (typeof config.eventNameConfig?.options !== 'undefined') {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (config.src !== 'component' && config.src !== 'datasource') {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return collectEventNameOptionValues(getEventNameOptions(config.src, formValue), isEventNameCheckStrictly(config.src));
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 组装联动组件动作下拉/级联 options,与 EventSelect 默认 compActionConfig.options 逻辑一致。
|
|
174
|
+
*/
|
|
175
|
+
export const getCompActionOptions = (toId?: Id): EventNameOption[] => {
|
|
176
|
+
if (typeof toId === 'undefined' || toId === null || toId === '') {
|
|
177
|
+
return [];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const node = editorService.getNodeById(toId);
|
|
181
|
+
if (!node?.type) {
|
|
182
|
+
return [];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
let methods: EventOption[] | CascaderOption[] = eventsService.getMethod(node.type, { targetId: toId, node }) || [];
|
|
186
|
+
|
|
187
|
+
if (node.type === 'page-fragment-container' && node.pageFragmentId) {
|
|
188
|
+
const pageFragment = editorService.get('root')?.items?.find((page) => page.id === node.pageFragmentId);
|
|
189
|
+
if (!pageFragment) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
methods = [];
|
|
194
|
+
(pageFragment.items || []).forEach((item: MComponent | MContainer) => {
|
|
195
|
+
traverseNode<MComponent | MContainer>(item, (current) => {
|
|
196
|
+
const node = editorService.getNodeById(current.id) || current;
|
|
197
|
+
|
|
198
|
+
if (!current.type) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const nodeMethods = eventsService.getMethod(current.type, { targetId: current.id, node }) || [];
|
|
203
|
+
if (!nodeMethods.length) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
(methods as CascaderOption[]).push({
|
|
208
|
+
label: `${current.name}_${current.id}`,
|
|
209
|
+
value: `${current.id}`,
|
|
210
|
+
children: nodeMethods,
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
return methods;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return (methods as EventOption[]).map((method) => ({
|
|
219
|
+
text: method.label,
|
|
220
|
+
value: method.value,
|
|
221
|
+
}));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 解析 event-select 联动组件动作允许的 method 集合。
|
|
226
|
+
* 自定义 compActionConfig.options 时返回 null(跳过枚举校验)。
|
|
227
|
+
*/
|
|
228
|
+
export const getCompActionAllowedValues = (
|
|
229
|
+
config: { src?: string; compActionConfig?: { options?: unknown } } = {},
|
|
230
|
+
model: { to?: Id } = {},
|
|
231
|
+
): Set<string> | null => {
|
|
232
|
+
if (typeof config.compActionConfig?.options !== 'undefined') {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return collectEventNameOptionValues(getCompActionOptions(model.to), isEventNameCheckStrictly(config.src));
|
|
237
|
+
};
|
package/src/utils/index.ts
CHANGED
|
@@ -1,7 +1,34 @@
|
|
|
1
1
|
let cached: Promise<typeof import('monaco-editor')> | undefined;
|
|
2
2
|
|
|
3
|
+
// 是否为 Monaco 内部抛出的取消错误(Canceled)
|
|
4
|
+
// 销毁编辑器时,WordHighlighter 内部挂起的 Delayer 会被取消,
|
|
5
|
+
// 取消时 reject 出的 Canceled 错误没有 catch,会变成 "Uncaught (in promise) Canceled",
|
|
6
|
+
// 该错误本身无害,这里做一次性、全局的兜底处理,仅吞掉这类取消错误。
|
|
7
|
+
const isMonacoCanceledError = (reason: any): boolean => {
|
|
8
|
+
if (!reason) return false;
|
|
9
|
+
if (reason instanceof Error) {
|
|
10
|
+
return reason.name === 'Canceled' || reason.message === 'Canceled';
|
|
11
|
+
}
|
|
12
|
+
return reason === 'Canceled';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let canceledRejectionHandlerInstalled = false;
|
|
16
|
+
const installCanceledRejectionHandler = () => {
|
|
17
|
+
if (canceledRejectionHandlerInstalled || typeof globalThis.addEventListener !== 'function') return;
|
|
18
|
+
canceledRejectionHandlerInstalled = true;
|
|
19
|
+
|
|
20
|
+
globalThis.addEventListener('unhandledrejection', (event: PromiseRejectionEvent) => {
|
|
21
|
+
if (isMonacoCanceledError(event.reason)) {
|
|
22
|
+
// 阻止其冒泡到控制台,避免无意义的报错噪音
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
3
28
|
export default () => {
|
|
4
29
|
if (!cached) {
|
|
30
|
+
installCanceledRejectionHandler();
|
|
31
|
+
|
|
5
32
|
cached = Promise.all([import('emmet-monaco-es'), import('monaco-editor')]).then(([emmet, monaco]) => {
|
|
6
33
|
const { emmetHTML, emmetCSS } = emmet;
|
|
7
34
|
emmetHTML(monaco);
|
package/src/utils/operator.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { isEmpty } from 'lodash-es';
|
|
|
3
3
|
|
|
4
4
|
import type { Id, MContainer, MNode } from '@tmagic/core';
|
|
5
5
|
import { NodeType } from '@tmagic/core';
|
|
6
|
-
import { calcValueByFontsize, getElById, isPage,
|
|
6
|
+
import { calcValueByFontsize, getElById, isPage, isPageOrFragment } from '@tmagic/utils';
|
|
7
7
|
|
|
8
8
|
import editorService from '@editor/services/editor';
|
|
9
9
|
import propsService from '@editor/services/props';
|
|
@@ -58,7 +58,7 @@ export const beforePaste = (position: PastePosition, config: MNode[], doc?: Docu
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const root = editorService.get('root');
|
|
61
|
-
if ((
|
|
61
|
+
if (isPageOrFragment(pasteConfig) && root) {
|
|
62
62
|
pasteConfig.name = generatePageNameByApp(root, isPage(pasteConfig) ? NodeType.PAGE : NodeType.PAGE_FRAGMENT);
|
|
63
63
|
}
|
|
64
64
|
return pasteConfig as MNode;
|
package/src/utils/props.ts
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
19
|
import {
|
|
20
|
+
HookType,
|
|
21
21
|
NODE_CONDS_KEY,
|
|
22
22
|
NODE_CONDS_RESULT_KEY,
|
|
23
23
|
NODE_DISABLE_CODE_BLOCK_KEY,
|
|
@@ -45,10 +45,35 @@ export const numberOptions = [
|
|
|
45
45
|
{ text: '不在范围内', value: 'not_between' },
|
|
46
46
|
];
|
|
47
47
|
|
|
48
|
+
export const booleanOptions = [
|
|
49
|
+
{ text: '是', value: 'is' },
|
|
50
|
+
{ text: '不是', value: 'not' },
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
/** 按字段类型返回条件运算符选项(UI 与 typeMatch 校验共用) */
|
|
54
|
+
export const getCondOpOptionsByFieldType = (type: string) => {
|
|
55
|
+
if (type === 'array') {
|
|
56
|
+
return arrayOptions;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (type === 'boolean' || type === 'null') {
|
|
60
|
+
return booleanOptions;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (type === 'number') {
|
|
64
|
+
return [...eqOptions, ...numberOptions];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (type === 'string') {
|
|
68
|
+
return [...arrayOptions, ...eqOptions];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return [...arrayOptions, ...eqOptions, ...numberOptions];
|
|
72
|
+
};
|
|
73
|
+
|
|
48
74
|
export const styleTabConfig: TabPaneConfig = {
|
|
49
75
|
title: '样式',
|
|
50
|
-
|
|
51
|
-
display: ({ services }: any) => !(services.uiService.get('showStylePanel') ?? true),
|
|
76
|
+
display: ({ services }: any) => !(services?.uiService?.get('showStylePanel') ?? true),
|
|
52
77
|
items: [
|
|
53
78
|
{
|
|
54
79
|
name: 'style',
|
|
@@ -120,171 +145,87 @@ export const styleTabConfig: TabPaneConfig = {
|
|
|
120
145
|
|
|
121
146
|
export const eventTabConfig: TabPaneConfig = {
|
|
122
147
|
title: '事件',
|
|
123
|
-
lazy: true,
|
|
124
148
|
items: [
|
|
125
149
|
{
|
|
126
150
|
name: 'events',
|
|
127
151
|
src: 'component',
|
|
128
152
|
labelWidth: '100px',
|
|
129
153
|
type: 'event-select',
|
|
154
|
+
defaultValue: [],
|
|
155
|
+
rules: [{ typeMatch: true }],
|
|
130
156
|
},
|
|
131
157
|
],
|
|
132
158
|
};
|
|
133
159
|
|
|
134
|
-
const getReportTypeConfig = ({ reportType }: { reportType: 'click' | 'expose' }) => {
|
|
135
|
-
const reportLabel = {
|
|
136
|
-
click: '点击',
|
|
137
|
-
expose: '曝光',
|
|
138
|
-
};
|
|
139
|
-
const label = reportLabel[reportType];
|
|
140
|
-
return {
|
|
141
|
-
name: reportType,
|
|
142
|
-
style: {
|
|
143
|
-
backgroundColor: '#fff',
|
|
144
|
-
borderRadius: '4px',
|
|
145
|
-
padding: '16px',
|
|
146
|
-
marginBottom: '10px',
|
|
147
|
-
},
|
|
148
|
-
items: [
|
|
149
|
-
{
|
|
150
|
-
text: label,
|
|
151
|
-
static: true,
|
|
152
|
-
labelPosition: 'left',
|
|
153
|
-
labelWidth: '200px',
|
|
154
|
-
className: 'm-fields-title-container',
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'f_module',
|
|
158
|
-
type: 'data-source-field-select',
|
|
159
|
-
fieldConfig: {
|
|
160
|
-
type: 'text',
|
|
161
|
-
},
|
|
162
|
-
checkStrictly: false,
|
|
163
|
-
dataSourceFieldType: ['string'],
|
|
164
|
-
disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
|
|
165
|
-
text: 'f_module',
|
|
166
|
-
labelPosition: 'left',
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
name: 'f_resource',
|
|
170
|
-
type: 'data-source-field-select',
|
|
171
|
-
fieldConfig: {
|
|
172
|
-
type: 'text',
|
|
173
|
-
},
|
|
174
|
-
checkStrictly: false,
|
|
175
|
-
dataSourceFieldType: ['string'],
|
|
176
|
-
disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
|
|
177
|
-
text: 'f_resource',
|
|
178
|
-
labelPosition: 'left',
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
name: 'f_type',
|
|
182
|
-
type: 'data-source-field-select',
|
|
183
|
-
fieldConfig: {
|
|
184
|
-
type: 'text',
|
|
185
|
-
},
|
|
186
|
-
checkStrictly: false,
|
|
187
|
-
dataSourceFieldType: ['string', 'number'],
|
|
188
|
-
disabled: (_vm: any, { formValue }: any) => !formValue?.report?.custom,
|
|
189
|
-
text: 'f_type',
|
|
190
|
-
labelPosition: 'left',
|
|
191
|
-
},
|
|
192
|
-
],
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
|
|
196
160
|
export const advancedTabConfig: TabPaneConfig = {
|
|
197
161
|
title: '高级',
|
|
198
|
-
lazy: true,
|
|
199
162
|
items: [
|
|
200
|
-
{
|
|
201
|
-
type: 'link',
|
|
202
|
-
displayText: '点击查看配置指南',
|
|
203
|
-
href: 'https://iwiki.woa.com/pages/viewpage.action?pageId=827749220',
|
|
204
|
-
css: 'color: #F56C6C;font-weight: bold',
|
|
205
|
-
} as any,
|
|
206
163
|
{
|
|
207
164
|
name: NODE_DISABLE_CODE_BLOCK_KEY,
|
|
208
165
|
text: '禁用代码块',
|
|
209
166
|
type: 'switch',
|
|
210
|
-
labelPosition: 'left',
|
|
211
167
|
defaultValue: false,
|
|
212
168
|
extra: '开启后,配置的代码块将不会被执行',
|
|
213
|
-
style: {
|
|
214
|
-
padding: '0 22px',
|
|
215
|
-
},
|
|
216
169
|
},
|
|
217
170
|
{
|
|
218
171
|
name: NODE_DISABLE_DATA_SOURCE_KEY,
|
|
219
172
|
text: '禁用数据源',
|
|
220
173
|
type: 'switch',
|
|
221
|
-
labelPosition: 'left',
|
|
222
174
|
defaultValue: false,
|
|
223
175
|
extra: '开启后,组件内配置的数据源相关配置将不会被编译,显隐条件将失效',
|
|
224
|
-
style: {
|
|
225
|
-
padding: '0 22px',
|
|
226
|
-
},
|
|
227
176
|
},
|
|
228
177
|
{
|
|
229
178
|
name: 'created',
|
|
230
179
|
text: 'Created',
|
|
231
|
-
flat: true,
|
|
232
180
|
labelPosition: 'top',
|
|
233
181
|
type: 'code-select',
|
|
234
182
|
titleExtra: '组件初始化时执行',
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
183
|
+
rules: [
|
|
184
|
+
{ typeMatch: true, trigger: 'change' },
|
|
185
|
+
{
|
|
186
|
+
validator: ({ value, callback }: any) => {
|
|
187
|
+
if (value && value.hookType !== HookType.CODE) {
|
|
188
|
+
return callback('hookType 必须是 code');
|
|
189
|
+
}
|
|
190
|
+
callback();
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
],
|
|
238
194
|
},
|
|
239
195
|
{
|
|
240
196
|
name: 'mounted',
|
|
241
197
|
text: 'Mounted',
|
|
242
198
|
labelPosition: 'top',
|
|
243
|
-
flat: true,
|
|
244
|
-
|
|
245
199
|
type: 'code-select',
|
|
246
200
|
titleExtra: '组件挂载到dom时执行',
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
201
|
+
rules: [
|
|
202
|
+
{ typeMatch: true, trigger: 'change' },
|
|
203
|
+
{
|
|
204
|
+
validator: ({ value, callback }: any) => {
|
|
205
|
+
if (value && value.hookType !== HookType.CODE) {
|
|
206
|
+
return callback('hookType 必须是 code');
|
|
207
|
+
}
|
|
208
|
+
callback();
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
],
|
|
250
212
|
},
|
|
251
213
|
{
|
|
252
214
|
name: 'display',
|
|
253
215
|
text: 'Display',
|
|
254
|
-
flat: true,
|
|
255
216
|
titleExtra: '控制组件是否渲染,关系的代码块返回值为false时不渲染',
|
|
256
217
|
labelPosition: 'top',
|
|
257
218
|
type: 'code-select',
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
type: 'fieldset',
|
|
264
|
-
legend: '上报',
|
|
265
|
-
labelWidth: '80px',
|
|
266
|
-
name: 'report',
|
|
267
|
-
className: 'no-border-fieldset',
|
|
268
|
-
style: {
|
|
269
|
-
paddingTop: '10px',
|
|
270
|
-
},
|
|
271
|
-
items: [
|
|
219
|
+
rules: [
|
|
220
|
+
{ typeMatch: true, trigger: 'change' },
|
|
272
221
|
{
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
defaultValue: false,
|
|
280
|
-
labelWidth: '120px',
|
|
281
|
-
text: '开启自定义',
|
|
282
|
-
extra: '开启自定义后可以手动修改上报内容,关闭后会自动生成上报内容',
|
|
283
|
-
},
|
|
284
|
-
],
|
|
222
|
+
validator: ({ value, callback }: any) => {
|
|
223
|
+
if (value && value.hookType !== HookType.CODE) {
|
|
224
|
+
return callback('hookType 必须是 code');
|
|
225
|
+
}
|
|
226
|
+
callback();
|
|
227
|
+
},
|
|
285
228
|
},
|
|
286
|
-
getReportTypeConfig({ reportType: 'click' }),
|
|
287
|
-
getReportTypeConfig({ reportType: 'expose' }) as any,
|
|
288
229
|
],
|
|
289
230
|
},
|
|
290
231
|
],
|
|
@@ -315,10 +256,8 @@ export const displayTabConfig: TabPaneConfig<DisplayCondsConfig> = {
|
|
|
315
256
|
type: 'display-conds',
|
|
316
257
|
name: NODE_CONDS_KEY,
|
|
317
258
|
titlePrefix: '条件组',
|
|
318
|
-
flat: true,
|
|
319
|
-
fixed: 'right',
|
|
320
|
-
operateColWidth: 112,
|
|
321
259
|
defaultValue: [],
|
|
260
|
+
rules: [{ typeMatch: true }],
|
|
322
261
|
},
|
|
323
262
|
],
|
|
324
263
|
};
|