super-page-designer 2.1.34 → 2.1.38

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.
@@ -1 +1,336 @@
1
-
1
+ import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, withCtx, unref, normalizeStyle, pushScopeId, popScopeId } from "vue";
2
+ import { useLocalStorage } from "@vueuse/core";
3
+ import { Search } from "@element-plus/icons-vue";
4
+ import { EditorView, basicSetup } from "codemirror";
5
+ import { javascriptLanguage, javascript } from "@codemirror/lang-javascript";
6
+ import { EditorState } from "@codemirror/state";
7
+ import "@codemirror/autocomplete";
8
+ import "@codemirror/language";
9
+ import { openSearchPanel } from "@codemirror/search";
10
+ const _withScopeId = (n) => (pushScopeId("data-v-26f79956"), n = n(), popScopeId(), n);
11
+ const _hoisted_1 = {
12
+ style: { "padding": "8px 16px", "margin": "10px 0px", "background-color": "#f4f4f5" },
13
+ class: "pppp"
14
+ };
15
+ const _hoisted_2 = { style: { "color": "#909399", "font-size": "14px" } };
16
+ const _hoisted_3 = { key: 0 };
17
+ const _hoisted_4 = { key: 1 };
18
+ const _hoisted_5 = { class: "editorTool" };
19
+ const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "color": "gray" } }, " }", -1));
20
+ const _sfc_main = /* @__PURE__ */ defineComponent({
21
+ __name: "config",
22
+ props: {
23
+ eventForm: {
24
+ type: Object,
25
+ default: () => {
26
+ return {};
27
+ }
28
+ }
29
+ },
30
+ emits: ["fullScreen"],
31
+ setup(__props, { expose: __expose, emit: __emit }) {
32
+ const props = __props;
33
+ ref(false);
34
+ const editorStyle = ref({ theme: "default", fontSize: 14, searchOpen: false });
35
+ const editor = ref(null);
36
+ const codemirrorRef = ref(null);
37
+ const editorContentRef = ref(null);
38
+ const showStyle = ref({
39
+ backgroundColor: "#fff",
40
+ color: "#333",
41
+ border: "1px solid #ddd",
42
+ overflow: "auto"
43
+ });
44
+ onMounted(() => {
45
+ console.log("eventForm===", props.eventForm);
46
+ let cacheEditorStyle = useLocalStorage("editorStyle", "").value;
47
+ if (cacheEditorStyle) {
48
+ cacheEditorStyle = JSON.parse(cacheEditorStyle);
49
+ editorStyle.value.theme = cacheEditorStyle.theme || "default";
50
+ editorStyle.value.fontSize = cacheEditorStyle.fontSize || 14;
51
+ }
52
+ loadEditor();
53
+ });
54
+ function resize() {
55
+ if (codemirrorRef.value) {
56
+ setTimeout(() => {
57
+ const rect = codemirrorRef.value.getBoundingClientRect();
58
+ const editorHeight = window.innerHeight - rect.y - 30 + "px";
59
+ if (editor.value && editor.value.dom) {
60
+ editor.value.dom.style["height"] = editorHeight;
61
+ }
62
+ }, 10);
63
+ }
64
+ }
65
+ const jsDocCompletions = javascriptLanguage.data.of({
66
+ autocomplete: myCompletions
67
+ });
68
+ function changeEditorState() {
69
+ useLocalStorage("editorStyle", editorStyle.value).value = editorStyle.value;
70
+ if (editor.value) {
71
+ if (editor.value) {
72
+ editor.value.destroy();
73
+ }
74
+ loadEditor();
75
+ }
76
+ }
77
+ function getEditorState() {
78
+ const mytheme = getTheme();
79
+ const baseTheme = EditorView.theme({
80
+ ".cm-content, .cm-gutter": { minHeight: "400px" },
81
+ "&": {
82
+ fontSize: editorStyle.value.fontSize + "px"
83
+ }
84
+ });
85
+ return EditorState.create({
86
+ doc: props.eventForm.jsContent,
87
+ extensions: [
88
+ EditorState.tabSize.of(16),
89
+ basicSetup,
90
+ javascript(),
91
+ jsDocCompletions,
92
+ mytheme,
93
+ baseTheme,
94
+ EditorView.updateListener.of(function(value) {
95
+ console.log("update", value.state.doc.toString());
96
+ props.eventForm.jsContent = value.state.doc.toString();
97
+ })
98
+ ]
99
+ });
100
+ }
101
+ function getTheme() {
102
+ return EditorView.theme({});
103
+ }
104
+ function updateJsContent(newEvent) {
105
+ const hisValue = props.eventForm.jsContent ? props.eventForm.jsContent : "";
106
+ if (newEvent && props.eventForm) {
107
+ if (!newEvent.jsContent) {
108
+ newEvent.jsContent = "";
109
+ }
110
+ Object.assign(props.eventForm, newEvent);
111
+ editor.value.dispatch({
112
+ changes: { from: 0, to: hisValue.length, insert: props.eventForm.jsContent }
113
+ });
114
+ }
115
+ }
116
+ function loadEditor() {
117
+ const state = getEditorState();
118
+ editor.value = new EditorView({
119
+ state,
120
+ parent: document.getElementById("cf-codemirror")
121
+ });
122
+ }
123
+ function myCompletions(context) {
124
+ let word = context.matchBefore(/\w*|logicContext\./);
125
+ if (word) {
126
+ if (word.from == word.to && !context.explicit)
127
+ return null;
128
+ if ((word == null ? void 0 : word.text) === "logicContext.") {
129
+ return {
130
+ from: word.from,
131
+ options: [
132
+ { label: "logicContext.page", type: "property", info: "页面变量" },
133
+ { label: "logicContext.logic", type: "property", info: "页面变量" },
134
+ { label: "logicContext.task", type: "property", info: "任务变量" },
135
+ { label: "logicContext.context", type: "property", info: "上下文变量" },
136
+ { label: "logicContext.system", type: "property", info: "系统变量" },
137
+ { label: "logicContext.data", type: "property", info: "数据模型变量" }
138
+ ]
139
+ };
140
+ } else {
141
+ return {
142
+ from: word.from,
143
+ options: [{ label: "logicContext", type: "property" }]
144
+ };
145
+ }
146
+ } else {
147
+ return null;
148
+ }
149
+ }
150
+ function openSearch() {
151
+ if (editor.value) {
152
+ editor.value.focus();
153
+ let newState = openSearchPanel(editor.value);
154
+ if (newState) {
155
+ editor.value.update([transaction]);
156
+ }
157
+ }
158
+ }
159
+ __expose({ resize, updateJsContent });
160
+ return (_ctx, _cache) => {
161
+ const _component_el_input = resolveComponent("el-input");
162
+ const _component_el_option = resolveComponent("el-option");
163
+ const _component_el_select = resolveComponent("el-select");
164
+ const _component_el_tooltip = resolveComponent("el-tooltip");
165
+ const _component_el_icon = resolveComponent("el-icon");
166
+ return openBlock(), createElementBlock("div", {
167
+ style: { "padding-right": "20px" },
168
+ ref_key: "editorContentRef",
169
+ ref: editorContentRef
170
+ }, [
171
+ createElementVNode("div", _hoisted_1, [
172
+ createElementVNode("span", _hoisted_2, [
173
+ createTextVNode(" function "),
174
+ __props.eventForm.name === "customFunc" ? (openBlock(), createElementBlock("span", _hoisted_3, [
175
+ createTextVNode(" ( "),
176
+ createVNode(_component_el_input, {
177
+ size: "small",
178
+ modelValue: __props.eventForm.funcParam,
179
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.eventForm.funcParam = $event),
180
+ style: { "width": "300px" },
181
+ title: "方法参数"
182
+ }, null, 8, ["modelValue"]),
183
+ createTextVNode(" ) ")
184
+ ])) : (openBlock(), createElementBlock("span", _hoisted_4, " ( params ) ")),
185
+ createTextVNode("{ ")
186
+ ]),
187
+ createElementVNode("span", _hoisted_5, [
188
+ createVNode(_component_el_tooltip, {
189
+ class: "box-item",
190
+ effect: "dark",
191
+ content: "切换主题",
192
+ placement: "top"
193
+ }, {
194
+ default: withCtx(() => [
195
+ createVNode(_component_el_select, {
196
+ class: "editorOption",
197
+ onChange: changeEditorState,
198
+ modelValue: editorStyle.value.theme,
199
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => editorStyle.value.theme = $event),
200
+ placeholder: "",
201
+ size: "small",
202
+ style: { "width": "120px" }
203
+ }, {
204
+ default: withCtx(() => [
205
+ createVNode(_component_el_option, {
206
+ label: "默认",
207
+ value: "default"
208
+ }),
209
+ createVNode(_component_el_option, {
210
+ label: "VScodeDark",
211
+ value: "vscodeDark"
212
+ }),
213
+ createVNode(_component_el_option, {
214
+ label: "Dracula",
215
+ value: "dracula"
216
+ }),
217
+ createVNode(_component_el_option, {
218
+ label: "GithubLight",
219
+ value: "githubLight"
220
+ }),
221
+ createVNode(_component_el_option, {
222
+ label: "GithubDark",
223
+ value: "githubDark"
224
+ }),
225
+ createVNode(_component_el_option, {
226
+ label: "Eclipse",
227
+ value: "eclipse"
228
+ }),
229
+ createVNode(_component_el_option, {
230
+ label: "XcodeLight",
231
+ value: "xcodeLight"
232
+ }),
233
+ createVNode(_component_el_option, {
234
+ label: "XcodeDark",
235
+ value: "xcodeDark"
236
+ })
237
+ ]),
238
+ _: 1
239
+ }, 8, ["modelValue"])
240
+ ]),
241
+ _: 1
242
+ }),
243
+ createVNode(_component_el_tooltip, {
244
+ class: "box-item",
245
+ effect: "dark",
246
+ content: "切换字体大小",
247
+ placement: "top"
248
+ }, {
249
+ default: withCtx(() => [
250
+ createVNode(_component_el_select, {
251
+ class: "editorOption",
252
+ modelValue: editorStyle.value.fontSize,
253
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => editorStyle.value.fontSize = $event),
254
+ placeholder: "",
255
+ onChange: changeEditorState,
256
+ size: "small",
257
+ style: { "width": "80px" }
258
+ }, {
259
+ default: withCtx(() => [
260
+ createVNode(_component_el_option, {
261
+ label: "12",
262
+ value: 12
263
+ }),
264
+ createVNode(_component_el_option, {
265
+ label: "14",
266
+ value: 14
267
+ }),
268
+ createVNode(_component_el_option, {
269
+ label: "16",
270
+ value: 16
271
+ }),
272
+ createVNode(_component_el_option, {
273
+ label: "18",
274
+ value: 18
275
+ }),
276
+ createVNode(_component_el_option, {
277
+ label: "20",
278
+ value: 20
279
+ }),
280
+ createVNode(_component_el_option, {
281
+ label: "22",
282
+ value: 22
283
+ }),
284
+ createVNode(_component_el_option, {
285
+ label: "24",
286
+ value: 24
287
+ }),
288
+ createVNode(_component_el_option, {
289
+ label: "26",
290
+ value: 26
291
+ }),
292
+ createVNode(_component_el_option, {
293
+ label: "28",
294
+ value: 28
295
+ })
296
+ ]),
297
+ _: 1
298
+ }, 8, ["modelValue"])
299
+ ]),
300
+ _: 1
301
+ })
302
+ ]),
303
+ createVNode(_component_el_tooltip, {
304
+ class: "box-item",
305
+ effect: "dark",
306
+ content: "打开搜索",
307
+ placement: "top"
308
+ }, {
309
+ default: withCtx(() => [
310
+ createVNode(_component_el_icon, {
311
+ class: "editorOption",
312
+ onClick: openSearch
313
+ }, {
314
+ default: withCtx(() => [
315
+ createVNode(unref(Search))
316
+ ]),
317
+ _: 1
318
+ })
319
+ ]),
320
+ _: 1
321
+ })
322
+ ]),
323
+ createElementVNode("div", {
324
+ style: normalizeStyle(showStyle.value),
325
+ id: "cf-codemirror",
326
+ ref_key: "codemirrorRef",
327
+ ref: codemirrorRef
328
+ }, null, 4),
329
+ _hoisted_6
330
+ ], 512);
331
+ };
332
+ }
333
+ });
334
+ export {
335
+ _sfc_main as default
336
+ };
@@ -1,336 +1 @@
1
- import { defineComponent, ref, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, withCtx, unref, normalizeStyle, pushScopeId, popScopeId } from "vue";
2
- import { useLocalStorage } from "@vueuse/core";
3
- import { Search } from "@element-plus/icons-vue";
4
- import { EditorView, basicSetup } from "codemirror";
5
- import { javascriptLanguage, javascript } from "@codemirror/lang-javascript";
6
- import { EditorState } from "@codemirror/state";
7
- import "@codemirror/autocomplete";
8
- import "@codemirror/language";
9
- import { openSearchPanel } from "@codemirror/search";
10
- const _withScopeId = (n) => (pushScopeId("data-v-26f79956"), n = n(), popScopeId(), n);
11
- const _hoisted_1 = {
12
- style: { "padding": "8px 16px", "margin": "10px 0px", "background-color": "#f4f4f5" },
13
- class: "pppp"
14
- };
15
- const _hoisted_2 = { style: { "color": "#909399", "font-size": "14px" } };
16
- const _hoisted_3 = { key: 0 };
17
- const _hoisted_4 = { key: 1 };
18
- const _hoisted_5 = { class: "editorTool" };
19
- const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { style: { "color": "gray" } }, " }", -1));
20
- const _sfc_main = /* @__PURE__ */ defineComponent({
21
- __name: "config",
22
- props: {
23
- eventForm: {
24
- type: Object,
25
- default: () => {
26
- return {};
27
- }
28
- }
29
- },
30
- emits: ["fullScreen"],
31
- setup(__props, { expose: __expose, emit: __emit }) {
32
- const props = __props;
33
- ref(false);
34
- const editorStyle = ref({ theme: "default", fontSize: 14, searchOpen: false });
35
- const editor = ref(null);
36
- const codemirrorRef = ref(null);
37
- const editorContentRef = ref(null);
38
- const showStyle = ref({
39
- backgroundColor: "#fff",
40
- color: "#333",
41
- border: "1px solid #ddd",
42
- overflow: "auto"
43
- });
44
- onMounted(() => {
45
- console.log("eventForm===", props.eventForm);
46
- let cacheEditorStyle = useLocalStorage("editorStyle", "").value;
47
- if (cacheEditorStyle) {
48
- cacheEditorStyle = JSON.parse(cacheEditorStyle);
49
- editorStyle.value.theme = cacheEditorStyle.theme || "default";
50
- editorStyle.value.fontSize = cacheEditorStyle.fontSize || 14;
51
- }
52
- loadEditor();
53
- });
54
- function resize() {
55
- if (codemirrorRef.value) {
56
- setTimeout(() => {
57
- const rect = codemirrorRef.value.getBoundingClientRect();
58
- const editorHeight = window.innerHeight - rect.y - 30 + "px";
59
- if (editor.value && editor.value.dom) {
60
- editor.value.dom.style["height"] = editorHeight;
61
- }
62
- }, 10);
63
- }
64
- }
65
- const jsDocCompletions = javascriptLanguage.data.of({
66
- autocomplete: myCompletions
67
- });
68
- function changeEditorState() {
69
- useLocalStorage("editorStyle", editorStyle.value).value = editorStyle.value;
70
- if (editor.value) {
71
- if (editor.value) {
72
- editor.value.destroy();
73
- }
74
- loadEditor();
75
- }
76
- }
77
- function getEditorState() {
78
- const mytheme = getTheme();
79
- const baseTheme = EditorView.theme({
80
- ".cm-content, .cm-gutter": { minHeight: "400px" },
81
- "&": {
82
- fontSize: editorStyle.value.fontSize + "px"
83
- }
84
- });
85
- return EditorState.create({
86
- doc: props.eventForm.jsContent,
87
- extensions: [
88
- EditorState.tabSize.of(16),
89
- basicSetup,
90
- javascript(),
91
- jsDocCompletions,
92
- mytheme,
93
- baseTheme,
94
- EditorView.updateListener.of(function(value) {
95
- console.log("update", value.state.doc.toString());
96
- props.eventForm.jsContent = value.state.doc.toString();
97
- })
98
- ]
99
- });
100
- }
101
- function getTheme() {
102
- return EditorView.theme({});
103
- }
104
- function updateJsContent(newEvent) {
105
- const hisValue = props.eventForm.jsContent ? props.eventForm.jsContent : "";
106
- if (newEvent && props.eventForm) {
107
- if (!newEvent.jsContent) {
108
- newEvent.jsContent = "";
109
- }
110
- Object.assign(props.eventForm, newEvent);
111
- editor.value.dispatch({
112
- changes: { from: 0, to: hisValue.length, insert: props.eventForm.jsContent }
113
- });
114
- }
115
- }
116
- function loadEditor() {
117
- const state = getEditorState();
118
- editor.value = new EditorView({
119
- state,
120
- parent: document.getElementById("cf-codemirror")
121
- });
122
- }
123
- function myCompletions(context) {
124
- let word = context.matchBefore(/\w*|logicContext\./);
125
- if (word) {
126
- if (word.from == word.to && !context.explicit)
127
- return null;
128
- if ((word == null ? void 0 : word.text) === "logicContext.") {
129
- return {
130
- from: word.from,
131
- options: [
132
- { label: "logicContext.page", type: "property", info: "页面变量" },
133
- { label: "logicContext.logic", type: "property", info: "页面变量" },
134
- { label: "logicContext.task", type: "property", info: "任务变量" },
135
- { label: "logicContext.context", type: "property", info: "上下文变量" },
136
- { label: "logicContext.system", type: "property", info: "系统变量" },
137
- { label: "logicContext.data", type: "property", info: "数据模型变量" }
138
- ]
139
- };
140
- } else {
141
- return {
142
- from: word.from,
143
- options: [{ label: "logicContext", type: "property" }]
144
- };
145
- }
146
- } else {
147
- return null;
148
- }
149
- }
150
- function openSearch() {
151
- if (editor.value) {
152
- editor.value.focus();
153
- let newState = openSearchPanel(editor.value);
154
- if (newState) {
155
- editor.value.update([transaction]);
156
- }
157
- }
158
- }
159
- __expose({ resize, updateJsContent });
160
- return (_ctx, _cache) => {
161
- const _component_el_input = resolveComponent("el-input");
162
- const _component_el_option = resolveComponent("el-option");
163
- const _component_el_select = resolveComponent("el-select");
164
- const _component_el_tooltip = resolveComponent("el-tooltip");
165
- const _component_el_icon = resolveComponent("el-icon");
166
- return openBlock(), createElementBlock("div", {
167
- style: { "padding-right": "20px" },
168
- ref_key: "editorContentRef",
169
- ref: editorContentRef
170
- }, [
171
- createElementVNode("div", _hoisted_1, [
172
- createElementVNode("span", _hoisted_2, [
173
- createTextVNode(" function "),
174
- __props.eventForm.name === "customFunc" ? (openBlock(), createElementBlock("span", _hoisted_3, [
175
- createTextVNode(" ( "),
176
- createVNode(_component_el_input, {
177
- size: "small",
178
- modelValue: __props.eventForm.funcParam,
179
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.eventForm.funcParam = $event),
180
- style: { "width": "300px" },
181
- title: "方法参数"
182
- }, null, 8, ["modelValue"]),
183
- createTextVNode(" ) ")
184
- ])) : (openBlock(), createElementBlock("span", _hoisted_4, " ( params ) ")),
185
- createTextVNode("{ ")
186
- ]),
187
- createElementVNode("span", _hoisted_5, [
188
- createVNode(_component_el_tooltip, {
189
- class: "box-item",
190
- effect: "dark",
191
- content: "切换主题",
192
- placement: "top"
193
- }, {
194
- default: withCtx(() => [
195
- createVNode(_component_el_select, {
196
- class: "editorOption",
197
- onChange: changeEditorState,
198
- modelValue: editorStyle.value.theme,
199
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => editorStyle.value.theme = $event),
200
- placeholder: "",
201
- size: "small",
202
- style: { "width": "120px" }
203
- }, {
204
- default: withCtx(() => [
205
- createVNode(_component_el_option, {
206
- label: "默认",
207
- value: "default"
208
- }),
209
- createVNode(_component_el_option, {
210
- label: "VScodeDark",
211
- value: "vscodeDark"
212
- }),
213
- createVNode(_component_el_option, {
214
- label: "Dracula",
215
- value: "dracula"
216
- }),
217
- createVNode(_component_el_option, {
218
- label: "GithubLight",
219
- value: "githubLight"
220
- }),
221
- createVNode(_component_el_option, {
222
- label: "GithubDark",
223
- value: "githubDark"
224
- }),
225
- createVNode(_component_el_option, {
226
- label: "Eclipse",
227
- value: "eclipse"
228
- }),
229
- createVNode(_component_el_option, {
230
- label: "XcodeLight",
231
- value: "xcodeLight"
232
- }),
233
- createVNode(_component_el_option, {
234
- label: "XcodeDark",
235
- value: "xcodeDark"
236
- })
237
- ]),
238
- _: 1
239
- }, 8, ["modelValue"])
240
- ]),
241
- _: 1
242
- }),
243
- createVNode(_component_el_tooltip, {
244
- class: "box-item",
245
- effect: "dark",
246
- content: "切换字体大小",
247
- placement: "top"
248
- }, {
249
- default: withCtx(() => [
250
- createVNode(_component_el_select, {
251
- class: "editorOption",
252
- modelValue: editorStyle.value.fontSize,
253
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => editorStyle.value.fontSize = $event),
254
- placeholder: "",
255
- onChange: changeEditorState,
256
- size: "small",
257
- style: { "width": "80px" }
258
- }, {
259
- default: withCtx(() => [
260
- createVNode(_component_el_option, {
261
- label: "12",
262
- value: 12
263
- }),
264
- createVNode(_component_el_option, {
265
- label: "14",
266
- value: 14
267
- }),
268
- createVNode(_component_el_option, {
269
- label: "16",
270
- value: 16
271
- }),
272
- createVNode(_component_el_option, {
273
- label: "18",
274
- value: 18
275
- }),
276
- createVNode(_component_el_option, {
277
- label: "20",
278
- value: 20
279
- }),
280
- createVNode(_component_el_option, {
281
- label: "22",
282
- value: 22
283
- }),
284
- createVNode(_component_el_option, {
285
- label: "24",
286
- value: 24
287
- }),
288
- createVNode(_component_el_option, {
289
- label: "26",
290
- value: 26
291
- }),
292
- createVNode(_component_el_option, {
293
- label: "28",
294
- value: 28
295
- })
296
- ]),
297
- _: 1
298
- }, 8, ["modelValue"])
299
- ]),
300
- _: 1
301
- })
302
- ]),
303
- createVNode(_component_el_tooltip, {
304
- class: "box-item",
305
- effect: "dark",
306
- content: "打开搜索",
307
- placement: "top"
308
- }, {
309
- default: withCtx(() => [
310
- createVNode(_component_el_icon, {
311
- class: "editorOption",
312
- onClick: openSearch
313
- }, {
314
- default: withCtx(() => [
315
- createVNode(unref(Search))
316
- ]),
317
- _: 1
318
- })
319
- ]),
320
- _: 1
321
- })
322
- ]),
323
- createElementVNode("div", {
324
- style: normalizeStyle(showStyle.value),
325
- id: "cf-codemirror",
326
- ref_key: "codemirrorRef",
327
- ref: codemirrorRef
328
- }, null, 4),
329
- _hoisted_6
330
- ], 512);
331
- };
332
- }
333
- });
334
- export {
335
- _sfc_main as default
336
- };
1
+
@@ -114,6 +114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
114
114
  function clearTable() {
115
115
  model.tableAlias = "";
116
116
  model.tableName = "";
117
+ model.fieldInfos = [];
117
118
  model.modelFields = [];
118
119
  }
119
120
  function onSelectTable(tableInfo) {
@@ -135,6 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
135
136
  const systemCode = tableInfo.systemCode ? tableInfo.systemCode : pageDesign.systemCode;
136
137
  const systemVersion = tableInfo.systemVersion ? tableInfo.systemVersion : pageDesign.systemVersion;
137
138
  queryTableFields(systemCode, systemVersion, tableInfo.name).then((tableFields) => {
139
+ model.fieldInfos = [];
138
140
  model.modelFields = tableFields;
139
141
  tableFieldStore.addFieldList(tableFields);
140
142
  if (addFieldsRef.value) {
@@ -15,7 +15,7 @@ import "@codemirror/state";
15
15
  import "@codemirror/autocomplete";
16
16
  import "@codemirror/language";
17
17
  import "@codemirror/search";
18
- import "../page-event/config.vue2.js";
18
+ import "../page-event/config.vue3.js";
19
19
  import "../../../utils/assemblys-config.js";
20
20
  import "../../../../../stores/page-store.js";
21
21
  import "../../../../../stores/event-undo-redo-store.js";