super-page-designer 2.1.13 → 2.1.16
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/components/design/utils/interfaces/page-design-types.d.ts +1 -0
- package/dist/es/components/design/views/assemblys/button/button/button-attr-base.vue.js +17 -4
- package/dist/es/components/design/views/assemblys/button/dropdown/dropdown-attr-base.vue.js +24 -3
- package/dist/es/components/design/views/assemblys/button/dropdown/dropdown-attr.vue2.js +9 -1
- package/dist/es/components/design/views/assemblys/button/export-pdf/exportpdf-attr-base.vue.js +15 -2
- package/dist/es/components/design/views/assemblys/button/print-label/printlabel-attr-base.vue.js +17 -4
- package/dist/es/components/design/views/assemblys/common/common-i18n-setting.vue.js +38 -0
- package/dist/es/components/design/views/assemblys/common/common-i18n-setting.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue2.js +1 -725
- package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +725 -1
- package/dist/es/components/design/views/assemblys/container/card/card-design.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/container/collapse/collapse-attr-base.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/container/collapse/collapse-design.vue2.js +3 -1
- package/dist/es/components/design/views/assemblys/container/container/container-design.vue2.js +8 -2
- package/dist/es/components/design/views/assemblys/container/flex/flex-design.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/container/form/form-design.vue2.js +4 -0
- package/dist/es/components/design/views/assemblys/container/tabs/tabs-design.vue2.js +2 -0
- package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/table-attr-advanced.vue.js +19 -2
- package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +1 -1
- package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue2.js +25 -12
- package/dist/es/components/design/views/assemblys/form/checkbox/checkbox-attr-base.vue.js +19 -6
- package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +2 -2
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue.js +152 -1
- package/dist/es/components/design/views/assemblys/form/common/dataorigin-input-table.vue2.js +1 -152
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr-base.vue.js +22 -6
- package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr-base.vue.js +26 -6
- package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/divider/divider-attr-base.vue.js +20 -2
- package/dist/es/components/design/views/assemblys/form/divider/divider-attr.vue2.js +10 -1
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr-base.vue.js +22 -4
- package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr-base.vue.js +22 -4
- package/dist/es/components/design/views/assemblys/form/input-number/input-number-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/input-text/inputtext-attr-base.vue.js +25 -12
- package/dist/es/components/design/views/assemblys/form/label/label-attr-base.vue.js +24 -6
- package/dist/es/components/design/views/assemblys/form/label/label-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/link/link-attr-base.vue.js +19 -6
- package/dist/es/components/design/views/assemblys/form/radio/radio-attr-base.vue.js +19 -6
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr-base.vue.js +20 -2
- package/dist/es/components/design/views/assemblys/form/rich-text/richtext-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/select/select-attr-base.vue.js +21 -8
- package/dist/es/components/design/views/assemblys/form/separatelabel/separatelabel-attr-base.vue.js +31 -10
- package/dist/es/components/design/views/assemblys/form/separatelabel/separatelabel-attr.vue2.js +10 -1
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr-base.vue.js +20 -2
- package/dist/es/components/design/views/assemblys/form/switch/switch-attr.vue2.js +10 -1
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr-base.vue.js +20 -2
- package/dist/es/components/design/views/assemblys/form/tag/tag-attr.vue2.js +8 -1
- package/dist/es/components/design/views/assemblys/form/textarea/textarea-attr-base.vue.js +19 -6
- package/dist/es/components/design/views/assemblys/object-design.vue.js +3 -0
- package/dist/es/components/design/views/design/page-event/config.vue.js +2 -2
- package/dist/es/components/design/views/design/page-event/config.vue2.js +336 -1
- package/dist/es/components/design/views/design/page-event/config.vue3.js +1 -336
- package/dist/es/components/design/views/design/view/view-design-display.vue.js +1 -1
- package/dist/es/style.css +169 -196
- package/package.json +5 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, unref, createCommentVNode, createTextVNode, withDirectives, vShow } from "vue";
|
|
2
2
|
import { getFormComponentOptions } from "../../../../utils/assemblys-config.js";
|
|
3
3
|
import { componentNameChange } from "../../../../utils/form-design-util.js";
|
|
4
|
-
import _sfc_main$
|
|
4
|
+
import _sfc_main$3 from "../../common/common-attr-size.vue.js";
|
|
5
5
|
import BindVariable from "../../common/common-variable-bind.vue.js";
|
|
6
6
|
import _sfc_main$1 from "../../common/common-function-code.vue.js";
|
|
7
|
+
import _sfc_main$2 from "../../common/common-i18n-setting.vue.js";
|
|
7
8
|
const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "tag-attr-base",
|
|
@@ -12,6 +13,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
13
|
type: Object,
|
|
13
14
|
required: true
|
|
14
15
|
},
|
|
16
|
+
pageDesign: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => {
|
|
19
|
+
}
|
|
20
|
+
},
|
|
15
21
|
default: () => ({ props: {} })
|
|
16
22
|
},
|
|
17
23
|
emits: ["changeAssembly"],
|
|
@@ -217,6 +223,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
223
|
}, 512), [
|
|
218
224
|
[vShow, __props.configure.props.base.tittleShow]
|
|
219
225
|
]),
|
|
226
|
+
createVNode(_component_el_form_item, {
|
|
227
|
+
label: "国际化标题",
|
|
228
|
+
class: "amb-design-attr-item"
|
|
229
|
+
}, {
|
|
230
|
+
default: withCtx(() => [
|
|
231
|
+
createVNode(_sfc_main$2, {
|
|
232
|
+
configure: __props.configure,
|
|
233
|
+
systemCode: __props.pageDesign.systemCode
|
|
234
|
+
}, null, 8, ["configure", "systemCode"])
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
}),
|
|
220
238
|
withDirectives(createVNode(_component_el_form_item, {
|
|
221
239
|
label: "标题宽度",
|
|
222
240
|
class: "amb-design-attr-item"
|
|
@@ -350,7 +368,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
350
368
|
]),
|
|
351
369
|
_: 1
|
|
352
370
|
}),
|
|
353
|
-
!isTable.value ? (openBlock(), createBlock(_sfc_main$
|
|
371
|
+
!isTable.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
354
372
|
key: __props.configure.uuid,
|
|
355
373
|
size: __props.configure.props.size
|
|
356
374
|
}, null, 8, ["size"])) : createCommentVNode("", true)
|
|
@@ -13,6 +13,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
type: Object,
|
|
14
14
|
default: () => ({ title: "Text", props: { type: "input-text" } })
|
|
15
15
|
// 设置默认值
|
|
16
|
+
},
|
|
17
|
+
// 页面设计对象
|
|
18
|
+
pageDesign: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => {
|
|
21
|
+
}
|
|
16
22
|
}
|
|
17
23
|
},
|
|
18
24
|
setup(__props) {
|
|
@@ -26,8 +32,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
32
|
createElementVNode("div", _hoisted_2, [
|
|
27
33
|
withDirectives(createVNode(_sfc_main$1, {
|
|
28
34
|
configure: __props.configure,
|
|
35
|
+
pageDesign: __props.pageDesign,
|
|
29
36
|
onChangeAssembly: _cache[1] || (_cache[1] = (val) => _ctx.$emit("changeAssembly", val))
|
|
30
|
-
}, null, 8, ["configure"]), [
|
|
37
|
+
}, null, 8, ["configure", "pageDesign"]), [
|
|
31
38
|
[vShow, unref(currentConfigType) === "base"]
|
|
32
39
|
]),
|
|
33
40
|
withDirectives(createVNode(_sfc_main$2, { configure: __props.configure }, null, 8, ["configure"]), [
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, createElementBlock, Fragment, renderList, unref, createCommentVNode, createTextVNode, withDirectives, vShow } from "vue";
|
|
2
2
|
import { getFormComponentOptions } from "../../../../utils/assemblys-config.js";
|
|
3
3
|
import { componentNameChange } from "../../../../utils/form-design-util.js";
|
|
4
|
-
import _sfc_main$
|
|
4
|
+
import _sfc_main$5 from "../../common/common-attr-size.vue.js";
|
|
5
5
|
import BindVariable from "../../common/common-variable-bind.vue.js";
|
|
6
6
|
import _sfc_main$1 from "../../common/common-function-code.vue.js";
|
|
7
|
-
import _sfc_main$
|
|
8
|
-
import _sfc_main$
|
|
7
|
+
import _sfc_main$3 from "../common/title-suffix.vue.js";
|
|
8
|
+
import _sfc_main$4 from "../common/verification-custom.vue.js";
|
|
9
|
+
import _sfc_main$2 from "../../common/common-i18n-setting.vue.js";
|
|
9
10
|
const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
10
11
|
const _hoisted_2 = { style: { "padding": "8px 0px 0px 0px" } };
|
|
11
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -202,6 +203,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
202
203
|
}, 512), [
|
|
203
204
|
[vShow, __props.configure.props.base.tittleShow]
|
|
204
205
|
]),
|
|
206
|
+
createVNode(_component_el_form_item, {
|
|
207
|
+
label: "国际化标题",
|
|
208
|
+
class: "amb-design-attr-item"
|
|
209
|
+
}, {
|
|
210
|
+
default: withCtx(() => [
|
|
211
|
+
createVNode(_sfc_main$2, {
|
|
212
|
+
configure: __props.configure,
|
|
213
|
+
systemCode: __props.pageDesign.systemCode
|
|
214
|
+
}, null, 8, ["configure", "systemCode"])
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}),
|
|
205
218
|
withDirectives(createVNode(_component_el_form_item, {
|
|
206
219
|
label: "标题宽度",
|
|
207
220
|
class: "amb-design-attr-item"
|
|
@@ -344,7 +357,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
344
357
|
]),
|
|
345
358
|
_: 1
|
|
346
359
|
}),
|
|
347
|
-
withDirectives(createVNode(_sfc_main$
|
|
360
|
+
withDirectives(createVNode(_sfc_main$3, { configure: __props.configure }, null, 8, ["configure"]), [
|
|
348
361
|
[vShow, __props.configure.props.base.tittleShow]
|
|
349
362
|
]),
|
|
350
363
|
(openBlock(), createBlock(_component_el_collapse_item, {
|
|
@@ -468,7 +481,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
468
481
|
"label-width": "0"
|
|
469
482
|
}, {
|
|
470
483
|
default: withCtx(() => [
|
|
471
|
-
createVNode(_sfc_main$
|
|
484
|
+
createVNode(_sfc_main$4, {
|
|
472
485
|
pageDesign: __props.pageDesign,
|
|
473
486
|
verification: __props.configure.props.verification
|
|
474
487
|
}, null, 8, ["pageDesign", "verification"])
|
|
@@ -479,7 +492,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
479
492
|
]),
|
|
480
493
|
_: 1
|
|
481
494
|
})),
|
|
482
|
-
!isTable.value ? (openBlock(), createBlock(_sfc_main$
|
|
495
|
+
!isTable.value ? (openBlock(), createBlock(_sfc_main$5, {
|
|
483
496
|
key: __props.configure.uuid,
|
|
484
497
|
size: __props.configure.props.size
|
|
485
498
|
}, null, 8, ["size"])) : createCommentVNode("", true)
|
|
@@ -69,6 +69,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
69
|
if (props.pageDesign.listCodesMap && props.pageDesign.listCodesMap[listCode]) {
|
|
70
70
|
delete props.pageDesign.listCodesMap[listCode];
|
|
71
71
|
}
|
|
72
|
+
if (props.pageDesign.subTableWatchProps) {
|
|
73
|
+
delete props.pageDesign.subTableWatchProps[props.configure.uuid];
|
|
74
|
+
}
|
|
72
75
|
});
|
|
73
76
|
}
|
|
74
77
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _sfc_main from "./config.
|
|
2
|
-
import "./config.
|
|
1
|
+
import _sfc_main from "./config.vue2.js";
|
|
2
|
+
import "./config.vue3.js";
|
|
3
3
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const config = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-26f79956"]]);
|
|
5
5
|
export {
|
|
@@ -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
|
+
};
|