@kp-ui/lowcode 2.15.0-alpha.15 → 2.15.0-alpha.17
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/package.json +1 -1
- package/src/components/FormRender/useFormContext.js +97 -86
- package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue2.js +21 -20
- package/src/components/form-designer/form-widget/field-widget/button-widget.vue.js +2 -2
- package/src/components/form-designer/form-widget/field-widget/button-widget.vue2.js +11 -11
- package/src/components/form-designer/form-widget/field-widget/useField.js +12 -11
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +4 -4
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +49 -47
- package/src/components/form-designer/widget-panel/advanced/data-table.js +7 -19
- package/src/components/form-render/container-items/grid-sub-form-widget.vue.js +2 -2
- package/src/components/form-render/container-items/grid-sub-form-widget.vue2.js +103 -92
- package/src/lang/zh-CN.js +4 -3
- package/stats.html +1 -1
- package/styles/style.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, mergeModels as V, ref as b, useModel as W, createVNode as i, resolveComponent as n, computed as E, createElementBlock as B, openBlock as O, Fragment as j, unref as s, withCtx as r, createTextVNode as m, toDisplayString as p, createElementVNode as F, nextTick as k, isVNode as L } from "vue";
|
|
2
2
|
import { useI18n as $ } from "../../../../../utils/i18n.js";
|
|
3
3
|
import q from "../../../../code-editor/code-modal-editor.vue.js";
|
|
4
4
|
import { cloneDeep as K } from "lodash-es";
|
|
@@ -8,14 +8,14 @@ import { useDesigner as Q } from "../../../form-widget/useFormDesigner.js";
|
|
|
8
8
|
const X = {
|
|
9
9
|
class: "add-btn t-flex t-justify-center t-mt-[10px]"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function f(u) {
|
|
12
12
|
return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !L(u);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const oe = /* @__PURE__ */ N({
|
|
15
15
|
name: "tableColumns-editor",
|
|
16
16
|
inheritAttrs: !1,
|
|
17
17
|
__name: "data-table-tableColumns-editor",
|
|
18
|
-
props: /* @__PURE__ */
|
|
18
|
+
props: /* @__PURE__ */ V({
|
|
19
19
|
selectedWidget: {}
|
|
20
20
|
}, {
|
|
21
21
|
optionModel: {
|
|
@@ -27,12 +27,12 @@ const se = /* @__PURE__ */ V({
|
|
|
27
27
|
}),
|
|
28
28
|
emits: ["update:optionModel"],
|
|
29
29
|
setup(u, {
|
|
30
|
-
expose:
|
|
30
|
+
expose: _
|
|
31
31
|
}) {
|
|
32
32
|
Q();
|
|
33
33
|
const {
|
|
34
34
|
i18nt: l
|
|
35
|
-
} = $(), v = b(null), c = b(!1), h = b(), C =
|
|
35
|
+
} = $(), v = b(null), c = b(!1), h = b(), C = W(u, "optionModel"), y = [{
|
|
36
36
|
value: "left",
|
|
37
37
|
label: "left"
|
|
38
38
|
}, {
|
|
@@ -162,26 +162,28 @@ const se = /* @__PURE__ */ V({
|
|
|
162
162
|
}, {
|
|
163
163
|
field: "fixed",
|
|
164
164
|
title: l("designer.setting.fixedColumn"),
|
|
165
|
-
width:
|
|
165
|
+
width: 120,
|
|
166
166
|
slots: {
|
|
167
167
|
default({
|
|
168
168
|
row: e
|
|
169
169
|
}) {
|
|
170
|
-
let t,
|
|
171
|
-
return i(n("a-
|
|
170
|
+
let t, o, a;
|
|
171
|
+
return i(n("a-radio-group"), {
|
|
172
172
|
value: e.fixed,
|
|
173
|
-
"onUpdate:value": (d) => e.fixed = d
|
|
174
|
-
allowClear: !0,
|
|
175
|
-
style: "width: 100%"
|
|
173
|
+
"onUpdate:value": (d) => e.fixed = d
|
|
176
174
|
}, {
|
|
177
|
-
default: () => [i(n("a-
|
|
175
|
+
default: () => [i(n("a-radio-button"), {
|
|
178
176
|
value: "left"
|
|
179
|
-
},
|
|
177
|
+
}, f(t = l("designer.setting.fixedLeft")) ? t : {
|
|
180
178
|
default: () => [t]
|
|
181
|
-
}), i(n("a-
|
|
179
|
+
}), i(n("a-radio-button"), {
|
|
180
|
+
value: null
|
|
181
|
+
}, f(o = l("designer.setting.fixedNull")) ? o : {
|
|
182
|
+
default: () => [o]
|
|
183
|
+
}), i(n("a-radio-button"), {
|
|
182
184
|
value: "right"
|
|
183
|
-
},
|
|
184
|
-
default: () => [
|
|
185
|
+
}, f(a = l("designer.setting.fixedRight")) ? a : {
|
|
186
|
+
default: () => [a]
|
|
185
187
|
})]
|
|
186
188
|
});
|
|
187
189
|
}
|
|
@@ -197,7 +199,7 @@ const se = /* @__PURE__ */ V({
|
|
|
197
199
|
return i(n("a-select"), {
|
|
198
200
|
value: e.align,
|
|
199
201
|
"onUpdate:value": (t) => e.align = t,
|
|
200
|
-
options:
|
|
202
|
+
options: y,
|
|
201
203
|
style: "width: 100%"
|
|
202
204
|
}, null);
|
|
203
205
|
}
|
|
@@ -213,7 +215,7 @@ const se = /* @__PURE__ */ V({
|
|
|
213
215
|
row: e,
|
|
214
216
|
rowIndex: t
|
|
215
217
|
}) {
|
|
216
|
-
let
|
|
218
|
+
let o;
|
|
217
219
|
return i(n("a-button"), {
|
|
218
220
|
class: [{
|
|
219
221
|
"button-text-highlight": !!e.customRender
|
|
@@ -221,8 +223,8 @@ const se = /* @__PURE__ */ V({
|
|
|
221
223
|
onClick: () => M(e),
|
|
222
224
|
size: "small",
|
|
223
225
|
shape: "round"
|
|
224
|
-
},
|
|
225
|
-
default: () => [
|
|
226
|
+
}, f(o = l("designer.setting.edit")) ? o : {
|
|
227
|
+
default: () => [o]
|
|
226
228
|
});
|
|
227
229
|
}
|
|
228
230
|
}
|
|
@@ -241,12 +243,12 @@ const se = /* @__PURE__ */ V({
|
|
|
241
243
|
type: "link",
|
|
242
244
|
onClick: () => S(e),
|
|
243
245
|
size: "small"
|
|
244
|
-
},
|
|
246
|
+
}, f(t = l("designer.setting.delete")) ? t : {
|
|
245
247
|
default: () => [t]
|
|
246
248
|
});
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
|
-
}], T =
|
|
251
|
+
}], T = E(() => ({
|
|
250
252
|
columnConfig: {
|
|
251
253
|
resizable: !0
|
|
252
254
|
},
|
|
@@ -275,7 +277,7 @@ const se = /* @__PURE__ */ V({
|
|
|
275
277
|
}, U = (e) => {
|
|
276
278
|
h.value && (h.value.customRender = e);
|
|
277
279
|
}, D = async () => {
|
|
278
|
-
var t,
|
|
280
|
+
var t, o, a, d;
|
|
279
281
|
const e = {
|
|
280
282
|
isAutoWidth: !0,
|
|
281
283
|
columnId: (/* @__PURE__ */ new Date()).getTime(),
|
|
@@ -291,7 +293,7 @@ const se = /* @__PURE__ */ V({
|
|
|
291
293
|
ellipsis: !1,
|
|
292
294
|
showSorterTooltip: !1
|
|
293
295
|
};
|
|
294
|
-
await ((t = g.value) == null ? void 0 : t.insertAt(e, -1)), await k(), console.log((
|
|
296
|
+
await ((t = g.value) == null ? void 0 : t.insertAt(e, -1)), await k(), console.log((o = g.value) == null ? void 0 : o.getRowById(e.columnId)), (d = g.value) == null || d.scrollToRow((a = g.value) == null ? void 0 : a.getRowById(e.columnId));
|
|
295
297
|
}, S = (e) => {
|
|
296
298
|
var t;
|
|
297
299
|
if (w().length === 1)
|
|
@@ -304,52 +306,52 @@ const se = /* @__PURE__ */ V({
|
|
|
304
306
|
I(K(C.value.tableColumns));
|
|
305
307
|
}, 100);
|
|
306
308
|
};
|
|
307
|
-
return
|
|
309
|
+
return _({
|
|
308
310
|
openSetting: x
|
|
309
311
|
}), (e, t) => {
|
|
310
|
-
const
|
|
311
|
-
return O(), B(j, null, [i(
|
|
312
|
-
label:
|
|
312
|
+
const o = n("a-button"), a = n("a-form-item");
|
|
313
|
+
return O(), B(j, null, [i(a, {
|
|
314
|
+
label: s(l)("designer.setting.tableColEdit")
|
|
313
315
|
}, {
|
|
314
|
-
default:
|
|
316
|
+
default: r(() => [i(o, {
|
|
315
317
|
type: "primary",
|
|
316
318
|
shape: "round",
|
|
317
319
|
onClick: x
|
|
318
320
|
}, {
|
|
319
|
-
default:
|
|
321
|
+
default: r(() => [m(p(s(l)("designer.setting.editAction")), 1)]),
|
|
320
322
|
_: 1
|
|
321
323
|
})]),
|
|
322
324
|
_: 1
|
|
323
|
-
}, 8, ["label"]), i(
|
|
324
|
-
title:
|
|
325
|
+
}, 8, ["label"]), i(s(G), {
|
|
326
|
+
title: s(l)("designer.setting.tableColEdit"),
|
|
325
327
|
visible: c.value,
|
|
326
|
-
"onUpdate:visible": t[2] || (t[2] = (
|
|
328
|
+
"onUpdate:visible": t[2] || (t[2] = (d) => c.value = d),
|
|
327
329
|
width: "1280px",
|
|
328
330
|
height: "70vh"
|
|
329
331
|
}, {
|
|
330
|
-
footerRight:
|
|
332
|
+
footerRight: r(() => [i(o, {
|
|
331
333
|
size: "default",
|
|
332
|
-
onClick: t[1] || (t[1] = (
|
|
334
|
+
onClick: t[1] || (t[1] = (d) => c.value = !1)
|
|
333
335
|
}, {
|
|
334
|
-
default:
|
|
336
|
+
default: r(() => [m(p(s(l)("designer.hint.cancel")), 1)]),
|
|
335
337
|
_: 1
|
|
336
|
-
}), i(
|
|
338
|
+
}), i(o, {
|
|
337
339
|
size: "default",
|
|
338
340
|
type: "primary",
|
|
339
341
|
onClick: A
|
|
340
342
|
}, {
|
|
341
|
-
default:
|
|
343
|
+
default: r(() => [m(p(s(l)("designer.hint.confirm")), 1)]),
|
|
342
344
|
_: 1
|
|
343
345
|
})]),
|
|
344
|
-
default:
|
|
345
|
-
onRegister:
|
|
346
|
-
}, null, 8, ["onRegister"]), F("div", X, [i(
|
|
347
|
-
title:
|
|
346
|
+
default: r(() => [i(s(H), {
|
|
347
|
+
onRegister: s(z)
|
|
348
|
+
}, null, 8, ["onRegister"]), F("div", X, [i(o, {
|
|
349
|
+
title: s(l)("designer.setting.addTableColumn"),
|
|
348
350
|
type: "primary",
|
|
349
351
|
size: "medium",
|
|
350
|
-
onClick: t[0] || (t[0] = (
|
|
352
|
+
onClick: t[0] || (t[0] = (d) => D())
|
|
351
353
|
}, {
|
|
352
|
-
default:
|
|
354
|
+
default: r(() => [m(p(s(l)("designer.setting.addTableColumn")), 1)]),
|
|
353
355
|
_: 1
|
|
354
356
|
}, 8, ["title"])])]),
|
|
355
357
|
_: 1
|
|
@@ -357,12 +359,12 @@ const se = /* @__PURE__ */ V({
|
|
|
357
359
|
onSave: U,
|
|
358
360
|
ref_key: "CodeModalEditorRef",
|
|
359
361
|
ref: v,
|
|
360
|
-
title:
|
|
362
|
+
title: s(l)("designer.setting.renderFunction"),
|
|
361
363
|
"fn-params": "scope"
|
|
362
364
|
}, null, 8, ["title"])], 64);
|
|
363
365
|
};
|
|
364
366
|
}
|
|
365
367
|
});
|
|
366
368
|
export {
|
|
367
|
-
|
|
369
|
+
oe as default
|
|
368
370
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getUuidKey as
|
|
2
|
-
const l = (
|
|
3
|
-
key:
|
|
1
|
+
import { getUuidKey as a } from "@kp-ui/tool";
|
|
2
|
+
const l = (t = {}) => ({
|
|
3
|
+
key: a(),
|
|
4
4
|
type: "data-table",
|
|
5
5
|
category: "container",
|
|
6
6
|
icon: "data-table",
|
|
@@ -57,23 +57,11 @@ const l = (a = {}) => ({
|
|
|
57
57
|
},
|
|
58
58
|
dataReqHandlerCode: "",
|
|
59
59
|
dataHandlerCode: "",
|
|
60
|
-
rowKey: "
|
|
60
|
+
rowKey: "_id",
|
|
61
61
|
childrenKey: "children",
|
|
62
|
-
dataSource: [
|
|
63
|
-
{
|
|
64
|
-
date: "2016-05-02",
|
|
65
|
-
date2: "2016-05-02 23:12:12",
|
|
66
|
-
date3: "2016-05-02 9:11:12",
|
|
67
|
-
name: "小二",
|
|
68
|
-
add: "上海市普陀区金沙江路 1518 弄",
|
|
69
|
-
age: 100
|
|
70
|
-
}
|
|
71
|
-
],
|
|
62
|
+
dataSource: [],
|
|
72
63
|
onCreated: "",
|
|
73
64
|
onMounted: "",
|
|
74
|
-
// onHideOperationButton: '',
|
|
75
|
-
// onDisableOperationButton: '',
|
|
76
|
-
// onOperationButtonClick: '',
|
|
77
65
|
customRow: {
|
|
78
66
|
onClick: "",
|
|
79
67
|
onDblclick: "",
|
|
@@ -97,7 +85,7 @@ const l = (a = {}) => ({
|
|
|
97
85
|
hasRowSelection: !1,
|
|
98
86
|
preserveSelectedRowKeys: !1,
|
|
99
87
|
fixed: !0,
|
|
100
|
-
onChange: "console.log(
|
|
88
|
+
onChange: "console.log(selectedRowKeys, selectedRows)",
|
|
101
89
|
columnWidth: 32,
|
|
102
90
|
getCheckboxProps: (e) => ({
|
|
103
91
|
disabled: e.name === "Disabled User",
|
|
@@ -105,7 +93,7 @@ const l = (a = {}) => ({
|
|
|
105
93
|
name: e.name
|
|
106
94
|
})
|
|
107
95
|
},
|
|
108
|
-
...
|
|
96
|
+
...t
|
|
109
97
|
}
|
|
110
98
|
});
|
|
111
99
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./grid-sub-form-widget.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4483eccd"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
d as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as j, provide as
|
|
2
|
-
import { traverseFieldWidgetsOfContainer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { TpfConfirm as
|
|
1
|
+
import { defineComponent as j, provide as y, ref as w, onMounted as q, resolveComponent as J, createBlock as A, openBlock as v, withCtx as f, withDirectives as L, createElementVNode as c, createElementBlock as W, Fragment as K, renderList as Q, toDisplayString as B, createVNode as u, unref as s, vShow as E, createCommentVNode as U, createTextVNode as X, nextTick as R } from "vue";
|
|
2
|
+
import { traverseFieldWidgetsOfContainer as Y, generateId as S, deepClone as Z } from "../../../utils/util.js";
|
|
3
|
+
import ee from "./container-wrapper.vue.js";
|
|
4
|
+
import oe from "../RenderWigetList.vue.js";
|
|
5
|
+
import { TpfConfirm as te } from "../../../hooks/TpfConfirm.js";
|
|
6
6
|
import { SvgIcon as _ } from "tmgc2-share";
|
|
7
|
-
import { ComponentNameEnum as
|
|
7
|
+
import { ComponentNameEnum as ne, ContainerTypeEnum as ie } from "../../../constants/WidgetTypeEnum.js";
|
|
8
8
|
import { useI18n as ae } from "../../../utils/i18n.js";
|
|
9
|
-
import { useField as
|
|
10
|
-
const
|
|
11
|
-
name:
|
|
12
|
-
componentName:
|
|
9
|
+
import { useField as se } from "../../form-designer/form-widget/field-widget/useField.js";
|
|
10
|
+
const de = { class: "sub-form-container" }, le = { class: "row-no-column" }, re = { class: "row-number-span" }, ce = { class: "grid-sub-form-data-row" }, ue = { class: "sub-form-action-column hide-label" }, me = { class: "action-button-column" }, pe = { class: "header-row" }, _e = /* @__PURE__ */ j({
|
|
11
|
+
name: ie.GridSubFormWidget,
|
|
12
|
+
componentName: ne.ContainerWidget,
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "grid-sub-form-widget",
|
|
15
15
|
props: {
|
|
@@ -21,45 +21,56 @@ const le = { class: "sub-form-container" }, ce = { class: "row-no-column" }, re
|
|
|
21
21
|
subFormRowIndex: {},
|
|
22
22
|
subFormRowId: {}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
|
|
26
|
-
const { i18nt: d } = ae(), t =
|
|
27
|
-
q(() => x.options.actionColumnPosition === "right" ? "right-action-column" : "left-action-column");
|
|
28
|
-
const C = () => {
|
|
24
|
+
setup(N, { expose: T }) {
|
|
25
|
+
y("isSubFormField", !0), y("getSubFormName", () => t.widget.options.name);
|
|
26
|
+
const { i18nt: d } = ae(), t = N, r = w([]), m = w([]), g = w(!1), F = w(!1), p = w(!1), { formModel: l, isReadMode: D, handleHidden: x, executeFunction: b, defineExposed: V } = se(t), k = () => {
|
|
29
27
|
m.value = [];
|
|
30
28
|
const e = (o) => {
|
|
31
29
|
m.value.push(o);
|
|
32
30
|
};
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
31
|
+
Y(t.widget, e);
|
|
32
|
+
}, M = (e = !1) => {
|
|
33
|
+
r.value = [];
|
|
36
34
|
const o = l.value[t.widget.options.name];
|
|
37
35
|
o && o.length > 0 && (o.forEach(() => {
|
|
38
|
-
|
|
36
|
+
r.value.push("id" + S());
|
|
39
37
|
}), e && setTimeout(() => {
|
|
40
38
|
h(o);
|
|
41
39
|
}, 800));
|
|
42
40
|
}, h = (e) => {
|
|
43
|
-
t.widget.options.onSubFormRowChange &&
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
t.widget.options.onSubFormRowChange && b({
|
|
42
|
+
functionBody: t.widget.options.onSubFormRowChange,
|
|
43
|
+
keys: ["subFormData"],
|
|
44
|
+
params: { subFormData: e }
|
|
45
|
+
});
|
|
46
|
+
}, I = (e, o) => {
|
|
47
|
+
b({
|
|
48
|
+
functionBody: t.widget.options.onSubFormRowAdd,
|
|
49
|
+
params: {
|
|
50
|
+
subFormData: e,
|
|
51
|
+
newRowId: o
|
|
52
|
+
},
|
|
53
|
+
keys: ["subFormData", "newRowId"]
|
|
54
|
+
});
|
|
50
55
|
}, $ = (e, o) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
b({
|
|
57
|
+
functionBody: t.widget.options.onSubFormRowInsert,
|
|
58
|
+
params: {
|
|
59
|
+
subFormData: e,
|
|
60
|
+
newRowId: o
|
|
61
|
+
},
|
|
62
|
+
keys: ["subFormData", "newRowId"]
|
|
63
|
+
});
|
|
56
64
|
}, H = (e, o) => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
b({
|
|
66
|
+
functionBody: t.widget.options.onSubFormRowDelete,
|
|
67
|
+
params: {
|
|
68
|
+
subFormData: e,
|
|
69
|
+
deletedDataRow: o
|
|
70
|
+
},
|
|
71
|
+
keys: ["subFormData", "deletedDataRow"]
|
|
72
|
+
});
|
|
73
|
+
}, C = () => {
|
|
63
74
|
const e = {};
|
|
64
75
|
m.value.forEach((i) => {
|
|
65
76
|
i != null && i.formItemFlag && (e[i.options.name] = i.options.defaultValue);
|
|
@@ -67,125 +78,125 @@ const le = { class: "sub-form-container" }, ce = { class: "row-no-column" }, re
|
|
|
67
78
|
const o = l.value[t.widget.options.name] || [];
|
|
68
79
|
o.push(e), l.value[t.widget.options.name] || (l.value[t.widget.options.name] = o);
|
|
69
80
|
const n = "id" + S();
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
r.value.push(n), R(() => {
|
|
82
|
+
I(o, n), h(o);
|
|
72
83
|
});
|
|
73
84
|
}, O = (e) => {
|
|
74
85
|
const o = {};
|
|
75
|
-
m.value.forEach((
|
|
76
|
-
|
|
86
|
+
m.value.forEach((a) => {
|
|
87
|
+
a != null && a.formItemFlag && (o[a.options.name] = a.options.defaultValue);
|
|
77
88
|
});
|
|
78
89
|
const n = l.value[t.widget.options.name] || [];
|
|
79
90
|
n.splice(e, 0, o), l.value[t.widget.options.name] || (l.value[t.widget.options.name] = n);
|
|
80
91
|
const i = "id" + S();
|
|
81
|
-
|
|
92
|
+
r.value.splice(e, 0, i), R(() => {
|
|
82
93
|
$(n, i), h(n);
|
|
83
94
|
});
|
|
84
|
-
},
|
|
85
|
-
|
|
95
|
+
}, z = (e) => {
|
|
96
|
+
te({
|
|
86
97
|
type: "confirm",
|
|
87
98
|
content: d("render.hint.deleteSubFormRow") + "?",
|
|
88
99
|
title: d("render.hint.prompt"),
|
|
89
100
|
okText: d("render.hint.confirm"),
|
|
90
101
|
cancelText: d("render.hint.cancel")
|
|
91
102
|
}).then(() => {
|
|
92
|
-
const o = l.value[t.widget.options.name] || [], n =
|
|
93
|
-
o.splice(e, 1),
|
|
103
|
+
const o = l.value[t.widget.options.name] || [], n = Z(o[e]);
|
|
104
|
+
o.splice(e, 1), r.value.splice(e, 1), R(() => {
|
|
94
105
|
H(o, n), h(o);
|
|
95
106
|
});
|
|
96
107
|
}).catch(() => {
|
|
97
108
|
});
|
|
98
|
-
},
|
|
99
|
-
t.widget.options.showBlankRow &&
|
|
109
|
+
}, G = () => {
|
|
110
|
+
t.widget.options.showBlankRow && r.value.length === 0 && (m.value.length === 0 && k(), C());
|
|
100
111
|
};
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
}),
|
|
104
|
-
...
|
|
105
|
-
insertDisabled:
|
|
106
|
-
deleteDisabled:
|
|
107
|
-
actionDisabled:
|
|
112
|
+
return q(() => {
|
|
113
|
+
k(), M(!0), G();
|
|
114
|
+
}), T({
|
|
115
|
+
...V,
|
|
116
|
+
insertDisabled: g,
|
|
117
|
+
deleteDisabled: F,
|
|
118
|
+
actionDisabled: p,
|
|
108
119
|
setInsertDisabled: (e) => {
|
|
109
|
-
|
|
120
|
+
g.value = e;
|
|
110
121
|
},
|
|
111
122
|
setDeleteDisabled: (e) => {
|
|
112
|
-
|
|
123
|
+
F.value = e;
|
|
113
124
|
},
|
|
114
125
|
setActionDisabled: (e) => {
|
|
115
|
-
|
|
126
|
+
p.value = e;
|
|
116
127
|
}
|
|
117
128
|
}), (e, o) => {
|
|
118
|
-
const n =
|
|
119
|
-
return
|
|
120
|
-
default:
|
|
121
|
-
|
|
122
|
-
(
|
|
129
|
+
const n = J("a-button");
|
|
130
|
+
return v(), A(ee, { widget: e.widget }, {
|
|
131
|
+
default: f(() => [
|
|
132
|
+
L(c("div", de, [
|
|
133
|
+
(v(!0), W(K, null, Q(r.value, (i, a) => (v(), W("div", {
|
|
123
134
|
class: "sub-form-row",
|
|
124
135
|
key: i
|
|
125
136
|
}, [
|
|
126
|
-
|
|
127
|
-
|
|
137
|
+
c("div", le, [
|
|
138
|
+
c("span", re, "#" + B(a + 1), 1)
|
|
128
139
|
]),
|
|
129
|
-
|
|
130
|
-
u(
|
|
140
|
+
c("div", ce, [
|
|
141
|
+
u(oe, {
|
|
131
142
|
widgetList: e.widget.widgetList || [],
|
|
132
143
|
parentWidget: e.widget,
|
|
133
|
-
subFormRowIndex:
|
|
144
|
+
subFormRowIndex: a,
|
|
134
145
|
subFormRowId: i
|
|
135
146
|
}, null, 8, ["widgetList", "parentWidget", "subFormRowIndex", "subFormRowId"])
|
|
136
147
|
]),
|
|
137
|
-
|
|
138
|
-
|
|
148
|
+
c("div", ue, [
|
|
149
|
+
L(c("div", me, [
|
|
139
150
|
u(n, {
|
|
140
151
|
type: "link",
|
|
141
|
-
title:
|
|
142
|
-
disabled:
|
|
143
|
-
onClick: (
|
|
152
|
+
title: s(d)("render.hint.insertSubFormRow"),
|
|
153
|
+
disabled: p.value || g.value,
|
|
154
|
+
onClick: (P) => O(a)
|
|
144
155
|
}, {
|
|
145
|
-
icon:
|
|
146
|
-
u(
|
|
156
|
+
icon: f(() => [
|
|
157
|
+
u(s(_), { "icon-class": "icon-el-plus" })
|
|
147
158
|
]),
|
|
148
159
|
_: 2
|
|
149
160
|
}, 1032, ["title", "disabled", "onClick"]),
|
|
150
161
|
u(n, {
|
|
151
162
|
type: "link",
|
|
152
|
-
title:
|
|
153
|
-
disabled:
|
|
154
|
-
onClick: (
|
|
163
|
+
title: s(d)("render.hint.deleteSubFormRow"),
|
|
164
|
+
disabled: p.value || F.value,
|
|
165
|
+
onClick: (P) => z(a)
|
|
155
166
|
}, {
|
|
156
|
-
icon:
|
|
157
|
-
u(
|
|
167
|
+
icon: f(() => [
|
|
168
|
+
u(s(_), { "icon-class": "icon-el-delete" })
|
|
158
169
|
]),
|
|
159
170
|
_: 2
|
|
160
171
|
}, 1032, ["title", "disabled", "onClick"])
|
|
161
172
|
], 512), [
|
|
162
|
-
[
|
|
173
|
+
[E, !s(D)]
|
|
163
174
|
])
|
|
164
175
|
])
|
|
165
176
|
]))), 128)),
|
|
166
|
-
|
|
167
|
-
|
|
177
|
+
c("div", pe, [
|
|
178
|
+
s(D) ? U("", !0) : (v(), A(n, {
|
|
168
179
|
key: 0,
|
|
169
180
|
block: "",
|
|
170
|
-
disabled:
|
|
181
|
+
disabled: p.value || g.value,
|
|
171
182
|
shape: "round",
|
|
172
183
|
type: "dashed",
|
|
173
184
|
size: "small",
|
|
174
185
|
class: "action-button",
|
|
175
|
-
onClick:
|
|
176
|
-
title:
|
|
186
|
+
onClick: C,
|
|
187
|
+
title: s(d)("render.hint.subFormAddActionHint")
|
|
177
188
|
}, {
|
|
178
|
-
icon:
|
|
179
|
-
u(
|
|
189
|
+
icon: f(() => [
|
|
190
|
+
u(s(_), { "icon-class": "icon-el-plus" })
|
|
180
191
|
]),
|
|
181
|
-
default:
|
|
182
|
-
|
|
192
|
+
default: f(() => [
|
|
193
|
+
X(" " + B(s(d)("render.hint.subFormAddAction")), 1)
|
|
183
194
|
]),
|
|
184
195
|
_: 1
|
|
185
196
|
}, 8, ["disabled", "title"]))
|
|
186
197
|
])
|
|
187
198
|
], 512), [
|
|
188
|
-
[
|
|
199
|
+
[E, !s(x)]
|
|
189
200
|
])
|
|
190
201
|
]),
|
|
191
202
|
_: 1
|
|
@@ -194,5 +205,5 @@ const le = { class: "sub-form-container" }, ce = { class: "row-no-column" }, re
|
|
|
194
205
|
}
|
|
195
206
|
});
|
|
196
207
|
export {
|
|
197
|
-
|
|
208
|
+
_e as default
|
|
198
209
|
};
|
package/src/lang/zh-CN.js
CHANGED
|
@@ -203,7 +203,9 @@ const e = {
|
|
|
203
203
|
showSizeChanger: "是否展示 pageSize 切换器",
|
|
204
204
|
position: "分页器位置",
|
|
205
205
|
hasRowSelection: "启用左侧勾选设置",
|
|
206
|
-
fixedLeft: "
|
|
206
|
+
fixedLeft: "左",
|
|
207
|
+
fixedRight: "右",
|
|
208
|
+
fixedNull: "中",
|
|
207
209
|
preserveSelectedRowKeys: "当数据被删除时仍然保留选项的 key",
|
|
208
210
|
customColumnWidth: "自定义列表选择框宽度",
|
|
209
211
|
customColumnTitle: "自定义列表选择框标题",
|
|
@@ -303,8 +305,6 @@ const e = {
|
|
|
303
305
|
addColumn: "增加栅格",
|
|
304
306
|
responsive: "响应式布局",
|
|
305
307
|
customRender: "自定义渲染",
|
|
306
|
-
fixed: "固定位置",
|
|
307
|
-
fixedRight: "固定在右边",
|
|
308
308
|
labelBefore: "标签前面",
|
|
309
309
|
labelAfter: "标签后面",
|
|
310
310
|
tabPaneSetting: "选项卡设置",
|
|
@@ -418,6 +418,7 @@ const e = {
|
|
|
418
418
|
columnWidth: "列宽(px)",
|
|
419
419
|
visibleColumn: "是否显示",
|
|
420
420
|
sortableColumn: "是否排序",
|
|
421
|
+
fixed: "固定位置",
|
|
421
422
|
fixedColumn: "固定方式",
|
|
422
423
|
autoHeight: "自动高度",
|
|
423
424
|
alignTypeOfColumn: "对齐方式",
|