@tmagic/editor 1.8.0-beta.11 → 1.8.0-beta.13
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 +7 -4
- package/dist/es/components/CodeBlockEditor.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/es/components/CodeParams.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/es/components/CompareForm.vue_vue_type_script_setup_true_lang.js +18 -123
- package/dist/es/components/FloatingBox.vue_vue_type_script_setup_true_lang.js +60 -14
- package/dist/es/components/ScrollBar.js +0 -1
- package/dist/es/components/ViewForm.js +5 -0
- package/dist/es/components/ViewForm.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/es/editorProps.js +6 -1
- package/dist/es/fields/CodeSelect.vue_vue_type_script_setup_true_lang.js +15 -3
- package/dist/es/fields/CondOpSelect.vue_vue_type_script_setup_true_lang.js +2 -17
- package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/es/fields/DataSourceFields.vue_vue_type_script_setup_true_lang.js +7 -0
- package/dist/es/fields/DataSourceInput.vue_vue_type_script_setup_true_lang.js +5 -17
- package/dist/es/fields/DataSourceMocks.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/es/fields/DisplayConds.vue_vue_type_script_setup_true_lang.js +29 -3
- package/dist/es/fields/EventSelect.vue_vue_type_script_setup_true_lang.js +50 -88
- package/dist/es/fields/StyleSetter/Index.vue_vue_type_script_setup_true_lang.js +2 -5
- package/dist/es/fields/StyleSetter/pro/Background.vue_vue_type_script_setup_true_lang.js +48 -23
- package/dist/es/fields/StyleSetter/pro/Border.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/es/fields/StyleSetter/pro/Font.vue_vue_type_script_setup_true_lang.js +28 -22
- package/dist/es/fields/StyleSetter/pro/Layout.vue_vue_type_script_setup_true_lang.js +28 -22
- package/dist/es/fields/StyleSetter/pro/Position.vue_vue_type_script_setup_true_lang.js +28 -22
- package/dist/es/fields/StyleSetter/pro/Transform.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/es/fields/UISelect.js +0 -1
- package/dist/es/hooks/use-compare-form.js +119 -0
- package/dist/es/index.js +13 -8
- package/dist/es/layouts/CodeEditor.vue_vue_type_script_setup_true_lang.js +21 -6
- package/dist/es/layouts/Framework.vue_vue_type_script_setup_true_lang.js +9 -6
- package/dist/es/layouts/history-list/HistoryDiffDialog.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/es/layouts/history-list/composables.js +1 -1
- package/dist/es/layouts/history-list/useHistoryRevert.js +7 -3
- package/dist/es/layouts/props-panel/FormPanel.vue_vue_type_script_setup_true_lang.js +44 -5
- package/dist/es/layouts/props-panel/PropsPanel.vue_vue_type_script_setup_true_lang.js +15 -8
- package/dist/es/layouts/props-panel/use-style-panel.js +3 -2
- package/dist/es/layouts/sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +15 -31
- package/dist/es/layouts/sidebar/code-block/CodeBlockListPanel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/sidebar/code-block/useContentMenu.js +18 -3
- package/dist/es/layouts/sidebar/data-source/DataSourceConfigPanel.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/es/layouts/sidebar/data-source/DataSourceListPanel.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/es/layouts/sidebar/data-source/useContentMenu.js +18 -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/LayerPanel.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/es/layouts/workspace/viewer/NodeListMenu.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/es/plugin.js +3 -1
- package/dist/es/services/codeBlock.js +1 -1
- package/dist/es/services/editor.js +104 -5
- package/dist/es/services/history.js +1 -1
- package/dist/es/services/props.js +3 -2
- package/dist/es/services/storage.js +2 -2
- package/dist/es/services/ui.js +3 -0
- package/dist/es/style.css +104 -55
- package/dist/es/utils/data-source/index.js +30 -11
- package/dist/es/utils/event.js +123 -0
- package/dist/es/utils/monaco-editor.js +22 -6
- package/dist/es/utils/props.js +119 -8
- package/dist/es/utils/type-match-rules.js +360 -0
- package/dist/style.css +104 -55
- package/dist/tmagic-editor.umd.cjs +16996 -15806
- package/package.json +8 -8
- package/src/Editor.vue +3 -1
- package/src/components/CodeBlockEditor.vue +3 -0
- package/src/components/CompareForm.vue +16 -196
- package/src/components/FloatingBox.vue +77 -8
- package/src/components/ScrollBar.vue +0 -67
- package/src/components/ViewForm.vue +55 -0
- package/src/editorProps.ts +13 -0
- package/src/fields/CodeSelect.vue +4 -1
- package/src/fields/CondOpSelect.vue +2 -24
- package/src/fields/DataSourceFields.vue +5 -0
- package/src/fields/DataSourceInput.vue +7 -25
- package/src/fields/DataSourceMocks.vue +3 -0
- package/src/fields/DisplayConds.vue +14 -0
- package/src/fields/EventSelect.vue +84 -129
- package/src/fields/StyleSetter/Index.vue +2 -8
- package/src/fields/StyleSetter/pro/Background.vue +94 -55
- package/src/fields/StyleSetter/pro/Border.vue +9 -11
- package/src/fields/StyleSetter/pro/Font.vue +66 -64
- package/src/fields/StyleSetter/pro/Layout.vue +140 -138
- package/src/fields/StyleSetter/pro/Position.vue +69 -67
- package/src/fields/StyleSetter/pro/Transform.vue +23 -25
- package/src/fields/UISelect.vue +0 -12
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-compare-form.ts +187 -0
- package/src/index.ts +2 -0
- package/src/layouts/CodeEditor.vue +32 -6
- package/src/layouts/Framework.vue +7 -6
- package/src/layouts/history-list/HistoryDiffDialog.vue +11 -1
- package/src/layouts/history-list/useHistoryRevert.ts +4 -0
- package/src/layouts/props-panel/FormPanel.vue +66 -5
- package/src/layouts/props-panel/PropsPanel.vue +20 -6
- package/src/layouts/props-panel/use-style-panel.ts +4 -3
- package/src/layouts/sidebar/Sidebar.vue +2 -0
- package/src/layouts/sidebar/code-block/CodeBlockListPanel.vue +4 -1
- package/src/layouts/sidebar/code-block/useContentMenu.ts +13 -1
- package/src/layouts/sidebar/data-source/DataSourceConfigPanel.vue +3 -0
- package/src/layouts/sidebar/data-source/DataSourceListPanel.vue +2 -2
- package/src/layouts/sidebar/data-source/useContentMenu.ts +13 -1
- package/src/layouts/sidebar/layer/LayerNodeContent.vue +57 -0
- package/src/layouts/sidebar/layer/LayerPanel.vue +4 -1
- package/src/layouts/workspace/viewer/NodeListMenu.vue +4 -1
- package/src/plugin.ts +3 -1
- package/src/services/editor.ts +168 -3
- package/src/services/ui.ts +6 -0
- package/src/theme/event.scss +8 -0
- package/src/theme/floating-box.scss +9 -1
- package/src/theme/layer-node-content.scss +14 -0
- package/src/theme/scroll-bar.scss +64 -0
- package/src/theme/theme.scss +3 -0
- package/src/theme/ui-select.scss +9 -0
- package/src/type.ts +105 -2
- package/src/utils/data-source/index.ts +30 -12
- package/src/utils/event.ts +224 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/monaco-editor.ts +27 -0
- package/src/utils/props.ts +189 -2
- package/src/utils/type-match-rules.ts +678 -0
- package/types/index.d.ts +558 -213
|
@@ -3,20 +3,20 @@ import history_default from "./services/history.js";
|
|
|
3
3
|
import storage_default from "./services/storage.js";
|
|
4
4
|
import editor_default from "./services/editor.js";
|
|
5
5
|
import ui_default from "./services/ui.js";
|
|
6
|
+
import codeBlock_default from "./services/codeBlock.js";
|
|
7
|
+
import dataSource_default from "./services/dataSource.js";
|
|
8
|
+
import events_default from "./services/events.js";
|
|
6
9
|
import Framework_default from "./layouts/Framework.js";
|
|
7
10
|
import NavMenu_default from "./layouts/NavMenu.js";
|
|
11
|
+
import { ENABLE_PROPS_FORM_VALIDATE, defaultEditorProps } from "./editorProps.js";
|
|
8
12
|
import PropsPanel_default from "./layouts/props-panel/PropsPanel.js";
|
|
9
13
|
import keybinding_config_default from "./utils/keybinding-config.js";
|
|
10
14
|
import Sidebar_default from "./layouts/sidebar/Sidebar.js";
|
|
11
15
|
import Workspace_default from "./layouts/workspace/Workspace.js";
|
|
12
|
-
import codeBlock_default from "./services/codeBlock.js";
|
|
13
16
|
import componentList_default from "./services/componentList.js";
|
|
14
|
-
import dataSource_default from "./services/dataSource.js";
|
|
15
17
|
import dep_default from "./services/dep.js";
|
|
16
|
-
import events_default from "./services/events.js";
|
|
17
18
|
import keybinding_default from "./services/keybinding.js";
|
|
18
19
|
import stageOverlay_default from "./services/stageOverlay.js";
|
|
19
|
-
import { defaultEditorProps } from "./editorProps.js";
|
|
20
20
|
import { initServiceEvents, initServiceState } from "./initService.js";
|
|
21
21
|
import { createBlock, createVNode, defineComponent, mergeDefaults, openBlock, provide, ref, renderSlot, unref, withCtx } from "vue";
|
|
22
22
|
import { EventEmitter } from "events";
|
|
@@ -56,6 +56,7 @@ var Editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
56
56
|
disabledPageFragment: { type: Boolean },
|
|
57
57
|
disabledFlashTip: { type: Boolean },
|
|
58
58
|
disabledStageOverlay: { type: Boolean },
|
|
59
|
+
enablePropsFormValidate: { type: Boolean },
|
|
59
60
|
disabledShowSrc: { type: Boolean },
|
|
60
61
|
disabledDataSource: { type: Boolean },
|
|
61
62
|
disabledCodeBlock: { type: Boolean },
|
|
@@ -129,6 +130,8 @@ var Editor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
|
|
|
129
130
|
provide("services", services);
|
|
130
131
|
provide("codeOptions", props.codeOptions);
|
|
131
132
|
provide("stageOptions", stageOptions);
|
|
133
|
+
/** 是否启用「属性配置表单校验」联动能力,供 PropsPanel / FormPanel 判断校验失败时是否仍更新节点并记录错误 */
|
|
134
|
+
provide(ENABLE_PROPS_FORM_VALIDATE, props.enablePropsFormValidate ?? false);
|
|
132
135
|
/**
|
|
133
136
|
* 把顶层 `extendFormState` 提供给非 PropsPanel 链路上的组件使用(例如历史差异对话框 HistoryDiffDialog
|
|
134
137
|
* 内部的 CompareForm)。这样所有依赖业务上下文的表单 filterFunction 都能拿到一致的扩展状态,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getEditorConfig } from "../utils/config.js";
|
|
2
|
+
import { getCodeBlockFormConfig } from "../utils/code-block.js";
|
|
2
3
|
import { useServices } from "../hooks/use-services.js";
|
|
3
4
|
import { useWindowRect } from "../hooks/use-window-rect.js";
|
|
4
5
|
import { useEditorContentHeight } from "../hooks/use-editor-content-height.js";
|
|
5
6
|
import { useNextFloatBoxPosition } from "../hooks/use-next-float-box-position.js";
|
|
6
|
-
import { getCodeBlockFormConfig } from "../utils/code-block.js";
|
|
7
7
|
import CodeEditor_default from "../layouts/CodeEditor.js";
|
|
8
8
|
import FloatingBox_default from "./FloatingBox.js";
|
|
9
9
|
import { MFormBox } from "@tmagic/form";
|
|
@@ -120,6 +120,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
120
120
|
changedValue.value = void 0;
|
|
121
121
|
};
|
|
122
122
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
123
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
123
124
|
watch(boxVisible, (visible) => {
|
|
124
125
|
nextTick(() => {
|
|
125
126
|
if (!visible) emit("close");
|
|
@@ -145,7 +146,9 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
145
146
|
"onUpdate:width": _cache[2] || (_cache[2] = ($event) => width.value = $event),
|
|
146
147
|
height: unref(codeBlockEditorHeight),
|
|
147
148
|
"onUpdate:height": _cache[3] || (_cache[3] = ($event) => isRef(codeBlockEditorHeight) ? codeBlockEditorHeight.value = $event : null),
|
|
149
|
+
"body-style": { padding: "0 16px" },
|
|
148
150
|
title: __props.content.name ? `${__props.disabled ? "查看" : "编辑"}${__props.content.name}` : "新增代码",
|
|
151
|
+
"framework-width": frameworkWidth.value,
|
|
149
152
|
position: unref(boxPosition),
|
|
150
153
|
"before-close": beforeClose
|
|
151
154
|
}, {
|
|
@@ -187,6 +190,7 @@ var CodeBlockEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
187
190
|
"width",
|
|
188
191
|
"height",
|
|
189
192
|
"title",
|
|
193
|
+
"framework-width",
|
|
190
194
|
"position"
|
|
191
195
|
]),
|
|
192
196
|
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(unref(TMagicDialog), {
|
|
@@ -48,7 +48,8 @@ var CodeParams_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
48
48
|
*/
|
|
49
49
|
const onParamsChangeHandler = async (v, eventData) => {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
const value = await formRef.value?.submitForm(true);
|
|
52
|
+
emit("change", value, eventData);
|
|
52
53
|
} catch (e) {
|
|
53
54
|
error(e);
|
|
54
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCompareForm } from "../hooks/use-compare-form.js";
|
|
2
2
|
import { MForm } from "@tmagic/form";
|
|
3
3
|
import { HookType } from "@tmagic/core";
|
|
4
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent,
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, normalizeStyle, openBlock, unref } from "vue";
|
|
5
5
|
import { isEqual } from "lodash-es";
|
|
6
6
|
//#region packages/editor/src/components/CompareForm.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
@@ -9,58 +9,27 @@ var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
9
9
|
__name: "CompareForm",
|
|
10
10
|
props: {
|
|
11
11
|
value: {},
|
|
12
|
-
lastValue: {},
|
|
13
12
|
type: {},
|
|
14
13
|
category: { default: "node" },
|
|
15
14
|
dataSourceType: {},
|
|
16
15
|
labelWidth: { default: "120px" },
|
|
17
16
|
height: {},
|
|
18
|
-
extendState: {
|
|
19
|
-
type: Function,
|
|
20
|
-
default: (state) => state
|
|
21
|
-
},
|
|
17
|
+
extendState: {},
|
|
22
18
|
baseFormState: {},
|
|
23
|
-
|
|
19
|
+
size: {},
|
|
24
20
|
loadConfig: {},
|
|
25
|
-
services: {}
|
|
21
|
+
services: {},
|
|
22
|
+
lastValue: {},
|
|
23
|
+
selfDiffFieldTypes: {}
|
|
26
24
|
},
|
|
27
25
|
setup(__props, { expose: __expose }) {
|
|
28
26
|
const props = __props;
|
|
29
|
-
|
|
30
|
-
const config = ref([]);
|
|
31
|
-
/** vs-code 编辑器的 monaco 配置项,沿用 Editor 顶层 provide('codeOptions', ...) 的注入。 */
|
|
32
|
-
const codeOptions = inject("codeOptions", {});
|
|
33
|
-
/** 将代码块的 content 字段统一成字符串,便于在表单/对比中展示 */
|
|
34
|
-
const normalizeCodeBlockValue = (v) => {
|
|
35
|
-
if (!v) return {};
|
|
36
|
-
const next = { ...v };
|
|
37
|
-
if (next.content && typeof next.content !== "string") try {
|
|
38
|
-
next.content = next.content.toString();
|
|
39
|
-
} catch {
|
|
40
|
-
next.content = "";
|
|
41
|
-
}
|
|
42
|
-
return next;
|
|
43
|
-
};
|
|
44
|
-
const currentValues = computed(() => {
|
|
45
|
-
if (props.category === "code-block") return normalizeCodeBlockValue(props.value);
|
|
46
|
-
return props.value || {};
|
|
47
|
-
});
|
|
27
|
+
const { config, currentValues, wrapperStyle, mergedExtendState, loadConfig, formRef, normalizeCodeBlockValue } = useCompareForm(props);
|
|
48
28
|
const lastValuesProcessed = computed(() => {
|
|
49
29
|
if (props.category === "code-block") return normalizeCodeBlockValue(props.lastValue);
|
|
50
30
|
return props.lastValue || {};
|
|
51
31
|
});
|
|
52
32
|
/**
|
|
53
|
-
* 外层包裹层的样式:当传入 `height` 时启用固定高度 + 内部滚动,
|
|
54
|
-
* 这样滚动条会出现在 CompareForm 内部,避免父容器(如 Dialog)自身也产生滚动。
|
|
55
|
-
*/
|
|
56
|
-
const wrapperStyle = computed(() => {
|
|
57
|
-
if (!props.height) return void 0;
|
|
58
|
-
return {
|
|
59
|
-
height: props.height,
|
|
60
|
-
overflow: "auto"
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
/**
|
|
64
33
|
* `code-select` 字段在历史数据中存在两种"语义为空"的形态:
|
|
65
34
|
* - 字符串 `''`(旧数据 / 用户从未配置过钩子);
|
|
66
35
|
* - `{ hookType: HookType.CODE, hookData: [] }`(CodeSelect.vue 在挂载时
|
|
@@ -83,83 +52,6 @@ var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
83
52
|
}
|
|
84
53
|
return !isEqual(curValue, lastValue);
|
|
85
54
|
};
|
|
86
|
-
const removeStyleDisplayConfig = (formConfig) => formConfig.map((item) => {
|
|
87
|
-
if (!("type" in item)) return item;
|
|
88
|
-
if (item?.type !== "tab" || !Array.isArray(item.items)) return item;
|
|
89
|
-
return {
|
|
90
|
-
...item,
|
|
91
|
-
items: item.items.map((tabPane) => {
|
|
92
|
-
if (tabPane?.title !== "样式" || !Array.isArray(tabPane.items)) return tabPane;
|
|
93
|
-
return {
|
|
94
|
-
...tabPane,
|
|
95
|
-
display: true
|
|
96
|
-
};
|
|
97
|
-
})
|
|
98
|
-
};
|
|
99
|
-
});
|
|
100
|
-
const mergedExtendState = (state) => {
|
|
101
|
-
return props.extendState(props.baseFormState || state);
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* 内置的默认 FormConfig 加载逻辑:按 `category` 从对应 service / 工具取配置。
|
|
105
|
-
* 作为 ctx.defaultLoadConfig 透传给自定义 `loadConfig`,方便复用与二次加工。
|
|
106
|
-
*/
|
|
107
|
-
const defaultLoadConfig = async () => {
|
|
108
|
-
if (!props.services) return [];
|
|
109
|
-
switch (props.category) {
|
|
110
|
-
case "node":
|
|
111
|
-
if (!props.type) return [];
|
|
112
|
-
return removeStyleDisplayConfig(await props.services.propsService.getPropsConfig(props.type, { node: props.value }));
|
|
113
|
-
case "data-source": return props.services.dataSourceService.getFormConfig(props.type || "base").map((item) => "type" in item && item.type === "tab" ? {
|
|
114
|
-
...item,
|
|
115
|
-
active: "fields"
|
|
116
|
-
} : item);
|
|
117
|
-
case "code-block": return getCodeBlockFormConfig({
|
|
118
|
-
paramColConfig: props.services.codeBlockService.getParamsColConfig(),
|
|
119
|
-
isDataSource: () => Boolean(props.dataSourceType),
|
|
120
|
-
dataSourceType: () => props.dataSourceType,
|
|
121
|
-
codeOptions,
|
|
122
|
-
editable: false
|
|
123
|
-
});
|
|
124
|
-
default: return [];
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const loadConfig = async () => {
|
|
128
|
-
if (props.loadConfig) {
|
|
129
|
-
config.value = await props.loadConfig({
|
|
130
|
-
category: props.category,
|
|
131
|
-
type: props.type,
|
|
132
|
-
dataSourceType: props.dataSourceType,
|
|
133
|
-
defaultLoadConfig
|
|
134
|
-
});
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
config.value = await defaultLoadConfig();
|
|
138
|
-
};
|
|
139
|
-
watch([
|
|
140
|
-
() => props.category,
|
|
141
|
-
() => props.type,
|
|
142
|
-
() => props.dataSourceType,
|
|
143
|
-
() => props.loadConfig
|
|
144
|
-
], () => {
|
|
145
|
-
loadConfig();
|
|
146
|
-
}, { immediate: true });
|
|
147
|
-
const formRef = useTemplateRef("form");
|
|
148
|
-
/**
|
|
149
|
-
* 把 services / stage 注入 MForm 的 formState,避免 propsService 注入的表单配置中
|
|
150
|
-
* 形如 `display: ({ services }) => services.uiService.get(...)` 的 filterFunction
|
|
151
|
-
* 在执行时拿不到 `formState.services` 而报错。
|
|
152
|
-
*
|
|
153
|
-
* 与 props-panel/FormPanel.vue 中的注入方式保持一致:
|
|
154
|
-
* - services:整个 useServices() 返回的服务集合;
|
|
155
|
-
* - stage:当前 editorService.get('stage') 的最新值。
|
|
156
|
-
*/
|
|
157
|
-
watchEffect(() => {
|
|
158
|
-
if (formRef.value && props.services) {
|
|
159
|
-
formRef.value.formState.stage = props.services.editorService.get("stage");
|
|
160
|
-
formRef.value.formState.services = props.services;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
55
|
__expose({
|
|
164
56
|
form: formRef,
|
|
165
57
|
config,
|
|
@@ -168,26 +60,29 @@ var CompareForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
168
60
|
return (_ctx, _cache) => {
|
|
169
61
|
return openBlock(), createElementBlock("div", {
|
|
170
62
|
class: "m-editor-compare-form-wrapper",
|
|
171
|
-
style: normalizeStyle(wrapperStyle
|
|
172
|
-
}, [config.
|
|
63
|
+
style: normalizeStyle(unref(wrapperStyle))
|
|
64
|
+
}, [unref(config).length ? (openBlock(), createBlock(unref(MForm), {
|
|
173
65
|
key: 0,
|
|
174
66
|
ref: "form",
|
|
175
67
|
class: "m-editor-compare-form",
|
|
176
|
-
config: config
|
|
177
|
-
"init-values": currentValues
|
|
68
|
+
config: unref(config),
|
|
69
|
+
"init-values": unref(currentValues),
|
|
178
70
|
"last-values": lastValuesProcessed.value,
|
|
179
71
|
"is-compare": true,
|
|
180
72
|
disabled: true,
|
|
181
73
|
"label-width": __props.labelWidth,
|
|
182
|
-
"extend-state": mergedExtendState,
|
|
74
|
+
"extend-state": unref(mergedExtendState),
|
|
183
75
|
"show-diff": showDiff,
|
|
184
|
-
"self-diff-field-types": __props.selfDiffFieldTypes
|
|
76
|
+
"self-diff-field-types": __props.selfDiffFieldTypes,
|
|
77
|
+
size: __props.size
|
|
185
78
|
}, null, 8, [
|
|
186
79
|
"config",
|
|
187
80
|
"init-values",
|
|
188
81
|
"last-values",
|
|
189
82
|
"label-width",
|
|
190
|
-
"
|
|
83
|
+
"extend-state",
|
|
84
|
+
"self-diff-field-types",
|
|
85
|
+
"size"
|
|
191
86
|
])) : createCommentVNode("v-if", true)], 4);
|
|
192
87
|
};
|
|
193
88
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { useServices } from "../hooks/use-services.js";
|
|
2
1
|
import Icon_default from "./Icon.js";
|
|
3
2
|
import { TMagicButton, useZIndex } from "@tmagic/design";
|
|
4
|
-
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeStyle, onBeforeUnmount, openBlock, provide, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
3
|
+
import { Teleport, computed, createBlock, createCommentVNode, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeStyle, onBeforeUnmount, openBlock, provide, ref, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
5
4
|
import { Close } from "@element-plus/icons-vue";
|
|
6
5
|
import VanillaMoveable from "moveable";
|
|
7
6
|
//#region packages/editor/src/components/FloatingBox.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -17,6 +16,9 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
17
16
|
top: 0
|
|
18
17
|
}) },
|
|
19
18
|
title: { default: "" },
|
|
19
|
+
bodyStyle: {},
|
|
20
|
+
initialStyle: { default: () => ({}) },
|
|
21
|
+
frameworkWidth: { default: 0 },
|
|
20
22
|
beforeClose: {}
|
|
21
23
|
}, {
|
|
22
24
|
"width": { default: 0 },
|
|
@@ -49,19 +51,51 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
49
51
|
if (targetEl.value) return targetEl.value.clientHeight - titleHeight.value;
|
|
50
52
|
return "auto";
|
|
51
53
|
});
|
|
52
|
-
const { uiService } = useServices();
|
|
53
|
-
const frameworkWidth = computed(() => uiService.get("frameworkRect").width || 0);
|
|
54
54
|
const style = computed(() => {
|
|
55
55
|
let { left } = props.position;
|
|
56
|
-
|
|
56
|
+
const frameworkWidth = props.frameworkWidth || globalThis.window?.innerWidth || 0;
|
|
57
|
+
if (width.value && frameworkWidth) left = left + width.value > frameworkWidth ? frameworkWidth - width.value : left;
|
|
57
58
|
return {
|
|
58
59
|
left: `${left}px`,
|
|
59
60
|
top: `${props.position.top}px`,
|
|
60
61
|
width: width.value ? `${width.value}px` : "auto",
|
|
61
|
-
height: height.value ? `${height.value}px` : "auto"
|
|
62
|
+
height: height.value ? `${height.value}px` : "auto",
|
|
63
|
+
...props.initialStyle
|
|
62
64
|
};
|
|
63
65
|
});
|
|
64
66
|
let moveable = null;
|
|
67
|
+
let dragMask = null;
|
|
68
|
+
let dragMaskVisible = false;
|
|
69
|
+
const bindDragMaskSafety = () => {
|
|
70
|
+
globalThis.window?.addEventListener("pointerup", hideDragMask, true);
|
|
71
|
+
globalThis.window?.addEventListener("blur", hideDragMask);
|
|
72
|
+
globalThis.document?.addEventListener("visibilitychange", hideDragMask);
|
|
73
|
+
};
|
|
74
|
+
const unbindDragMaskSafety = () => {
|
|
75
|
+
globalThis.window?.removeEventListener("pointerup", hideDragMask, true);
|
|
76
|
+
globalThis.window?.removeEventListener("blur", hideDragMask);
|
|
77
|
+
globalThis.document?.removeEventListener("visibilitychange", hideDragMask);
|
|
78
|
+
};
|
|
79
|
+
const showDragMask = () => {
|
|
80
|
+
if (dragMaskVisible) return;
|
|
81
|
+
if (!dragMask) {
|
|
82
|
+
dragMask = globalThis.document.createElement("div");
|
|
83
|
+
dragMask.className = "m-editor-float-box-drag-mask";
|
|
84
|
+
}
|
|
85
|
+
globalThis.document.body.appendChild(dragMask);
|
|
86
|
+
dragMaskVisible = true;
|
|
87
|
+
bindDragMaskSafety();
|
|
88
|
+
const setMaskZIndex = () => {
|
|
89
|
+
if (dragMask) dragMask.style.zIndex = `${curZIndex.value + 1}`;
|
|
90
|
+
};
|
|
91
|
+
setMaskZIndex();
|
|
92
|
+
nextTick(setMaskZIndex);
|
|
93
|
+
};
|
|
94
|
+
const hideDragMask = () => {
|
|
95
|
+
unbindDragMaskSafety();
|
|
96
|
+
dragMask?.parentNode?.removeChild(dragMask);
|
|
97
|
+
dragMaskVisible = false;
|
|
98
|
+
};
|
|
65
99
|
const initMoveable = () => {
|
|
66
100
|
moveable = new VanillaMoveable(globalThis.document.body, {
|
|
67
101
|
className: "m-editor-floating-box-moveable",
|
|
@@ -84,6 +118,10 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
84
118
|
position: "css"
|
|
85
119
|
}
|
|
86
120
|
});
|
|
121
|
+
moveable.on("drag", showDragMask);
|
|
122
|
+
moveable.on("resize", showDragMask);
|
|
123
|
+
moveable.on("dragEnd", hideDragMask);
|
|
124
|
+
moveable.on("resizeEnd", hideDragMask);
|
|
87
125
|
moveable.on("drag", (e) => {
|
|
88
126
|
e.target.style.transform = e.transform;
|
|
89
127
|
});
|
|
@@ -96,6 +134,7 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
96
134
|
});
|
|
97
135
|
};
|
|
98
136
|
const destroyMoveable = () => {
|
|
137
|
+
hideDragMask();
|
|
99
138
|
moveable?.destroy();
|
|
100
139
|
moveable = null;
|
|
101
140
|
};
|
|
@@ -109,7 +148,10 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
109
148
|
height.value = targetRect.height;
|
|
110
149
|
initMoveable();
|
|
111
150
|
}
|
|
112
|
-
if (titleEl.value)
|
|
151
|
+
if (titleEl.value) {
|
|
152
|
+
const titleRect = titleEl.value.getBoundingClientRect();
|
|
153
|
+
titleHeight.value = titleRect.height;
|
|
154
|
+
}
|
|
113
155
|
} else destroyMoveable();
|
|
114
156
|
}, { immediate: true });
|
|
115
157
|
onBeforeUnmount(() => {
|
|
@@ -135,15 +177,16 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
135
177
|
return visible.value ? (openBlock(), createBlock(Teleport, {
|
|
136
178
|
key: 0,
|
|
137
179
|
to: "body"
|
|
138
|
-
}, [createElementVNode("div", {
|
|
180
|
+
}, [createElementVNode("div", mergeProps({
|
|
139
181
|
ref: "target",
|
|
140
|
-
class: "m-editor-float-box"
|
|
141
|
-
|
|
182
|
+
class: "m-editor-float-box"
|
|
183
|
+
}, _ctx.$attrs, {
|
|
184
|
+
style: {
|
|
142
185
|
...style.value,
|
|
143
186
|
zIndex: curZIndex.value
|
|
144
|
-
}
|
|
187
|
+
},
|
|
145
188
|
onMousedown: nextZIndex
|
|
146
|
-
}, [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
|
|
189
|
+
}), [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "title", {}, () => [createElementVNode("span", null, toDisplayString(__props.title), 1)]), createElementVNode("div", null, [createVNode(unref(TMagicButton), {
|
|
147
190
|
link: "",
|
|
148
191
|
size: "small",
|
|
149
192
|
onClick: closeHandler
|
|
@@ -152,8 +195,11 @@ var FloatingBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
152
195
|
_: 1
|
|
153
196
|
})])], 512), createElementVNode("div", {
|
|
154
197
|
class: "m-editor-float-box-body",
|
|
155
|
-
style: normalizeStyle({
|
|
156
|
-
|
|
198
|
+
style: normalizeStyle({
|
|
199
|
+
height: `${bodyHeight.value}px`,
|
|
200
|
+
...__props.bodyStyle
|
|
201
|
+
})
|
|
202
|
+
}, [renderSlot(_ctx.$slots, "body")], 4)], 16)])) : createCommentVNode("v-if", true);
|
|
157
203
|
};
|
|
158
204
|
}
|
|
159
205
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import ScrollBar_vue_vue_type_script_setup_true_lang_default from "./ScrollBar.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
-
/* empty css */
|
|
3
2
|
//#region packages/editor/src/components/ScrollBar.vue
|
|
4
3
|
var ScrollBar_default = ScrollBar_vue_vue_type_script_setup_true_lang_default;
|
|
5
4
|
//#endregion
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ViewForm_vue_vue_type_script_setup_true_lang_default from "./ViewForm.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region packages/editor/src/components/ViewForm.vue
|
|
3
|
+
var ViewForm_default = ViewForm_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ViewForm_default as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useCompareForm } from "../hooks/use-compare-form.js";
|
|
2
|
+
import { MForm } from "@tmagic/form";
|
|
3
|
+
import { createBlock, createCommentVNode, createElementBlock, defineComponent, normalizeStyle, openBlock, unref } from "vue";
|
|
4
|
+
//#region packages/editor/src/components/ViewForm.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var ViewForm_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
name: "MEditorViewForm",
|
|
7
|
+
__name: "ViewForm",
|
|
8
|
+
props: {
|
|
9
|
+
value: {},
|
|
10
|
+
type: {},
|
|
11
|
+
category: { default: "node" },
|
|
12
|
+
dataSourceType: {},
|
|
13
|
+
labelWidth: { default: "120px" },
|
|
14
|
+
height: {},
|
|
15
|
+
extendState: {},
|
|
16
|
+
baseFormState: {},
|
|
17
|
+
size: {},
|
|
18
|
+
loadConfig: {},
|
|
19
|
+
services: {},
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(__props, { expose: __expose }) {
|
|
26
|
+
const { config, currentValues, wrapperStyle, mergedExtendState, loadConfig, formRef } = useCompareForm(__props);
|
|
27
|
+
__expose({
|
|
28
|
+
form: formRef,
|
|
29
|
+
config,
|
|
30
|
+
reload: loadConfig
|
|
31
|
+
});
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", {
|
|
34
|
+
class: "m-editor-view-form-wrapper",
|
|
35
|
+
style: normalizeStyle(unref(wrapperStyle))
|
|
36
|
+
}, [unref(config).length ? (openBlock(), createBlock(unref(MForm), {
|
|
37
|
+
key: 0,
|
|
38
|
+
ref: "form",
|
|
39
|
+
class: "m-editor-view-form",
|
|
40
|
+
config: unref(config),
|
|
41
|
+
"init-values": unref(currentValues),
|
|
42
|
+
disabled: __props.disabled,
|
|
43
|
+
"label-width": __props.labelWidth,
|
|
44
|
+
"extend-state": unref(mergedExtendState),
|
|
45
|
+
size: __props.size
|
|
46
|
+
}, null, 8, [
|
|
47
|
+
"config",
|
|
48
|
+
"init-values",
|
|
49
|
+
"disabled",
|
|
50
|
+
"label-width",
|
|
51
|
+
"extend-state",
|
|
52
|
+
"size"
|
|
53
|
+
])) : createCommentVNode("v-if", true)], 4);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ViewForm_vue_vue_type_script_setup_true_lang_default as default };
|
package/dist/es/editorProps.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { CONTAINER_HIGHLIGHT_CLASS_NAME, ContainerHighlightType, RenderType } from "@tmagic/stage";
|
|
2
2
|
import { getIdFromEl } from "@tmagic/utils";
|
|
3
3
|
//#region packages/editor/src/editorProps.ts
|
|
4
|
+
/**
|
|
5
|
+
* 「属性配置表单校验」联动能力的 provide/inject 注入键。
|
|
6
|
+
* 使用 Symbol 避免与其它字符串键冲突,供 PropsPanel / FormPanel 注入判断校验失败时是否仍更新节点并记录错误。
|
|
7
|
+
*/
|
|
8
|
+
var ENABLE_PROPS_FORM_VALIDATE = Symbol("enablePropsFormValidate");
|
|
4
9
|
var defaultEditorProps = {
|
|
5
10
|
renderType: RenderType.IFRAME,
|
|
6
11
|
disabledMultiSelect: false,
|
|
@@ -34,4 +39,4 @@ var defaultEditorProps = {
|
|
|
34
39
|
customContentMenu: (menus) => menus
|
|
35
40
|
};
|
|
36
41
|
//#endregion
|
|
37
|
-
export { defaultEditorProps };
|
|
42
|
+
export { ENABLE_PROPS_FORM_VALIDATE, defaultEditorProps };
|
|
@@ -70,7 +70,11 @@ var CodeSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
70
70
|
value: HookCodeType.DATA_SOURCE_METHOD,
|
|
71
71
|
text: "数据源方法"
|
|
72
72
|
}],
|
|
73
|
-
|
|
73
|
+
rules: [{
|
|
74
|
+
typeMatch: true,
|
|
75
|
+
trigger: "change"
|
|
76
|
+
}],
|
|
77
|
+
defaultValue: HookCodeType.CODE,
|
|
74
78
|
onChange: (_mForm, v, { setModel }) => {
|
|
75
79
|
if (v === HookCodeType.DATA_SOURCE_METHOD) setModel("codeId", []);
|
|
76
80
|
else setModel("codeId", "");
|
|
@@ -83,7 +87,11 @@ var CodeSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
83
87
|
span: 18,
|
|
84
88
|
labelWidth: 0,
|
|
85
89
|
display: (_mForm, { model }) => model.codeType !== HookCodeType.DATA_SOURCE_METHOD,
|
|
86
|
-
notEditable: () => !codeBlockService.getEditStatus()
|
|
90
|
+
notEditable: () => !codeBlockService.getEditStatus(),
|
|
91
|
+
rules: [{
|
|
92
|
+
typeMatch: true,
|
|
93
|
+
trigger: "change"
|
|
94
|
+
}]
|
|
87
95
|
},
|
|
88
96
|
{
|
|
89
97
|
type: "data-source-method-select",
|
|
@@ -91,7 +99,11 @@ var CodeSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
91
99
|
span: 18,
|
|
92
100
|
labelWidth: 0,
|
|
93
101
|
display: (_mForm, { model }) => model.codeType === HookCodeType.DATA_SOURCE_METHOD,
|
|
94
|
-
notEditable: () => !dataSourceService.get("editable")
|
|
102
|
+
notEditable: () => !dataSourceService.get("editable"),
|
|
103
|
+
rules: [{
|
|
104
|
+
typeMatch: true,
|
|
105
|
+
trigger: "change"
|
|
106
|
+
}]
|
|
95
107
|
}
|
|
96
108
|
]
|
|
97
109
|
}]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getCondOpOptionsByFieldType } from "../utils/props.js";
|
|
2
2
|
import { useServices } from "../hooks/use-services.js";
|
|
3
3
|
import { getFieldType } from "../utils/data-source/index.js";
|
|
4
4
|
import { TMagicSelect, getDesignConfig } from "@tmagic/design";
|
|
@@ -27,22 +27,7 @@ var CondOpSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
27
27
|
const optionComponent = getDesignConfig("components")?.option;
|
|
28
28
|
const options = computed(() => {
|
|
29
29
|
const [id, ...fieldNames] = [...props.config.parentFields || [], ...props.model.field];
|
|
30
|
-
|
|
31
|
-
if (type === "array") return arrayOptions;
|
|
32
|
-
if (type === "boolean" || type === "null") return [{
|
|
33
|
-
text: "是",
|
|
34
|
-
value: "is"
|
|
35
|
-
}, {
|
|
36
|
-
text: "不是",
|
|
37
|
-
value: "not"
|
|
38
|
-
}];
|
|
39
|
-
if (type === "number") return [...eqOptions, ...numberOptions];
|
|
40
|
-
if (type === "string") return [...arrayOptions, ...eqOptions];
|
|
41
|
-
return [
|
|
42
|
-
...arrayOptions,
|
|
43
|
-
...eqOptions,
|
|
44
|
-
...numberOptions
|
|
45
|
-
];
|
|
30
|
+
return getCondOpOptionsByFieldType(getFieldType(dataSourceService.getDataSourceById(id), fieldNames));
|
|
46
31
|
});
|
|
47
32
|
const fieldChangeHandler = (v) => {
|
|
48
33
|
emit("change", v);
|
package/dist/es/fields/DataSourceFieldSelect/FieldSelect.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -49,7 +49,8 @@ var FieldSelect_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
|
|
|
49
49
|
const selectFieldsId = ref([]);
|
|
50
50
|
watch(modelValue, (value) => {
|
|
51
51
|
if (props.dataSourceId) {
|
|
52
|
-
|
|
52
|
+
const dsIdValue = valueIsKey.value ? props.dataSourceId : `${DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX}${props.dataSourceId}`;
|
|
53
|
+
selectDataSourceId.value = dsIdValue;
|
|
53
54
|
selectFieldsId.value = Array.isArray(value) ? value : [];
|
|
54
55
|
} else if (Array.isArray(value) && value.length) {
|
|
55
56
|
const [dsId, ...fields] = value;
|
|
@@ -313,6 +313,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
313
313
|
const addFromJsonDialogVisible = useModel(__props, "visible1");
|
|
314
314
|
const { height: editorHeight } = useEditorContentHeight();
|
|
315
315
|
const { boxPosition, calcBoxPosition } = useNextFloatBoxPosition(uiService, inject("parentFloating", ref(null)));
|
|
316
|
+
const frameworkWidth = computed(() => uiService.get("frameworkRect")?.width || 0);
|
|
316
317
|
/**
|
|
317
318
|
* 由 DataSourceConfigPanel 注入:打开数据源详情后需要直接打开的字段路径(字段名数组)。
|
|
318
319
|
* 当前层消费 path[0],并把剩余路径下发给嵌套字段,实现逐层打开。
|
|
@@ -353,6 +354,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
353
354
|
_: 1
|
|
354
355
|
}, 8, ["disabled"])])) : createCommentVNode("v-if", true),
|
|
355
356
|
createVNode(FloatingBox_default, {
|
|
357
|
+
"body-style": { padding: "0 16px" },
|
|
356
358
|
visible: addDialogVisible.value,
|
|
357
359
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => addDialogVisible.value = $event),
|
|
358
360
|
width: width.value,
|
|
@@ -360,6 +362,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
360
362
|
height: unref(editorHeight),
|
|
361
363
|
"onUpdate:height": _cache[4] || (_cache[4] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
362
364
|
title: fieldTitle.value,
|
|
365
|
+
"framework-width": frameworkWidth.value,
|
|
363
366
|
position: unref(boxPosition)
|
|
364
367
|
}, {
|
|
365
368
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -382,9 +385,11 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
382
385
|
"width",
|
|
383
386
|
"height",
|
|
384
387
|
"title",
|
|
388
|
+
"framework-width",
|
|
385
389
|
"position"
|
|
386
390
|
]),
|
|
387
391
|
createVNode(FloatingBox_default, {
|
|
392
|
+
"body-style": { padding: "0 16px" },
|
|
388
393
|
visible: addFromJsonDialogVisible.value,
|
|
389
394
|
"onUpdate:visible": _cache[5] || (_cache[5] = ($event) => addFromJsonDialogVisible.value = $event),
|
|
390
395
|
width: width.value,
|
|
@@ -392,6 +397,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
392
397
|
height: unref(editorHeight),
|
|
393
398
|
"onUpdate:height": _cache[7] || (_cache[7] = ($event) => isRef(editorHeight) ? editorHeight.value = $event : null),
|
|
394
399
|
title: "快速添加数据定义",
|
|
400
|
+
"framework-width": frameworkWidth.value,
|
|
395
401
|
position: unref(boxPosition)
|
|
396
402
|
}, {
|
|
397
403
|
body: withCtx(() => [createVNode(unref(MFormBox), {
|
|
@@ -405,6 +411,7 @@ var DataSourceFields_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
405
411
|
"visible",
|
|
406
412
|
"width",
|
|
407
413
|
"height",
|
|
414
|
+
"framework-width",
|
|
408
415
|
"position"
|
|
409
416
|
])
|
|
410
417
|
]);
|