@kp-ui/lowcode 1.0.68 → 1.0.70
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/_virtual/virtual_svg-icons-register.js +2 -2
- package/package.json +2 -2
- package/render.js +9 -8
- package/src/components/code-editor/code-modal-editor.vue.js +54 -67
- package/src/components/code-editor/code-modal-editor.vue2.js +1 -42
- package/src/components/form-designer/form-widget/index.vue.js +8 -4
- package/src/components/form-designer/setting-panel/form-setting.vue.js +1 -1
- package/src/components/form-designer/setting-panel/index.vue.js +26 -71
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +7 -6
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue.js +2 -2
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +64 -62
- package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -2
- package/src/components/form-designer/toolbar-panel/index.vue.js +101 -108
- package/src/components/form-designer/widget-panel/index.vue.js +4 -2
- package/src/components/form-render/dynamic-dialog.vue.js +7 -6
- package/src/components/http-editor/index.vue.js +6 -5
- package/src/components/http-editor/index.vue2.js +2 -2
- package/src/components/public/ActionButtonListDialog.vue2.js +2 -2
- package/src/mixins/useDataTableMixin.js +8 -5
- package/styles/style.css +1 -1
- package/types/src/lang/en-US.d.ts +440 -0
- package/types/src/lang/en-US.d.ts.map +1 -0
- package/types/src/lang/en-US_extension.d.ts +24 -0
- package/types/src/lang/en-US_extension.d.ts.map +1 -0
- package/types/src/lang/en-US_render.d.ts +39 -0
- package/types/src/lang/en-US_render.d.ts.map +1 -0
- package/types/src/lang/zh-CN.d.ts +450 -0
- package/types/src/lang/zh-CN.d.ts.map +1 -0
- package/types/src/lang/zh-CN_extension.d.ts +24 -0
- package/types/src/lang/zh-CN_extension.d.ts.map +1 -0
- package/types/src/lang/zh-CN_render.d.ts +39 -0
- package/types/src/lang/zh-CN_render.d.ts.map +1 -0
- package/types/src/utils/i18n.d.ts +14 -0
- package/types/src/utils/i18n.d.ts.map +1 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
if (typeof window !== "undefined") {
|
|
2
2
|
let loadSvg = function() {
|
|
3
3
|
var body = document.body;
|
|
4
|
-
var svgDom = document.getElementById("
|
|
4
|
+
var svgDom = document.getElementById("__svg__icons__dom__1749547509077__");
|
|
5
5
|
if (!svgDom) {
|
|
6
6
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7
7
|
svgDom.style.position = "absolute";
|
|
8
8
|
svgDom.style.width = "0";
|
|
9
9
|
svgDom.style.height = "0";
|
|
10
|
-
svgDom.id = "
|
|
10
|
+
svgDom.id = "__svg__icons__dom__1749547509077__";
|
|
11
11
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
12
12
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kp-ui/lowcode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.70",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"types": "main.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@element-plus/icons-vue": "^0.2.4",
|
|
12
|
-
"@kp-ui/tool": "1.0.
|
|
12
|
+
"@kp-ui/tool": "1.0.27",
|
|
13
13
|
"@surely-vue/table": "^5.0.3",
|
|
14
14
|
"animate.css": "^4.1.1",
|
|
15
15
|
"ant-design-vue": "3.2.20",
|
package/render.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, normalizeStyle, withModifiers, normalizeClass, createElementBlock, Fragment, renderList, resolveDynamicComponent, createSlots, renderSlot, mergeProps, render, h } from "vue";
|
|
1
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, normalizeStyle, withModifiers, normalizeClass, createElementBlock, Fragment, renderList, resolveDynamicComponent, createSlots, renderSlot, mergeProps, render, h } from "vue";
|
|
2
2
|
import emitter from "./src/utils/emitter.js";
|
|
3
3
|
import comps from "./src/components/form-designer/form-widget/field-widget/index.js";
|
|
4
4
|
import { buildDefaultFormJson, getContainerWidgetByName, cloneFormConfigWithoutEventHandler, deepClone, getDSByName, overwriteObj, runDataSourceRequest, getAllContainerWidgets, getAllFieldWidgets, getDefaultFormConfig, traverseFieldWidgets, getFieldWidgetByName, traverseFieldWidgetsOfContainer, insertCustomCssToHead, insertGlobalFunctionsToHtml, generateId } from "./src/utils/util.js";
|
|
@@ -13,6 +13,10 @@ const _sfc_main = {
|
|
|
13
13
|
componentName: "VFormRender",
|
|
14
14
|
mixins: [emitter, i18n],
|
|
15
15
|
components: {
|
|
16
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
17
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
18
|
+
return TpfConfigProvider;
|
|
19
|
+
}),
|
|
16
20
|
...comps
|
|
17
21
|
},
|
|
18
22
|
props: {
|
|
@@ -1008,11 +1012,8 @@ const _sfc_main = {
|
|
|
1008
1012
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1009
1013
|
const _component_a_form = resolveComponent("a-form");
|
|
1010
1014
|
const _component_a_spin = resolveComponent("a-spin");
|
|
1011
|
-
const
|
|
1012
|
-
return openBlock(), createBlock(
|
|
1013
|
-
"component-size": $options.size,
|
|
1014
|
-
input: { autocomplete: "off" }
|
|
1015
|
-
}, {
|
|
1015
|
+
const _component_TpfConfigProvider = resolveComponent("TpfConfigProvider");
|
|
1016
|
+
return openBlock(), createBlock(_component_TpfConfigProvider, null, {
|
|
1016
1017
|
default: withCtx(() => [
|
|
1017
1018
|
createVNode(_component_a_spin, { spinning: $data.isLoading }, {
|
|
1018
1019
|
default: withCtx(() => [
|
|
@@ -1078,9 +1079,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1078
1079
|
}, 8, ["spinning"])
|
|
1079
1080
|
]),
|
|
1080
1081
|
_: 3
|
|
1081
|
-
}
|
|
1082
|
+
});
|
|
1082
1083
|
}
|
|
1083
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1084
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0f77057b"]]);
|
|
1084
1085
|
export {
|
|
1085
1086
|
index as default
|
|
1086
1087
|
};
|
|
@@ -1,70 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
centered: true,
|
|
16
|
-
"append-to-body": "",
|
|
17
|
-
"close-on-click-modal": false,
|
|
18
|
-
"close-on-press-escape": false,
|
|
19
|
-
"destroy-on-close": true,
|
|
20
|
-
width: 800
|
|
1
|
+
import { defineComponent, mergeModels, ref, useModel, createBlock, openBlock, unref } from "vue";
|
|
2
|
+
import { useOpenAntdModal, TpfCodeEditor } from "tmgc2-share";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
...{
|
|
5
|
+
name: "code-modal-editor"
|
|
6
|
+
},
|
|
7
|
+
__name: "code-modal-editor",
|
|
8
|
+
props: /* @__PURE__ */ mergeModels({
|
|
9
|
+
isShowEventHeader: { type: Boolean, default: true },
|
|
10
|
+
fnParams: {},
|
|
11
|
+
eventHeader: {},
|
|
12
|
+
title: { default: "事件处理函数" },
|
|
13
|
+
readonly: { type: Boolean, default: false },
|
|
14
|
+
mode: { default: "javascript" }
|
|
21
15
|
}, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
message: "}"
|
|
62
|
-
})) : createCommentVNode("", true)
|
|
63
|
-
]),
|
|
64
|
-
_: 1
|
|
65
|
-
}, 8, ["title", "visible"]);
|
|
66
|
-
}
|
|
67
|
-
const CodeModalEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
16
|
+
"modelValue": { type: String, default: "" },
|
|
17
|
+
"modelModifiers": {}
|
|
18
|
+
}),
|
|
19
|
+
emits: /* @__PURE__ */ mergeModels(["save"], ["update:modelValue"]),
|
|
20
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
21
|
+
const currentCode = ref("");
|
|
22
|
+
const code = useModel(__props, "modelValue");
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const [codeEditorRef, openCodeEditor] = useOpenAntdModal();
|
|
25
|
+
const open = (value) => {
|
|
26
|
+
currentCode.value = value;
|
|
27
|
+
code.value = value;
|
|
28
|
+
openCodeEditor();
|
|
29
|
+
};
|
|
30
|
+
const hanldeSave = (value) => {
|
|
31
|
+
emit("save", value);
|
|
32
|
+
code.value = value;
|
|
33
|
+
};
|
|
34
|
+
__expose({
|
|
35
|
+
codeEditorRef,
|
|
36
|
+
open
|
|
37
|
+
});
|
|
38
|
+
return (_ctx, _cache) => {
|
|
39
|
+
return openBlock(), createBlock(unref(TpfCodeEditor), {
|
|
40
|
+
isShowEventHeader: _ctx.isShowEventHeader,
|
|
41
|
+
ref_key: "codeEditorRef",
|
|
42
|
+
ref: codeEditorRef,
|
|
43
|
+
"fn-params": _ctx.fnParams,
|
|
44
|
+
eventHeader: _ctx.eventHeader,
|
|
45
|
+
modelValue: currentCode.value,
|
|
46
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentCode.value = $event),
|
|
47
|
+
mode: _ctx.mode,
|
|
48
|
+
readonly: _ctx.readonly,
|
|
49
|
+
title: _ctx.title,
|
|
50
|
+
onSetCode: hanldeSave
|
|
51
|
+
}, null, 8, ["isShowEventHeader", "fn-params", "eventHeader", "modelValue", "mode", "readonly", "title"]);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
68
55
|
export {
|
|
69
|
-
|
|
56
|
+
_sfc_main as default
|
|
70
57
|
};
|
|
@@ -1,45 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import i18n from "../../utils/i18n.js";
|
|
3
|
-
const _sfc_main = {
|
|
4
|
-
name: "code-modal-editor",
|
|
5
|
-
mixins: [i18n],
|
|
6
|
-
components: {
|
|
7
|
-
CodeEditor
|
|
8
|
-
},
|
|
9
|
-
props: {
|
|
10
|
-
eventHeader: String,
|
|
11
|
-
title: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: "事件处理函数"
|
|
14
|
-
},
|
|
15
|
-
readonly: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false
|
|
18
|
-
},
|
|
19
|
-
mode: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "javascript"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
showWidgetEventDialogFlag: false,
|
|
27
|
-
eventHandlerCode: ""
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
methods: {
|
|
31
|
-
open(val) {
|
|
32
|
-
const value = val;
|
|
33
|
-
this.showWidgetEventDialogFlag = true;
|
|
34
|
-
this.eventHandlerCode = value.trim();
|
|
35
|
-
},
|
|
36
|
-
saveEventHandler() {
|
|
37
|
-
const val = this.eventHandlerCode.trim();
|
|
38
|
-
this.showWidgetEventDialogFlag = false;
|
|
39
|
-
this.$emit("save", val);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
1
|
+
import _sfc_main from "./code-modal-editor.vue.js";
|
|
43
2
|
export {
|
|
44
3
|
_sfc_main as default
|
|
45
4
|
};
|
|
@@ -2,7 +2,7 @@ import comps from "./field-widget/index.js";
|
|
|
2
2
|
import i18n from "../../../utils/i18n.js";
|
|
3
3
|
import draggableComponent from "../../../lib/vuedraggable/src/vuedraggable.js";
|
|
4
4
|
import _sfc_main$1 from "../../form-render/SubmitButtonRender.vue.js";
|
|
5
|
-
import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeStyle, mergeProps, resolveDynamicComponent } from "vue";
|
|
5
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createElementVNode, createVNode, normalizeClass, createElementBlock, createCommentVNode, toDisplayString, normalizeStyle, mergeProps, resolveDynamicComponent } from "vue";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
8
|
const _sfc_main = {
|
|
@@ -11,6 +11,10 @@ const _sfc_main = {
|
|
|
11
11
|
mixins: [i18n],
|
|
12
12
|
components: {
|
|
13
13
|
Draggable: draggableComponent,
|
|
14
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
15
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
16
|
+
return TpfConfigProvider;
|
|
17
|
+
}),
|
|
14
18
|
SubmitButtonRender: _sfc_main$1,
|
|
15
19
|
...comps
|
|
16
20
|
},
|
|
@@ -154,8 +158,8 @@ const _hoisted_3 = { class: "transition-group-el" };
|
|
|
154
158
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
155
159
|
const _component_draggable = resolveComponent("draggable");
|
|
156
160
|
const _component_a_form = resolveComponent("a-form");
|
|
157
|
-
const
|
|
158
|
-
return openBlock(), createBlock(
|
|
161
|
+
const _component_TpfConfigProvider = resolveComponent("TpfConfigProvider");
|
|
162
|
+
return openBlock(), createBlock(_component_TpfConfigProvider, {
|
|
159
163
|
"component-size": $options.size,
|
|
160
164
|
input: { autocomplete: "off" }
|
|
161
165
|
}, {
|
|
@@ -217,7 +221,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
217
221
|
_: 1
|
|
218
222
|
}, 8, ["component-size"]);
|
|
219
223
|
}
|
|
220
|
-
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
224
|
+
const VFormWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-26ffc996"]]);
|
|
221
225
|
export {
|
|
222
226
|
VFormWidget as default
|
|
223
227
|
};
|
|
@@ -523,7 +523,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
523
523
|
])) : createCommentVNode("", true)
|
|
524
524
|
]);
|
|
525
525
|
}
|
|
526
|
-
const FormSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
526
|
+
const FormSetting = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-becbd35b"]]);
|
|
527
527
|
export {
|
|
528
528
|
FormSetting as default
|
|
529
529
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineAsyncComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, createCommentVNode, createElementVNode, normalizeStyle, withModifiers, createElementBlock, Fragment, renderList, resolveDynamicComponent } from "vue";
|
|
1
2
|
import CodeEditor from "../../code-editor/index.vue.js";
|
|
2
3
|
import comps from "./property-editor/index.js";
|
|
3
4
|
import FormSetting from "./form-setting.vue.js";
|
|
@@ -6,7 +7,7 @@ import WidgetProperties, { propertyRegistered } from "./propertyRegister.js";
|
|
|
6
7
|
import { addWindowResizeHandler } from "../../../utils/util.js";
|
|
7
8
|
import i18n from "../../../utils/i18n.js";
|
|
8
9
|
import emitter from "../../../utils/emitter.js";
|
|
9
|
-
import
|
|
10
|
+
import _sfc_main$1 from "../../code-editor/code-modal-editor.vue.js";
|
|
10
11
|
/* empty css */
|
|
11
12
|
/* empty css */
|
|
12
13
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -17,7 +18,12 @@ const _sfc_main = {
|
|
|
17
18
|
mixins: [i18n, emitter],
|
|
18
19
|
components: {
|
|
19
20
|
CodeEditor,
|
|
21
|
+
TpfConfigProvider: defineAsyncComponent(async () => {
|
|
22
|
+
const { TpfConfigProvider } = await import("tmgc2-share");
|
|
23
|
+
return TpfConfigProvider;
|
|
24
|
+
}),
|
|
20
25
|
FormSetting,
|
|
26
|
+
CodeModalEditor: _sfc_main$1,
|
|
21
27
|
// DataSourceSetting,
|
|
22
28
|
FormCrudSetting,
|
|
23
29
|
...comps
|
|
@@ -167,10 +173,11 @@ const _sfc_main = {
|
|
|
167
173
|
if (eventName === "onValidate" && !this.optionModel["onValidate"]) {
|
|
168
174
|
this.eventHandlerCode = " /* sample code */\n /*\n if ((value > 100) || (value < 0)) {\n return Promise.reject('error message') //fail\n } else {\n return Promise.resolve(); //pass\n }\n */";
|
|
169
175
|
}
|
|
170
|
-
this.
|
|
176
|
+
console.log(this.eventHandlerCode);
|
|
177
|
+
this.$refs.CodeModalEditorRef.open(this.eventHandlerCode);
|
|
171
178
|
},
|
|
172
|
-
saveEventHandler() {
|
|
173
|
-
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
179
|
+
saveEventHandler(value) {
|
|
180
|
+
const codeHints = this.$refs.CodeModalEditorRef.codeEditorRef.ecEditor.getEditorAnnotations();
|
|
174
181
|
let syntaxErrorFlag = false;
|
|
175
182
|
if (!!codeHints && codeHints.length > 0) {
|
|
176
183
|
codeHints.forEach((chItem) => {
|
|
@@ -185,15 +192,13 @@ const _sfc_main = {
|
|
|
185
192
|
}
|
|
186
193
|
if (this.curEventName.includes(".")) {
|
|
187
194
|
const [a, b] = this.curEventName.split(".");
|
|
188
|
-
this.selectedWidget.options[a][b] =
|
|
195
|
+
this.selectedWidget.options[a][b] = value;
|
|
189
196
|
} else {
|
|
190
|
-
this.selectedWidget.options[this.curEventName] =
|
|
197
|
+
this.selectedWidget.options[this.curEventName] = value;
|
|
191
198
|
}
|
|
192
|
-
this.showWidgetEventDialogFlag = false;
|
|
193
199
|
}
|
|
194
200
|
}
|
|
195
201
|
};
|
|
196
|
-
const _hoisted_1 = { class: "dialog-footer" };
|
|
197
202
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
198
203
|
const _component_a_collapse_panel = resolveComponent("a-collapse-panel");
|
|
199
204
|
const _component_a_collapse = resolveComponent("a-collapse");
|
|
@@ -203,16 +208,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
203
208
|
const _component_form_setting = resolveComponent("form-setting");
|
|
204
209
|
const _component_FormCrudSetting = resolveComponent("FormCrudSetting");
|
|
205
210
|
const _component_a_tabs = resolveComponent("a-tabs");
|
|
206
|
-
const
|
|
207
|
-
const _component_code_editor = resolveComponent("code-editor");
|
|
208
|
-
const _component_a_button = resolveComponent("a-button");
|
|
209
|
-
const _component_a_modal = resolveComponent("a-modal");
|
|
211
|
+
const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
|
|
210
212
|
const _component_a_layout = resolveComponent("a-layout");
|
|
211
|
-
const
|
|
212
|
-
return openBlock(), createBlock(
|
|
213
|
-
"component-size": "small",
|
|
214
|
-
input: { autocomplete: "off" }
|
|
215
|
-
}, {
|
|
213
|
+
const _component_TpfConfigProvider = resolveComponent("TpfConfigProvider");
|
|
214
|
+
return openBlock(), createBlock(_component_TpfConfigProvider, null, {
|
|
216
215
|
default: withCtx(() => [
|
|
217
216
|
createVNode(_component_a_layout, { class: "panel-container" }, {
|
|
218
217
|
default: withCtx(() => [
|
|
@@ -286,6 +285,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
286
285
|
}, 8, ["header"])) : createCommentVNode("", true),
|
|
287
286
|
$options.showEventCollapse() && $options.showCollapse($data.eventProps) ? (openBlock(), createBlock(_component_a_collapse_panel, {
|
|
288
287
|
key: "3",
|
|
288
|
+
class: "eventPanel",
|
|
289
289
|
header: _ctx.i18nt("designer.setting.事件属性")
|
|
290
290
|
}, {
|
|
291
291
|
default: withCtx(() => [
|
|
@@ -364,6 +364,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
364
364
|
}, 8, ["header"])) : createCommentVNode("", true),
|
|
365
365
|
$options.showEventCollapse() && $options.showCollapse($data.eventProps) ? (openBlock(), createBlock(_component_a_collapse_panel, {
|
|
366
366
|
key: "3",
|
|
367
|
+
class: "eventPanel",
|
|
367
368
|
header: _ctx.i18nt("designer.setting.事件属性")
|
|
368
369
|
}, {
|
|
369
370
|
default: withCtx(() => [
|
|
@@ -432,60 +433,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
433
|
]),
|
|
433
434
|
_: 1
|
|
434
435
|
}, 8, ["activeKey"]),
|
|
435
|
-
createVNode(
|
|
436
|
+
createVNode(_component_CodeModalEditor, {
|
|
437
|
+
eventHeader: $data.eventHeader,
|
|
438
|
+
ref: "CodeModalEditorRef",
|
|
436
439
|
title: _ctx.i18nt("designer.setting.editWidgetEventHandler"),
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
"append-to-body": "",
|
|
442
|
-
"close-on-click-modal": false,
|
|
443
|
-
"close-on-press-escape": false,
|
|
444
|
-
"destroy-on-close": true,
|
|
445
|
-
width: 800
|
|
446
|
-
}, {
|
|
447
|
-
footer: withCtx(() => [
|
|
448
|
-
createElementVNode("div", _hoisted_1, [
|
|
449
|
-
createVNode(_component_a_button, {
|
|
450
|
-
onClick: _cache[8] || (_cache[8] = ($event) => $data.showWidgetEventDialogFlag = false)
|
|
451
|
-
}, {
|
|
452
|
-
default: withCtx(() => [
|
|
453
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
454
|
-
]),
|
|
455
|
-
_: 1
|
|
456
|
-
}),
|
|
457
|
-
createVNode(_component_a_button, {
|
|
458
|
-
type: "primary",
|
|
459
|
-
onClick: $options.saveEventHandler
|
|
460
|
-
}, {
|
|
461
|
-
default: withCtx(() => [
|
|
462
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.confirm")), 1)
|
|
463
|
-
]),
|
|
464
|
-
_: 1
|
|
465
|
-
}, 8, ["onClick"])
|
|
466
|
-
])
|
|
467
|
-
]),
|
|
468
|
-
default: withCtx(() => [
|
|
469
|
-
createVNode(_component_a_alert, {
|
|
470
|
-
type: "info",
|
|
471
|
-
closable: false,
|
|
472
|
-
message: $data.eventHeader
|
|
473
|
-
}, null, 8, ["message"]),
|
|
474
|
-
createVNode(_component_code_editor, {
|
|
475
|
-
mode: "javascript",
|
|
476
|
-
readonly: false,
|
|
477
|
-
modelValue: $data.eventHandlerCode,
|
|
478
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.eventHandlerCode = $event),
|
|
479
|
-
ref: "ecEditor"
|
|
480
|
-
}, null, 8, ["modelValue"]),
|
|
481
|
-
createVNode(_component_a_alert, {
|
|
482
|
-
type: "info",
|
|
483
|
-
closable: false,
|
|
484
|
-
message: "}"
|
|
485
|
-
})
|
|
486
|
-
]),
|
|
487
|
-
_: 1
|
|
488
|
-
}, 8, ["title", "visible"])
|
|
440
|
+
mode: "json",
|
|
441
|
+
readonly: false,
|
|
442
|
+
onSave: $options.saveEventHandler
|
|
443
|
+
}, null, 8, ["eventHeader", "title", "onSave"])
|
|
489
444
|
]),
|
|
490
445
|
_: 1
|
|
491
446
|
})
|
|
@@ -493,7 +448,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
493
448
|
_: 1
|
|
494
449
|
});
|
|
495
450
|
}
|
|
496
|
-
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
451
|
+
const SettingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-82f86155"]]);
|
|
497
452
|
export {
|
|
498
453
|
SettingPanel as default
|
|
499
454
|
};
|
package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i18n from "../../../../utils/i18n.js";
|
|
2
|
-
import
|
|
2
|
+
import _sfc_main$1 from "../../../code-editor/code-modal-editor.vue.js";
|
|
3
3
|
import { generateId } from "../../../../utils/util.js";
|
|
4
4
|
import { cloneDeep } from "lodash-es";
|
|
5
5
|
import ActionButtonListDialog from "../../../public/ActionButtonListDialog.vue.js";
|
|
@@ -16,7 +16,7 @@ const _sfc_main = {
|
|
|
16
16
|
},
|
|
17
17
|
components: {
|
|
18
18
|
ActionButtonListDialog,
|
|
19
|
-
CodeModalEditor
|
|
19
|
+
CodeModalEditor: _sfc_main$1
|
|
20
20
|
},
|
|
21
21
|
data() {
|
|
22
22
|
return {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import i18n from "../../../../../utils/i18n.js";
|
|
2
2
|
import HttpEditor from "../../../../http-editor/index.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import _sfc_main$1 from "../../../../code-editor/code-modal-editor.vue.js";
|
|
4
4
|
import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createBlock, createCommentVNode, withCtx, createTextVNode, toDisplayString } from "vue";
|
|
5
5
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
name: "data-table-dsEnabled-editor",
|
|
8
8
|
mixins: [i18n],
|
|
9
|
-
components: { HttpEditor, CodeModalEditor },
|
|
9
|
+
components: { HttpEditor, CodeModalEditor: _sfc_main$1 },
|
|
10
10
|
props: {
|
|
11
11
|
designer: Object,
|
|
12
12
|
selectedWidget: Object,
|
|
@@ -18,10 +18,9 @@ const _sfc_main = {
|
|
|
18
18
|
};
|
|
19
19
|
},
|
|
20
20
|
methods: {
|
|
21
|
-
|
|
21
|
+
handleUpdate(value) {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
this.optionModel.dataSource = JSON.parse(data);
|
|
23
|
+
this.optionModel.dataSource = JSON.parse(value);
|
|
25
24
|
} catch (ex) {
|
|
26
25
|
this.$message.error(
|
|
27
26
|
this.i18nt("designer.hint.invalidOptionsData") + ex.message
|
|
@@ -30,6 +29,7 @@ const _sfc_main = {
|
|
|
30
29
|
},
|
|
31
30
|
openTableDataEdit() {
|
|
32
31
|
this.tableDataOptions = JSON.stringify(this.optionModel.dataSource, null, " ");
|
|
32
|
+
console.log(this.tableDataOptions);
|
|
33
33
|
this.$refs.CodeModalEditorRef.open(this.tableDataOptions);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -74,8 +74,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
74
74
|
ref: "CodeModalEditorRef",
|
|
75
75
|
mode: "json",
|
|
76
76
|
readonly: false,
|
|
77
|
+
isShowEventHeader: false,
|
|
77
78
|
title: _ctx.i18nt("designer.setting.tableDataEdit"),
|
|
78
|
-
onSave: $options.
|
|
79
|
+
onSave: $options.handleUpdate
|
|
79
80
|
}, null, 8, ["title", "onSave"]),
|
|
80
81
|
!!$props.optionModel.dsEnabled ? (openBlock(), createBlock(_component_HttpEditor, {
|
|
81
82
|
key: 1,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import i18n from "../../../../../utils/i18n.js";
|
|
2
|
-
import
|
|
2
|
+
import _sfc_main$1 from "../../../../code-editor/code-modal-editor.vue.js";
|
|
3
3
|
import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createBlock, createCommentVNode, createTextVNode, normalizeClass, toDisplayString } from "vue";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
name: "rowSelection-editor",
|
|
8
8
|
mixins: [i18n],
|
|
9
|
-
components: { CodeModalEditor },
|
|
9
|
+
components: { CodeModalEditor: _sfc_main$1 },
|
|
10
10
|
props: {
|
|
11
11
|
designer: Object,
|
|
12
12
|
selectedWidget: Object,
|