@kp-ui/lowcode 2.14.0-beta.1 → 2.14.0-beta.2

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.
Files changed (55) hide show
  1. package/install.js +26 -25
  2. package/package.json +2 -2
  3. package/src/components/form-designer/form-widget/field-widget/diy-compontent-widget.vue.js +1 -1
  4. package/src/components/form-designer/index.vue.js +55 -54
  5. package/src/components/form-designer/setting-panel/form-crud-setting.vue.js +62 -23
  6. package/src/components/form-designer/setting-panel/index.vue.js +4 -323
  7. package/src/components/form-designer/setting-panel/index.vue2.js +273 -0
  8. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue2.js +5 -4
  9. package/src/components/form-designer/setting-panel/property-editor/container-data-table/customRowEvent/data-table-customRow-editor.vue.js +1 -0
  10. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +5 -4
  11. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-pagination-editor.vue.js +1 -0
  12. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-selections-editor.vue2.js +19 -18
  13. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +9 -8
  14. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -1
  15. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +7 -6
  16. package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/bodyStyle-editor.vue2.js +7 -6
  17. package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue.js +2 -40
  18. package/src/components/form-designer/setting-panel/property-editor/customRender-editor.vue2.js +41 -0
  19. package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue.js +2 -47
  20. package/src/components/form-designer/setting-panel/property-editor/event-handler/onClickIcon-editor.vue2.js +44 -0
  21. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue.js +2 -47
  22. package/src/components/form-designer/setting-panel/property-editor/event-handler/onCreated-editor.vue2.js +43 -0
  23. package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue.js +2 -46
  24. package/src/components/form-designer/setting-panel/property-editor/event-handler/onOkButtonClick-editor.vue2.js +43 -0
  25. package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue.js +2 -47
  26. package/src/components/form-designer/setting-panel/property-editor/event-handler/onValidate-editor.vue2.js +44 -0
  27. package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue.js +2 -66
  28. package/src/components/form-designer/setting-panel/property-editor/field-dropdown/dropdown-menuList-editor.vue2.js +42 -0
  29. package/src/components/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue.js +5 -4
  30. package/src/components/form-designer/setting-panel/property-editor/hidden-editor.vue.js +6 -5
  31. package/src/components/form-designer/setting-panel/property-editor/index.js +98 -99
  32. package/src/components/form-designer/setting-panel/property-editor/labelIconClass-editor.vue.js +8 -7
  33. package/src/components/form-designer/setting-panel/property-editor/optionItems-editor.vue.js +38 -35
  34. package/src/components/form-render/container-item/data-table-item.vue.js +149 -0
  35. package/src/components/form-render/container-item/grid-col-item.vue.js +149 -0
  36. package/src/components/form-render/container-item/grid-item.vue.js +92 -0
  37. package/src/components/form-render/container-item/grid-sub-form-item.vue.js +319 -0
  38. package/src/components/form-render/container-item/index.js +24 -0
  39. package/src/components/form-render/container-item/sub-form-item.vue.js +429 -0
  40. package/src/components/form-render/container-item/tab-item.vue.js +160 -0
  41. package/src/components/form-render/container-item/table-cell-item.vue.js +95 -0
  42. package/src/components/form-render/container-item/table-item.vue.js +96 -0
  43. package/src/components/form-render/container-item/vf-collapse-item.vue.js +252 -0
  44. package/src/components/form-render/container-item/vf-dialog-item.vue.js +12 -0
  45. package/src/components/form-render/container-item/vf-drawer-item.vue.js +12 -0
  46. package/src/components/form-render/index.vue.js +2 -1
  47. package/src/components/http-editor/index.vue.js +10 -10
  48. package/src/components/public/ActionButtonListRender.vue.js +19 -24
  49. package/src/lang/en-US.js +1 -3
  50. package/src/lang/zh-CN.js +0 -3
  51. package/src/utils/useEmitter.js +57 -0
  52. package/src/utils/util.js +50 -49
  53. package/stats.html +1 -1
  54. package/styles/style.css +1 -1
  55. package/src/components/form-designer/setting-panel/property-editor/event-handler/onVformAdd-editor.vue.js +0 -49
@@ -1,327 +1,8 @@
1
- import { TpfCodeEditor as F } from "tmgc2-share";
2
- import V from "./property-editor/index.js";
3
- import K from "./form-setting.vue.js";
4
- import O from "./form-crud-setting.vue.js";
5
- import R, { propertyRegistered as D } from "./propertyRegister.js";
6
- import { addWindowResizeHandler as A } from "../../../utils/util.js";
7
- import j from "../../../utils/i18n.js";
8
- import { get as x } from "../../../utils/smart-vue-i18n/utils.js";
9
- import z from "../../../utils/emitter.js";
10
- import I from "../../code-editor/code-modal-editor.vue.js";
11
- import { resolveComponent as n, createElementBlock as p, openBlock as s, Fragment as h, createVNode as r, withCtx as l, createBlock as g, createCommentVNode as _, createElementVNode as u, normalizeStyle as v, withModifiers as U, renderList as E, normalizeClass as B, resolveDynamicComponent as L } from "vue";
1
+ import t from "./index.vue2.js";
12
2
  /* empty css */
13
3
  /* empty css */
14
- import q from "../../../../_virtual/_plugin-vue_export-helper.js";
15
- const { COMMON_PROPERTIES: G, ADVANCED_PROPERTIES: J, EVENT_PROPERTIES: Q } = R, X = {
16
- name: "SettingPanel",
17
- componentName: "SettingPanel",
18
- mixins: [j, z],
19
- components: {
20
- TpfCodeEditor: F,
21
- FormSetting: K,
22
- CodeModalEditor: I,
23
- FormCrudSetting: O,
24
- ...V
25
- },
26
- props: {
27
- designer: Object,
28
- selectedWidget: Object,
29
- formConfig: Object,
30
- globalDsv: {
31
- type: Object,
32
- default: () => ({})
33
- }
34
- },
35
- provide() {
36
- return {
37
- isSubFormChildWidget: () => this.subFormChildWidgetFlag,
38
- getGlobalDsv: () => this.globalDsv
39
- // 全局数据源变量
40
- };
41
- },
42
- inject: ["getDesignerConfig"],
43
- data() {
44
- return {
45
- designerConfig: this.getDesignerConfig(),
46
- scrollerHeight: 0,
47
- activeTab: "2",
48
- widgetActiveCollapseNames: ["1", "2", "3"],
49
- formActiveCollapseNames: ["1", "2"],
50
- commonProps: G,
51
- advProps: J,
52
- eventProps: Q,
53
- showWidgetEventDialogFlag: !1,
54
- eventHandlerCode: "",
55
- curEventName: "",
56
- eventHeader: "",
57
- subFormChildWidgetFlag: !1
58
- };
59
- },
60
- computed: {
61
- optionModel: {
62
- get() {
63
- return this.selectedWidget.options;
64
- },
65
- set(e) {
66
- this.selectedWidget.options = e;
67
- }
68
- },
69
- /**
70
- * 构建折叠面板配置列表,用于循环渲染面板
71
- * 将常见/高级/事件属性的差异抽象为配置,减少模板重复
72
- */
73
- collapsePanels() {
74
- const e = this.showCollapse(this.commonProps), t = this.showCollapse(this.advProps), i = this.showEventCollapse() && this.showCollapse(this.eventProps);
75
- return [
76
- {
77
- key: "1",
78
- headerKey: this.i18nt("designer.setting.常见属性"),
79
- props: this.commonProps,
80
- className: "",
81
- visible: e,
82
- useVModel: !0,
83
- isEvent: !1
84
- },
85
- {
86
- key: "2",
87
- headerKey: this.i18nt("designer.setting.高级属性"),
88
- props: this.advProps,
89
- className: "",
90
- visible: t,
91
- useVModel: !1,
92
- isEvent: !1
93
- },
94
- {
95
- key: "3",
96
- headerKey: this.i18nt("designer.setting.事件属性"),
97
- props: this.eventProps,
98
- className: "eventPanel",
99
- visible: i,
100
- useVModel: !1,
101
- isEvent: !0
102
- }
103
- ].filter((d) => d.visible);
104
- }
105
- },
106
- watch: {
107
- "designer.selectedWidget": {
108
- handler(e) {
109
- e && (this.activeTab = "1");
110
- }
111
- },
112
- "selectedWidget.options": {
113
- //组件属性变动后,立即保存表单JSON!!
114
- deep: !0,
115
- handler() {
116
- this.designer.saveCurrentHistoryStep();
117
- }
118
- },
119
- formConfig: {
120
- deep: !0,
121
- handler() {
122
- this.designer.saveCurrentHistoryStep();
123
- }
124
- }
125
- },
126
- created() {
127
- this.on$("editEventHandler", (e) => {
128
- this.editEventHandler(e[0], e[1]);
129
- }), this.designer.handleEvent("form-css-updated", (e) => {
130
- this.designer.setCssClassList(e);
131
- }), this.designer.handleEvent("field-selected", (e) => {
132
- this.subFormChildWidgetFlag = !!e && e.type === "sub-form";
133
- });
134
- },
135
- mounted() {
136
- this.designer.selectedWidget ? this.activeTab = "1" : this.activeTab = "2", this.scrollerHeight = window.innerHeight - 56 - 48 + "px", A(() => {
137
- this.$nextTick(() => {
138
- this.scrollerHeight = window.innerHeight - 56 - 48 + "px";
139
- });
140
- });
141
- },
142
- methods: {
143
- /**
144
- * 处理 option-model 的双向绑定更新
145
- * 与 v-model:option-model 等效,实现通用事件绑定方式
146
- */
147
- onUpdateOptionModel(e) {
148
- this.optionModel = e;
149
- },
150
- getEventHandled(e) {
151
- return !!this.optionModel[e] && this.optionModel[e].length > 0;
152
- },
153
- showEventCollapse() {
154
- return this.designerConfig.eventCollapse === void 0 ? !0 : !!this.designerConfig.eventCollapse;
155
- },
156
- hasPropEditor(e, t) {
157
- if (!t)
158
- return !1;
159
- if (e.indexOf("-") <= -1) {
160
- const o = this.selectedWidget.type + "-" + e;
161
- if (D(o))
162
- return !1;
163
- }
164
- const i = e.replace(this.selectedWidget.type + "-", "");
165
- return this.designer.hasConfig(this.selectedWidget, i);
166
- },
167
- getPropEditor(e, t) {
168
- const i = e.replace(this.selectedWidget.type + "-", ""), d = `${this.selectedWidget.type}-${i}-editor`;
169
- return this.$options.components[d] || this.$root.$.appContext.components[d] ? d : t;
170
- },
171
- showCollapse(e) {
172
- let t = !1;
173
- for (const i in e)
174
- if (e.hasOwnProperty(i) && this.hasPropEditor(i, e[i])) {
175
- t = !0;
176
- break;
177
- }
178
- return t;
179
- },
180
- editEventHandler(e, t) {
181
- this.curEventName = e, this.eventHeader = `${this.optionModel.name}.${e}(${t.join(
182
- ", "
183
- )}) {`, this.eventHandlerCode = x(this.selectedWidget.options, e) || "", console.log({ eventName: e, eventHandlerCode: this.eventHandlerCode }), e === "onValidate" && !this.optionModel.onValidate && (this.eventHandlerCode = ` /* sample code */
184
- /*
185
- if ((value > 100) || (value < 0)) {
186
- return Promise.reject('error message') //fail
187
- } else {
188
- return Promise.resolve(); //pass
189
- }
190
- */`), this.$refs.CodeModalEditorRef.open(this.eventHandlerCode);
191
- },
192
- saveEventHandler(e) {
193
- if (this.curEventName.includes(".")) {
194
- const [t, i] = this.curEventName.split(".");
195
- this.selectedWidget.options[t][i] = e;
196
- } else
197
- this.selectedWidget.options[this.curEventName] = e;
198
- }
199
- }
200
- };
201
- function Y(e, t, i, d, o, a) {
202
- const b = n("a-collapse-panel"), y = n("a-collapse"), P = n("a-form"), H = n("a-empty"), f = n("a-tab-pane"), w = n("form-setting"), W = n("FormCrudSetting"), M = n("a-tabs"), S = n("a-layout"), k = n("a-config-provider"), N = n("TpfCodeEditor");
203
- return s(), p(h, null, [
204
- r(k, { componentSize: "small" }, {
205
- default: l(() => [
206
- r(S, { class: "panel-container" }, {
207
- default: l(() => [
208
- r(M, {
209
- activeKey: o.activeTab,
210
- "onUpdate:activeKey": t[3] || (t[3] = (c) => o.activeTab = c),
211
- style: { height: "100%", width: "100%", overflow: "hidden" }
212
- }, {
213
- default: l(() => [
214
- r(f, {
215
- tab: e.i18nt("designer.hint.widgetSetting"),
216
- key: "1"
217
- }, {
218
- default: l(() => [
219
- u("div", {
220
- class: "setting-scrollbar",
221
- style: v({ height: o.scrollerHeight })
222
- }, [
223
- i.designer.selectedWidget ? (s(), g(P, {
224
- key: 0,
225
- model: a.optionModel,
226
- labelAlign: "left",
227
- "label-width": "120px",
228
- class: "setting-form tpf-form",
229
- onSubmit: t[2] || (t[2] = U(() => {
230
- }, ["prevent"]))
231
- }, {
232
- default: l(() => [
233
- r(y, {
234
- activeKey: o.widgetActiveCollapseNames,
235
- "onUpdate:activeKey": t[1] || (t[1] = (c) => o.widgetActiveCollapseNames = c),
236
- class: "setting-collapse"
237
- }, {
238
- default: l(() => [
239
- (s(!0), p(h, null, E(a.collapsePanels, (c) => (s(), g(b, {
240
- key: c.key,
241
- class: B(c.className),
242
- header: c.headerKey
243
- }, {
244
- default: l(() => [
245
- (s(!0), p(h, null, E(c.props, (C, m) => (s(), p(h, null, [
246
- a.hasPropEditor(m, C) ? (s(), g(L(a.getPropEditor(m, C)), {
247
- key: m,
248
- designer: i.designer,
249
- "selected-widget": i.selectedWidget,
250
- "option-model": a.optionModel,
251
- "onUpdate:optionModel": t[0] || (t[0] = (T) => a.optionModel = T),
252
- "event-handled": a.getEventHandled(m)
253
- }, null, 40, ["designer", "selected-widget", "option-model", "event-handled"])) : _("", !0)
254
- ], 64))), 256))
255
- ]),
256
- _: 2
257
- }, 1032, ["class", "header"]))), 128))
258
- ]),
259
- _: 1
260
- }, 8, ["activeKey"])
261
- ]),
262
- _: 1
263
- }, 8, ["model"])) : (s(), g(H, {
264
- key: 1,
265
- description: e.i18nt("designer.hint.noSelectedWidgetHint")
266
- }, null, 8, ["description"]))
267
- ], 4)
268
- ]),
269
- _: 1
270
- }, 8, ["tab"]),
271
- i.designer ? (s(), g(f, {
272
- tab: e.i18nt("designer.hint.表单设置"),
273
- key: "2"
274
- }, {
275
- default: l(() => [
276
- u("div", {
277
- class: "setting-scrollbar",
278
- style: v({ height: o.scrollerHeight })
279
- }, [
280
- r(w, {
281
- designer: i.designer,
282
- "form-config": i.formConfig
283
- }, null, 8, ["designer", "form-config"])
284
- ], 4)
285
- ]),
286
- _: 1
287
- }, 8, ["tab"])) : _("", !0),
288
- r(f, {
289
- tab: e.i18nt("designer.hint.表单api配置"),
290
- key: "3"
291
- }, {
292
- default: l(() => [
293
- u("div", {
294
- class: "ds-setting-scrollbar",
295
- style: v({ height: o.scrollerHeight })
296
- }, [
297
- r(W, {
298
- designer: i.designer,
299
- "form-config": i.formConfig
300
- }, null, 8, ["designer", "form-config"])
301
- ], 4)
302
- ]),
303
- _: 1
304
- }, 8, ["tab"])
305
- ]),
306
- _: 1
307
- }, 8, ["activeKey"])
308
- ]),
309
- _: 1
310
- })
311
- ]),
312
- _: 1
313
- }),
314
- r(N, {
315
- eventHeader: o.eventHeader,
316
- ref: "CodeModalEditorRef",
317
- title: e.i18nt("designer.setting.editWidgetEventHandler"),
318
- mode: "javascript",
319
- readonly: !1,
320
- onSetCode: a.saveEventHandler
321
- }, null, 8, ["eventHeader", "title", "onSetCode"])
322
- ], 64);
323
- }
324
- const me = /* @__PURE__ */ q(X, [["render", Y], ["__scopeId", "data-v-b6c5eb4a"]]);
4
+ import o from "../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2de83fcf"]]);
325
6
  export {
326
- me as default
7
+ p as default
327
8
  };
@@ -0,0 +1,273 @@
1
+ import { defineComponent as ue, mergeModels as ce, useModel as B, inject as ve, ref as i, provide as I, computed as j, watchEffect as fe, watch as L, onBeforeMount as ge, resolveComponent as p, createElementBlock as P, openBlock as r, Fragment as w, createVNode as d, withCtx as u, createBlock as y, createCommentVNode as U, unref as _, createElementVNode as K, withModifiers as pe, renderList as z, normalizeClass as me, resolveDynamicComponent as ye } from "vue";
2
+ import D from "./property-editor/index.js";
3
+ import { TpfCodeEditor as _e } from "tmgc2-share";
4
+ import Ce from "./form-setting.vue.js";
5
+ import Ee from "./form-crud-setting.vue.js";
6
+ import be, { propertyRegistered as he } from "./propertyRegister.js";
7
+ import { get as q } from "../../../utils/smart-vue-i18n/utils.js";
8
+ import { useEmitter as Pe } from "../../../utils/useEmitter.js";
9
+ import { useI18n as we } from "../../../utils/i18n.js";
10
+ const Me = { class: "setting-scrollbar" }, $e = { class: "setting-scrollbar" }, He = { class: "ds-setting-scrollbar" }, Te = /* @__PURE__ */ ue({
11
+ name: "SettingPanel",
12
+ componentName: "SettingPanel",
13
+ __name: "index",
14
+ props: /* @__PURE__ */ ce({
15
+ designer: { default: () => {
16
+ } },
17
+ globalDsv: {}
18
+ }, {
19
+ "form-config": {
20
+ default: () => ({})
21
+ },
22
+ "form-configModifiers": {},
23
+ "selected-widget": {
24
+ default: () => ({})
25
+ },
26
+ "selected-widgetModifiers": {}
27
+ }),
28
+ emits: ["update:form-config", "update:selected-widget"],
29
+ setup(M, { expose: G }) {
30
+ const { i18nt: c } = we(), { COMMON_PROPERTIES: O, ADVANCED_PROPERTIES: R, EVENT_PROPERTIES: T } = be, v = M, $ = B(M, "form-config"), C = Pe(), Q = v.globalDsv || {}, X = ve("getDesignerConfig"), W = i(!1);
31
+ I("isSubFormChildWidget", () => W.value), I("getGlobalDsv", () => Q);
32
+ const H = i(), F = i(""), E = i("javascript"), S = i("2"), J = i(["1", "2", "3"]), f = i(""), m = i(""), k = i(""), o = B(M, "selected-widget"), x = j(() => X()), l = j({
33
+ get() {
34
+ var e;
35
+ return ((e = o.value) == null ? void 0 : e.options) || {};
36
+ },
37
+ set(e) {
38
+ o.value.options = e;
39
+ }
40
+ }), Y = (e) => !!l.value[e] && l.value[e].length > 0, Z = () => x.value.eventCollapse === void 0 ? !0 : !!x.value.eventCollapse, A = (e, t) => {
41
+ if (!t)
42
+ return !1;
43
+ if (e.indexOf("-") <= -1) {
44
+ const g = o.value.type + "-" + e;
45
+ if (he(g))
46
+ return !1;
47
+ }
48
+ const n = e.replace(o.value.type + "-", "");
49
+ return v.designer.hasConfig(o.value, n);
50
+ }, ee = (e, t) => {
51
+ const n = e.replace(o.value.type + "-", "") + "-editor", s = `${o.value.type}-${n}-editor`;
52
+ return D[s] ? D[s] : D[n];
53
+ }, V = (e) => {
54
+ let t = !1;
55
+ for (const n in e)
56
+ if (Object.prototype.hasOwnProperty.call(e, n) && A(n, e[n])) {
57
+ t = !0;
58
+ break;
59
+ }
60
+ return t;
61
+ }, te = j(() => {
62
+ const e = V(O), t = V(R), n = Z() && V(T);
63
+ return [
64
+ {
65
+ key: "1",
66
+ headerKey: c("designer.setting.常见属性"),
67
+ props: O,
68
+ className: "",
69
+ visible: e,
70
+ useVModel: !0,
71
+ isEvent: !1
72
+ },
73
+ {
74
+ key: "2",
75
+ headerKey: c("designer.setting.高级属性"),
76
+ props: R,
77
+ className: "",
78
+ visible: t,
79
+ useVModel: !1,
80
+ isEvent: !1
81
+ },
82
+ {
83
+ key: "3",
84
+ headerKey: c("designer.setting.事件属性"),
85
+ props: T,
86
+ className: "eventPanel",
87
+ visible: n,
88
+ useVModel: !1,
89
+ isEvent: !0
90
+ }
91
+ ].filter((s) => s.visible);
92
+ }), ne = () => {
93
+ C.off$("onChangeEventHandler"), C.on$("onChangeEventHandler", ({ title: e, attr: t, eventParams: n = [], mode: s }) => {
94
+ F.value = e || c("designer.setting.editWidgetEventHandler");
95
+ const g = s === "json";
96
+ m.value = t, E.value = s;
97
+ const b = `${l.value.name}.${t}`;
98
+ k.value = g ? `${b}{` : `${b}(${n.join(", ")}) {`, f.value = q(o.value.options, t) || "", s === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), t === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
99
+ /*
100
+ if ((value > 100) || (value < 0)) {
101
+ return Promise.reject('error message') //fail
102
+ } else {
103
+ return Promise.resolve(); //pass
104
+ }
105
+ */`), H.value.open(f.value);
106
+ });
107
+ }, oe = (e, t, n = "javascript") => {
108
+ const s = n === "json";
109
+ m.value = e, E.value = n;
110
+ const g = `${l.value.name}.${e}`;
111
+ k.value = s ? `${g}{` : `${g}(${t.join(", ")}) {`, f.value = q(o.value.options, e) || "", n === "json" && (f.value = JSON.stringify(l.value.menuList, null, " ")), e === "onValidate" && !l.value.onValidate && (f.value = ` /* sample code */
112
+ /*
113
+ if ((value > 100) || (value < 0)) {
114
+ return Promise.reject('error message') //fail
115
+ } else {
116
+ return Promise.resolve(); //pass
117
+ }
118
+ */`), H.value.open(f.value);
119
+ }, se = (e) => {
120
+ if (E.value === "json" && (e = JSON.parse(e)), m.value.includes(".")) {
121
+ const [t, n] = m.value.split(".");
122
+ o.value.options[t][n] = e;
123
+ } else
124
+ o.value.options[m.value] = e;
125
+ };
126
+ return fe(() => {
127
+ o.value && (S.value = "1");
128
+ }), L(
129
+ () => {
130
+ var e;
131
+ return (e = o.value) == null ? void 0 : e.options;
132
+ },
133
+ () => {
134
+ v.designer.saveCurrentHistoryStep();
135
+ },
136
+ { deep: !0 }
137
+ ), L(
138
+ () => v.formConfig,
139
+ () => {
140
+ v.designer.saveCurrentHistoryStep();
141
+ },
142
+ { deep: !0 }
143
+ ), ge(() => {
144
+ C.on$("editEventHandler", (e) => {
145
+ oe(e[0], e[1], e[2]);
146
+ }), ne(), v.designer.handleEvent("form-css-updated", (e) => {
147
+ v.designer.setCssClassList(e);
148
+ }), v.designer.handleEvent("field-selected", (e) => {
149
+ W.value = !!e && e.type === "sub-form";
150
+ });
151
+ }), G({
152
+ emit$: C.emit$
153
+ }), (e, t) => {
154
+ const n = p("a-collapse-panel"), s = p("a-collapse"), g = p("a-form"), b = p("a-empty"), N = p("a-tab-pane"), le = p("a-tabs"), ae = p("a-layout"), ie = p("a-config-provider");
155
+ return r(), P(w, null, [
156
+ d(ie, { componentSize: "small" }, {
157
+ default: u(() => [
158
+ d(ae, { class: "panel-container" }, {
159
+ default: u(() => [
160
+ d(le, {
161
+ activeKey: S.value,
162
+ "onUpdate:activeKey": t[4] || (t[4] = (a) => S.value = a),
163
+ style: { height: "100%", width: "100%", overflow: "hidden" }
164
+ }, {
165
+ default: u(() => [
166
+ d(N, {
167
+ tab: _(c)("designer.hint.widgetSetting"),
168
+ key: "1"
169
+ }, {
170
+ default: u(() => [
171
+ K("div", Me, [
172
+ e.designer.selectedWidget ? (r(), y(g, {
173
+ key: 0,
174
+ model: l.value,
175
+ labelAlign: "left",
176
+ "label-width": "120px",
177
+ class: "setting-form tpf-form",
178
+ onSubmit: t[2] || (t[2] = pe(() => {
179
+ }, ["prevent"]))
180
+ }, {
181
+ default: u(() => [
182
+ d(s, {
183
+ activeKey: J.value,
184
+ "onUpdate:activeKey": t[1] || (t[1] = (a) => J.value = a),
185
+ class: "setting-collapse"
186
+ }, {
187
+ default: u(() => [
188
+ (r(!0), P(w, null, z(te.value, (a) => (r(), y(n, {
189
+ key: a.key,
190
+ class: me(a.className),
191
+ header: a.headerKey
192
+ }, {
193
+ default: u(() => [
194
+ (r(!0), P(w, null, z(a.props, (re, h) => (r(), P(w, null, [
195
+ A(h, re) ? (r(), y(ye(ee(h)), {
196
+ key: h,
197
+ designer: e.designer,
198
+ "selected-widget": o.value,
199
+ "option-model": l.value,
200
+ "onUpdate:optionModel": t[0] || (t[0] = (de) => l.value = de),
201
+ "event-handled": Y(h)
202
+ }, null, 40, ["designer", "selected-widget", "option-model", "event-handled"])) : U("", !0)
203
+ ], 64))), 256))
204
+ ]),
205
+ _: 2
206
+ }, 1032, ["class", "header"]))), 128))
207
+ ]),
208
+ _: 1
209
+ }, 8, ["activeKey"])
210
+ ]),
211
+ _: 1
212
+ }, 8, ["model"])) : (r(), y(b, {
213
+ key: 1,
214
+ description: _(c)("designer.hint.noSelectedWidgetHint")
215
+ }, null, 8, ["description"]))
216
+ ])
217
+ ]),
218
+ _: 1
219
+ }, 8, ["tab"]),
220
+ e.designer ? (r(), y(N, {
221
+ tab: _(c)("designer.hint.表单设置"),
222
+ key: "2"
223
+ }, {
224
+ default: u(() => [
225
+ K("div", $e, [
226
+ d(Ce, {
227
+ designer: e.designer,
228
+ "form-config": $.value
229
+ }, null, 8, ["designer", "form-config"])
230
+ ])
231
+ ]),
232
+ _: 1
233
+ }, 8, ["tab"])) : U("", !0),
234
+ d(N, {
235
+ tab: _(c)("designer.hint.表单api配置"),
236
+ key: "3"
237
+ }, {
238
+ default: u(() => [
239
+ K("div", He, [
240
+ d(Ee, {
241
+ designer: e.designer,
242
+ "form-config": $.value,
243
+ "onUpdate:formConfig": t[3] || (t[3] = (a) => $.value = a)
244
+ }, null, 8, ["designer", "form-config"])
245
+ ])
246
+ ]),
247
+ _: 1
248
+ }, 8, ["tab"])
249
+ ]),
250
+ _: 1
251
+ }, 8, ["activeKey"])
252
+ ]),
253
+ _: 1
254
+ })
255
+ ]),
256
+ _: 1
257
+ }),
258
+ d(_(_e), {
259
+ eventHeader: k.value,
260
+ ref_key: "CodeModalEditorRef",
261
+ ref: H,
262
+ title: F.value,
263
+ mode: E.value,
264
+ readonly: !1,
265
+ onSetCode: se
266
+ }, null, 8, ["eventHeader", "title", "mode"])
267
+ ], 64);
268
+ };
269
+ }
270
+ });
271
+ export {
272
+ Te as default
273
+ };
@@ -1,9 +1,10 @@
1
- import { defineComponent as _, ref as u, watch as C, resolveComponent as p, createElementBlock as L, openBlock as h, Fragment as k, createVNode as e, unref as o, withCtx as n, createTextVNode as f, toDisplayString as c } from "vue";
1
+ import { defineComponent as _, ref as u, watch as C, resolveComponent as p, createElementBlock as h, openBlock as L, Fragment as k, createVNode as e, unref as o, withCtx as n, createTextVNode as f, toDisplayString as c } from "vue";
2
2
  import { useI18n as w } from "../../../../utils/i18n.js";
3
3
  import { cloneDeep as x } from "lodash-es";
4
4
  import D from "../../../public/ActionButtonListDialog.vue.js";
5
5
  import { TpfModal as B } from "tmgc2-share";
6
- const U = /* @__PURE__ */ _({
6
+ const T = /* @__PURE__ */ _({
7
+ inheritAttrs: !1,
7
8
  name: "button-list-editor",
8
9
  __name: "button-list-editor",
9
10
  props: {
@@ -23,7 +24,7 @@ const U = /* @__PURE__ */ _({
23
24
  };
24
25
  return (M, s) => {
25
26
  const d = p("a-button"), v = p("a-form-item");
26
- return h(), L(k, null, [
27
+ return L(), h(k, null, [
27
28
  e(v, {
28
29
  label: o(i)("designer.setting.buttonList")
29
30
  }, {
@@ -72,5 +73,5 @@ const U = /* @__PURE__ */ _({
72
73
  }
73
74
  });
74
75
  export {
75
- U as default
76
+ T as default
76
77
  };
@@ -4,6 +4,7 @@ import { resolveComponent as c, createElementBlock as g, openBlock as v, Fragmen
4
4
  import w from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const h = {
6
6
  name: "data-table-customRow-editor",
7
+ inheritAttrs: !1,
7
8
  mixins: [b, f],
8
9
  props: {
9
10
  designer: Object,
@@ -1,12 +1,13 @@
1
1
  import g from "../../../../../utils/i18n.js";
2
2
  import E from "../../../../http-editor/index.vue.js";
3
- import u from "../../../../code-editor/code-modal-editor.vue.js";
4
- import { resolveComponent as o, createElementBlock as h, openBlock as a, Fragment as M, createVNode as d, createBlock as r, createCommentVNode as c, withCtx as i, createTextVNode as k, toDisplayString as C } from "vue";
3
+ import h from "../../../../code-editor/code-modal-editor.vue.js";
4
+ import { resolveComponent as o, createElementBlock as u, openBlock as a, Fragment as M, createVNode as d, createBlock as r, createCommentVNode as c, withCtx as i, createTextVNode as k, toDisplayString as C } from "vue";
5
5
  import D from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  const O = {
7
7
  name: "data-table-dsEnabled-editor",
8
8
  mixins: [g],
9
- components: { HttpEditor: E, CodeModalEditor: u },
9
+ inheritAttrs: !1,
10
+ components: { HttpEditor: E, CodeModalEditor: h },
10
11
  props: {
11
12
  designer: Object,
12
13
  selectedWidget: Object,
@@ -34,7 +35,7 @@ const O = {
34
35
  };
35
36
  function y(t, n, e, S, w, l) {
36
37
  const m = o("a-switch"), s = o("a-form-item"), p = o("a-button"), b = o("CodeModalEditor"), f = o("HttpEditor");
37
- return a(), h(M, null, [
38
+ return a(), u(M, null, [
38
39
  d(s, {
39
40
  label: t.i18nt("designer.setting.dsEnabled")
40
41
  }, {
@@ -5,6 +5,7 @@ import O from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
5
  const P = {
6
6
  name: "pagination-editor",
7
7
  mixins: [w],
8
+ inheritAttrs: !1,
8
9
  props: {
9
10
  designer: Object,
10
11
  selectedWidget: Object,