@kp-ui/lowcode 2.14.0-beta.3 → 2.14.0-beta.5
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/form-designer/setting-panel/index.vue.js +2 -2
- package/src/components/form-designer/setting-panel/index.vue2.js +134 -134
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-colorRow-editor.vue2.js +8 -7
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-dsEnabled-editor.vue.js +23 -22
- package/src/components/form-designer/setting-panel/property-editor/container-vf-dialog/line-height-editor.vue2.js +7 -6
- package/src/components/form-designer/setting-panel/propertyRegister.js +4 -10
- package/src/components/form-designer/widget-panel/advanced/data-table.js +1 -1
- package/stats.html +1 -1
- package/styles/style.css +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import t from "./index.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-ad7ebeb4"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
p as default
|
|
8
8
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { TpfCodeEditor as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { get as
|
|
8
|
-
import { useEmitter as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as ie, mergeModels as re, useModel as B, inject as de, ref as i, provide as I, computed as M, watchEffect as ue, watch as L, onBeforeMount as ce, resolveComponent as f, createElementBlock as T, openBlock as g, Fragment as V, createVNode as r, withCtx as d, createBlock as C, createCommentVNode as ve, unref as h, createElementVNode as K, withModifiers as pe, renderList as U, normalizeClass as fe, resolveDynamicComponent as ge } from "vue";
|
|
2
|
+
import $ from "./property-editor/index.js";
|
|
3
|
+
import { TpfCodeEditor as me } from "tmgc2-share";
|
|
4
|
+
import ye from "./form-setting.vue.js";
|
|
5
|
+
import Ee from "./form-crud-setting.vue.js";
|
|
6
|
+
import _e, { PROPERTY_TYPE as R } from "./propertyRegister.js";
|
|
7
|
+
import { get as x } from "../../../utils/smart-vue-i18n/utils.js";
|
|
8
|
+
import { useEmitter as be } from "../../../utils/useEmitter.js";
|
|
9
|
+
import { useI18n as Ce } from "../../../utils/i18n.js";
|
|
10
|
+
const he = { class: "setting-scrollbar" }, Pe = { class: "setting-scrollbar" }, ke = { class: "ds-setting-scrollbar" }, Ve = /* @__PURE__ */ ie({
|
|
11
11
|
name: "SettingPanel",
|
|
12
12
|
componentName: "SettingPanel",
|
|
13
13
|
__name: "index",
|
|
14
|
-
props: /* @__PURE__ */
|
|
14
|
+
props: /* @__PURE__ */ re({
|
|
15
15
|
designer: { default: () => {
|
|
16
16
|
} },
|
|
17
17
|
globalDsv: {}
|
|
@@ -26,10 +26,12 @@ const He = { class: "setting-scrollbar" }, Se = { class: "setting-scrollbar" },
|
|
|
26
26
|
"selected-widgetModifiers": {}
|
|
27
27
|
}),
|
|
28
28
|
emits: ["update:form-config", "update:selected-widget"],
|
|
29
|
-
setup(
|
|
30
|
-
const { i18nt:
|
|
31
|
-
I("isSubFormChildWidget", () =>
|
|
32
|
-
const S =
|
|
29
|
+
setup(j, { expose: z }) {
|
|
30
|
+
const { i18nt: u } = Ce(), { COMMON_PROPERTIES: Y, ADVANCED_PROPERTIES: G, EVENT_PROPERTIES: q } = _e, m = j, H = B(j, "form-config"), P = be(), Q = m.globalDsv || {}, X = de("getDesignerConfig"), D = i(!1);
|
|
31
|
+
I("isSubFormChildWidget", () => D.value), I("getGlobalDsv", () => Q);
|
|
32
|
+
const S = i(), W = i(""), k = i("javascript"), w = i("2"), A = i(["1", "2", "3"]), c = i(""), E = i(""), N = i(""), o = B(j, "selected-widget");
|
|
33
|
+
M(() => X());
|
|
34
|
+
const s = M({
|
|
33
35
|
get() {
|
|
34
36
|
var e;
|
|
35
37
|
return ((e = o.value) == null ? void 0 : e.options) || {};
|
|
@@ -37,170 +39,168 @@ const He = { class: "setting-scrollbar" }, Se = { class: "setting-scrollbar" },
|
|
|
37
39
|
set(e) {
|
|
38
40
|
o.value.options = e;
|
|
39
41
|
}
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const g = o.value.type + "-" + e;
|
|
45
|
-
if (he(g))
|
|
46
|
-
return !1;
|
|
42
|
+
}), Z = (e) => !!s.value[e] && s.value[e].length > 0, F = M(
|
|
43
|
+
() => {
|
|
44
|
+
var e;
|
|
45
|
+
return Object.keys(((e = o.value) == null ? void 0 : e.options) || {});
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
), O = (e) => {
|
|
48
|
+
const t = o.value.type;
|
|
49
|
+
let n = {};
|
|
50
|
+
return Object.entries(e).map(([l, v]) => {
|
|
51
|
+
for (let p = 0; p < F.value.length; p++) {
|
|
52
|
+
const _ = F.value[p];
|
|
53
|
+
if (l === _) {
|
|
54
|
+
const y = v, b = `${t}-${y}`;
|
|
55
|
+
$[b] ? n[b] = $[b] : $[y] && (n[y] = $[y]);
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
const e =
|
|
63
|
-
return [
|
|
59
|
+
}), n;
|
|
60
|
+
}, ee = M(() => {
|
|
61
|
+
const e = O(Y), t = O(G), n = O(q);
|
|
62
|
+
return console.log(e, t, n), [
|
|
64
63
|
{
|
|
65
64
|
key: "1",
|
|
66
|
-
headerKey:
|
|
67
|
-
props:
|
|
65
|
+
headerKey: u("designer.setting.常见属性"),
|
|
66
|
+
props: e,
|
|
67
|
+
type: R.Common,
|
|
68
68
|
className: "",
|
|
69
|
-
visible: e,
|
|
69
|
+
visible: Object.keys(e).length > 0,
|
|
70
70
|
useVModel: !0,
|
|
71
71
|
isEvent: !1
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
key: "2",
|
|
75
|
-
headerKey:
|
|
76
|
-
props:
|
|
75
|
+
headerKey: u("designer.setting.高级属性"),
|
|
76
|
+
props: t,
|
|
77
|
+
type: R.Advanced,
|
|
77
78
|
className: "",
|
|
78
|
-
visible: t,
|
|
79
|
+
visible: Object.keys(t).length > 0,
|
|
79
80
|
useVModel: !1,
|
|
80
81
|
isEvent: !1
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
key: "3",
|
|
84
|
-
headerKey:
|
|
85
|
-
props:
|
|
85
|
+
headerKey: u("designer.setting.事件属性"),
|
|
86
|
+
props: n,
|
|
87
|
+
type: R.Event,
|
|
86
88
|
className: "eventPanel",
|
|
87
|
-
visible: n,
|
|
89
|
+
visible: Object.keys(n).length > 0,
|
|
88
90
|
useVModel: !1,
|
|
89
91
|
isEvent: !0
|
|
90
92
|
}
|
|
91
|
-
].filter((
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
93
|
+
].filter((l) => l.visible);
|
|
94
|
+
}), te = () => {
|
|
95
|
+
P.off$("onChangeEventHandler"), P.on$("onChangeEventHandler", ({ title: e, attr: t, eventParams: n = [], mode: l }) => {
|
|
96
|
+
W.value = e || u("designer.setting.editWidgetEventHandler");
|
|
97
|
+
const v = l === "json";
|
|
98
|
+
E.value = t, k.value = l;
|
|
99
|
+
const p = `${s.value.name}.${t}`;
|
|
100
|
+
N.value = v ? `${p}{` : `${p}(${n.join(", ")}) {`, c.value = x(o.value.options, t) || "", l === "json" && (c.value = JSON.stringify(s.value.menuList, null, " ")), t === "onValidate" && !s.value.onValidate && (c.value = ` /* sample code */
|
|
99
101
|
/*
|
|
100
102
|
if ((value > 100) || (value < 0)) {
|
|
101
103
|
return Promise.reject('error message') //fail
|
|
102
104
|
} else {
|
|
103
105
|
return Promise.resolve(); //pass
|
|
104
106
|
}
|
|
105
|
-
*/`), S.value.open(
|
|
107
|
+
*/`), S.value.open(c.value);
|
|
106
108
|
});
|
|
107
|
-
},
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
109
|
+
}, ne = (e, t, n = "javascript") => {
|
|
110
|
+
const l = n === "json";
|
|
111
|
+
E.value = e, k.value = n;
|
|
112
|
+
const v = `${s.value.name}.${e}`;
|
|
113
|
+
N.value = l ? `${v}{` : `${v}(${t.join(", ")}) {`, c.value = x(o.value.options, e) || "", n === "json" && (c.value = JSON.stringify(s.value.menuList, null, " ")), e === "onValidate" && !s.value.onValidate && (c.value = ` /* sample code */
|
|
112
114
|
/*
|
|
113
115
|
if ((value > 100) || (value < 0)) {
|
|
114
116
|
return Promise.reject('error message') //fail
|
|
115
117
|
} else {
|
|
116
118
|
return Promise.resolve(); //pass
|
|
117
119
|
}
|
|
118
|
-
*/`), S.value.open(
|
|
119
|
-
},
|
|
120
|
-
if (
|
|
121
|
-
const [t, n] =
|
|
120
|
+
*/`), S.value.open(c.value);
|
|
121
|
+
}, oe = (e) => {
|
|
122
|
+
if (k.value === "json" && (e = JSON.parse(e)), E.value.includes(".")) {
|
|
123
|
+
const [t, n] = E.value.split(".");
|
|
122
124
|
o.value.options[t][n] = e;
|
|
123
125
|
} else
|
|
124
|
-
o.value.options[
|
|
126
|
+
o.value.options[E.value] = e;
|
|
125
127
|
};
|
|
126
|
-
return
|
|
127
|
-
o.value && (
|
|
128
|
+
return ue(() => {
|
|
129
|
+
o.value && (w.value = "1");
|
|
128
130
|
}), L(
|
|
129
131
|
() => {
|
|
130
132
|
var e;
|
|
131
133
|
return (e = o.value) == null ? void 0 : e.options;
|
|
132
134
|
},
|
|
133
135
|
() => {
|
|
134
|
-
|
|
136
|
+
m.designer.saveCurrentHistoryStep();
|
|
135
137
|
},
|
|
136
138
|
{ deep: !0 }
|
|
137
139
|
), L(
|
|
138
|
-
() =>
|
|
140
|
+
() => m.formConfig,
|
|
139
141
|
() => {
|
|
140
|
-
|
|
142
|
+
m.designer.saveCurrentHistoryStep();
|
|
141
143
|
},
|
|
142
144
|
{ deep: !0 }
|
|
143
|
-
),
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}),
|
|
147
|
-
|
|
148
|
-
}),
|
|
149
|
-
|
|
145
|
+
), ce(() => {
|
|
146
|
+
P.on$("editEventHandler", (e) => {
|
|
147
|
+
ne(e[0], e[1], e[2]);
|
|
148
|
+
}), te(), m.designer.handleEvent("form-css-updated", (e) => {
|
|
149
|
+
m.designer.setCssClassList(e);
|
|
150
|
+
}), m.designer.handleEvent("field-selected", (e) => {
|
|
151
|
+
D.value = !!e && e.type === "sub-form";
|
|
150
152
|
});
|
|
151
|
-
}),
|
|
152
|
-
emit$:
|
|
153
|
+
}), z({
|
|
154
|
+
emit$: P.emit$
|
|
153
155
|
}), (e, t) => {
|
|
154
|
-
const n =
|
|
155
|
-
return
|
|
156
|
-
|
|
157
|
-
default:
|
|
158
|
-
|
|
159
|
-
default:
|
|
160
|
-
|
|
161
|
-
activeKey:
|
|
162
|
-
"onUpdate:activeKey": t[4] || (t[4] = (
|
|
156
|
+
const n = f("a-collapse-panel"), l = f("a-collapse"), v = f("a-form"), p = f("a-empty"), _ = f("a-tab-pane"), y = f("a-tabs"), b = f("a-layout"), se = f("a-config-provider");
|
|
157
|
+
return g(), T(V, null, [
|
|
158
|
+
r(se, { componentSize: "small" }, {
|
|
159
|
+
default: d(() => [
|
|
160
|
+
r(b, { class: "panel-container" }, {
|
|
161
|
+
default: d(() => [
|
|
162
|
+
r(y, {
|
|
163
|
+
activeKey: w.value,
|
|
164
|
+
"onUpdate:activeKey": t[4] || (t[4] = (a) => w.value = a),
|
|
163
165
|
style: { height: "100%", width: "100%", overflow: "hidden" }
|
|
164
166
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
|
|
167
|
-
tab:
|
|
167
|
+
default: d(() => [
|
|
168
|
+
r(_, {
|
|
169
|
+
tab: h(u)("designer.hint.widgetSetting"),
|
|
168
170
|
key: "1"
|
|
169
171
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
K("div",
|
|
172
|
-
e.designer.selectedWidget ? (
|
|
172
|
+
default: d(() => [
|
|
173
|
+
K("div", he, [
|
|
174
|
+
e.designer.selectedWidget ? (g(), C(v, {
|
|
173
175
|
key: 0,
|
|
174
|
-
model:
|
|
176
|
+
model: s.value,
|
|
175
177
|
labelAlign: "left",
|
|
176
178
|
"label-width": "120px",
|
|
177
179
|
class: "setting-form tpf-form",
|
|
178
180
|
onSubmit: t[2] || (t[2] = pe(() => {
|
|
179
181
|
}, ["prevent"]))
|
|
180
182
|
}, {
|
|
181
|
-
default:
|
|
182
|
-
|
|
183
|
-
activeKey:
|
|
184
|
-
"onUpdate:activeKey": t[1] || (t[1] = (
|
|
183
|
+
default: d(() => [
|
|
184
|
+
r(l, {
|
|
185
|
+
activeKey: A.value,
|
|
186
|
+
"onUpdate:activeKey": t[1] || (t[1] = (a) => A.value = a),
|
|
185
187
|
class: "setting-collapse"
|
|
186
188
|
}, {
|
|
187
|
-
default:
|
|
188
|
-
(
|
|
189
|
-
key:
|
|
190
|
-
class:
|
|
191
|
-
header:
|
|
189
|
+
default: d(() => [
|
|
190
|
+
(g(!0), T(V, null, U(ee.value, (a) => (g(), C(n, {
|
|
191
|
+
key: a.key,
|
|
192
|
+
class: fe(a.className),
|
|
193
|
+
header: a.headerKey
|
|
192
194
|
}, {
|
|
193
|
-
default:
|
|
194
|
-
(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}, null, 40, ["designer", "selected-widget", "option-model", "event-handled"])) : U("", !0)
|
|
203
|
-
], 64))), 256))
|
|
195
|
+
default: d(() => [
|
|
196
|
+
(g(!0), T(V, null, U(a.props, (le, J) => (g(), C(ge(le), {
|
|
197
|
+
key: J,
|
|
198
|
+
designer: e.designer,
|
|
199
|
+
"selected-widget": o.value,
|
|
200
|
+
"option-model": s.value,
|
|
201
|
+
"onUpdate:optionModel": t[0] || (t[0] = (ae) => s.value = ae),
|
|
202
|
+
"event-handled": Z(J)
|
|
203
|
+
}, null, 40, ["designer", "selected-widget", "option-model", "event-handled"]))), 128))
|
|
204
204
|
]),
|
|
205
205
|
_: 2
|
|
206
206
|
}, 1032, ["class", "header"]))), 128))
|
|
@@ -209,38 +209,38 @@ const He = { class: "setting-scrollbar" }, Se = { class: "setting-scrollbar" },
|
|
|
209
209
|
}, 8, ["activeKey"])
|
|
210
210
|
]),
|
|
211
211
|
_: 1
|
|
212
|
-
}, 8, ["model"])) : (
|
|
212
|
+
}, 8, ["model"])) : (g(), C(p, {
|
|
213
213
|
key: 1,
|
|
214
|
-
description:
|
|
214
|
+
description: h(u)("designer.hint.noSelectedWidgetHint")
|
|
215
215
|
}, null, 8, ["description"]))
|
|
216
216
|
])
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
}, 8, ["tab"]),
|
|
220
|
-
e.designer ? (
|
|
221
|
-
tab:
|
|
220
|
+
e.designer ? (g(), C(_, {
|
|
221
|
+
tab: h(u)("designer.hint.表单设置"),
|
|
222
222
|
key: "2"
|
|
223
223
|
}, {
|
|
224
|
-
default:
|
|
225
|
-
K("div",
|
|
226
|
-
|
|
224
|
+
default: d(() => [
|
|
225
|
+
K("div", Pe, [
|
|
226
|
+
r(ye, {
|
|
227
227
|
designer: e.designer,
|
|
228
228
|
"form-config": H.value
|
|
229
229
|
}, null, 8, ["designer", "form-config"])
|
|
230
230
|
])
|
|
231
231
|
]),
|
|
232
232
|
_: 1
|
|
233
|
-
}, 8, ["tab"])) :
|
|
234
|
-
|
|
235
|
-
tab:
|
|
233
|
+
}, 8, ["tab"])) : ve("", !0),
|
|
234
|
+
r(_, {
|
|
235
|
+
tab: h(u)("designer.hint.表单api配置"),
|
|
236
236
|
key: "3"
|
|
237
237
|
}, {
|
|
238
|
-
default:
|
|
238
|
+
default: d(() => [
|
|
239
239
|
K("div", ke, [
|
|
240
|
-
|
|
240
|
+
r(Ee, {
|
|
241
241
|
designer: e.designer,
|
|
242
242
|
"form-config": H.value,
|
|
243
|
-
"onUpdate:formConfig": t[3] || (t[3] = (
|
|
243
|
+
"onUpdate:formConfig": t[3] || (t[3] = (a) => H.value = a)
|
|
244
244
|
}, null, 8, ["designer", "form-config"])
|
|
245
245
|
])
|
|
246
246
|
]),
|
|
@@ -255,19 +255,19 @@ const He = { class: "setting-scrollbar" }, Se = { class: "setting-scrollbar" },
|
|
|
255
255
|
]),
|
|
256
256
|
_: 1
|
|
257
257
|
}),
|
|
258
|
-
|
|
259
|
-
eventHeader:
|
|
258
|
+
r(h(me), {
|
|
259
|
+
eventHeader: N.value,
|
|
260
260
|
ref_key: "CodeModalEditorRef",
|
|
261
261
|
ref: S,
|
|
262
|
-
title:
|
|
263
|
-
mode:
|
|
262
|
+
title: W.value,
|
|
263
|
+
mode: k.value,
|
|
264
264
|
readonly: !1,
|
|
265
|
-
onSetCode:
|
|
265
|
+
onSetCode: oe
|
|
266
266
|
}, null, 8, ["eventHeader", "title", "mode"])
|
|
267
267
|
], 64);
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
export {
|
|
272
|
-
|
|
272
|
+
Ve as default
|
|
273
273
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, mergeModels as i, useModel as s, resolveComponent as t, createBlock as p, openBlock as m, unref as u, withCtx as f, createVNode as _ } from "vue";
|
|
2
|
+
import { useI18n as w } from "../../../../../utils/i18n.js";
|
|
3
|
+
const g = /* @__PURE__ */ a({
|
|
4
|
+
name: "data-table-colorRow-editor",
|
|
4
5
|
__name: "data-table-colorRow-editor",
|
|
5
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ i({
|
|
6
7
|
designer: Object,
|
|
7
8
|
selectedWidget: Object,
|
|
8
9
|
optionModel: Object
|
|
@@ -17,8 +18,8 @@ const h = /* @__PURE__ */ i({
|
|
|
17
18
|
}),
|
|
18
19
|
emits: ["update:optionModel"],
|
|
19
20
|
setup(n) {
|
|
20
|
-
const { i18nt: l } =
|
|
21
|
-
return (
|
|
21
|
+
const { i18nt: l } = w(), e = s(n, "optionModel");
|
|
22
|
+
return (M, o) => {
|
|
22
23
|
const c = t("a-switch"), d = t("a-form-item");
|
|
23
24
|
return m(), p(d, {
|
|
24
25
|
label: u(l)("designer.setting.selectRow")
|
|
@@ -35,5 +36,5 @@ const h = /* @__PURE__ */ i({
|
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
g as default
|
|
39
40
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import E from "../../../../../utils/i18n.js";
|
|
2
|
+
import _ from "../../../../http-editor/index.vue.js";
|
|
3
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
|
|
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 C, toDisplayString as k } 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
|
-
mixins: [
|
|
8
|
+
mixins: [E],
|
|
9
9
|
inheritAttrs: !1,
|
|
10
|
-
components: { HttpEditor:
|
|
10
|
+
components: { HttpEditor: _, CodeModalEditor: h },
|
|
11
11
|
props: {
|
|
12
12
|
designer: Object,
|
|
13
13
|
selectedWidget: Object,
|
|
@@ -19,9 +19,9 @@ const O = {
|
|
|
19
19
|
};
|
|
20
20
|
},
|
|
21
21
|
methods: {
|
|
22
|
-
handleUpdate(
|
|
22
|
+
handleUpdate(e) {
|
|
23
23
|
try {
|
|
24
|
-
this.optionModel.dataSource = JSON.parse(
|
|
24
|
+
this.optionModel.dataSource = JSON.parse(e);
|
|
25
25
|
} catch (n) {
|
|
26
26
|
this.$message.error(
|
|
27
27
|
this.i18nt("designer.hint.invalidOptionsData") + n.message
|
|
@@ -33,23 +33,23 @@ const O = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
function y(
|
|
36
|
+
function y(e, n, t, S, w, l) {
|
|
37
37
|
const m = o("a-switch"), s = o("a-form-item"), p = o("a-button"), b = o("CodeModalEditor"), f = o("HttpEditor");
|
|
38
38
|
return a(), u(M, null, [
|
|
39
39
|
d(s, {
|
|
40
|
-
label:
|
|
40
|
+
label: e.i18nt("designer.setting.dsEnabled")
|
|
41
41
|
}, {
|
|
42
42
|
default: i(() => [
|
|
43
43
|
d(m, {
|
|
44
|
-
checked:
|
|
45
|
-
"onUpdate:checked": n[0] || (n[0] = (
|
|
44
|
+
checked: t.optionModel.dsEnabled,
|
|
45
|
+
"onUpdate:checked": n[0] || (n[0] = (g) => t.optionModel.dsEnabled = g)
|
|
46
46
|
}, null, 8, ["checked"])
|
|
47
47
|
]),
|
|
48
48
|
_: 1
|
|
49
49
|
}, 8, ["label"]),
|
|
50
|
-
|
|
50
|
+
t.optionModel.dsEnabled ? c("", !0) : (a(), r(s, {
|
|
51
51
|
key: 0,
|
|
52
|
-
label:
|
|
52
|
+
label: e.i18nt("designer.setting.tableDataEdit")
|
|
53
53
|
}, {
|
|
54
54
|
default: i(() => [
|
|
55
55
|
d(p, {
|
|
@@ -58,7 +58,7 @@ function y(t, n, e, S, w, l) {
|
|
|
58
58
|
onClick: l.openTableDataEdit
|
|
59
59
|
}, {
|
|
60
60
|
default: i(() => [
|
|
61
|
-
k(
|
|
61
|
+
C(k(e.i18nt("designer.setting.editAction")), 1)
|
|
62
62
|
]),
|
|
63
63
|
_: 1
|
|
64
64
|
}, 8, ["onClick"])
|
|
@@ -70,18 +70,19 @@ function y(t, n, e, S, w, l) {
|
|
|
70
70
|
mode: "json",
|
|
71
71
|
readonly: !1,
|
|
72
72
|
isShowEventHeader: !1,
|
|
73
|
-
title:
|
|
73
|
+
title: e.i18nt("designer.setting.tableDataEdit"),
|
|
74
74
|
onSave: l.handleUpdate
|
|
75
75
|
}, null, 8, ["title", "onSave"]),
|
|
76
|
-
|
|
76
|
+
t.optionModel.dsEnabled ? (a(), r(f, {
|
|
77
77
|
key: 1,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
label: e.i18nt("designer.setting.editAPIConfig"),
|
|
79
|
+
designer: t.designer,
|
|
80
|
+
"selected-widget": t.selectedWidget,
|
|
81
|
+
optionModel: t.optionModel
|
|
82
|
+
}, null, 8, ["label", "designer", "selected-widget", "optionModel"])) : c("", !0)
|
|
82
83
|
], 64);
|
|
83
84
|
}
|
|
84
|
-
const
|
|
85
|
+
const A = /* @__PURE__ */ D(O, [["render", y]]);
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
+
A as default
|
|
87
88
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, useModel as u, resolveComponent as o, createBlock as m, openBlock as d, unref as s, withCtx as _, createVNode as c } from "vue";
|
|
2
2
|
import { useI18n as f } from "../../../../../utils/i18n.js";
|
|
3
|
-
const v = /* @__PURE__ */
|
|
3
|
+
const v = /* @__PURE__ */ p({
|
|
4
|
+
name: "line-height-editor",
|
|
4
5
|
__name: "line-height-editor",
|
|
5
6
|
props: {
|
|
6
7
|
optionModel: {
|
|
@@ -12,17 +13,17 @@ const v = /* @__PURE__ */ u({
|
|
|
12
13
|
},
|
|
13
14
|
emits: ["update:optionModel"],
|
|
14
15
|
setup(n) {
|
|
15
|
-
const { i18nt: i } = f(), e =
|
|
16
|
+
const { i18nt: i } = f(), e = u(n, "optionModel");
|
|
16
17
|
return (g, t) => {
|
|
17
|
-
const l = o("a-input-number"),
|
|
18
|
-
return d(), m(
|
|
18
|
+
const l = o("a-input-number"), r = o("a-form-item");
|
|
19
|
+
return d(), m(r, {
|
|
19
20
|
label: s(i)("designer.setting.lineHeight")
|
|
20
21
|
}, {
|
|
21
22
|
default: _(() => [
|
|
22
23
|
c(l, {
|
|
23
24
|
type: "text",
|
|
24
25
|
value: e.value.lineHeight,
|
|
25
|
-
"onUpdate:value": t[0] || (t[0] = (
|
|
26
|
+
"onUpdate:value": t[0] || (t[0] = (a) => e.value.lineHeight = a)
|
|
26
27
|
}, null, 8, ["value"])
|
|
27
28
|
]),
|
|
28
29
|
_: 1
|
|
@@ -194,19 +194,13 @@ const e = {
|
|
|
194
194
|
onDrawerBeforeClose: "onDrawerBeforeClose-editor",
|
|
195
195
|
customRow: "customRow-editor"
|
|
196
196
|
};
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
function r(o) {
|
|
201
|
-
return e[o] || t[o] || i[o];
|
|
202
|
-
}
|
|
203
|
-
const n = {
|
|
197
|
+
var d = /* @__PURE__ */ ((o) => (o.Common = "COMMON", o.Advanced = "ADVANCED", o.Event = "EVENT", o))(d || {});
|
|
198
|
+
const r = {
|
|
204
199
|
COMMON_PROPERTIES: e,
|
|
205
200
|
ADVANCED_PROPERTIES: t,
|
|
206
201
|
EVENT_PROPERTIES: i
|
|
207
202
|
};
|
|
208
203
|
export {
|
|
209
|
-
|
|
210
|
-
r as
|
|
211
|
-
d as propertyRegistered
|
|
204
|
+
d as PROPERTY_TYPE,
|
|
205
|
+
r as default
|
|
212
206
|
};
|
|
@@ -6,12 +6,12 @@ const l = (t = {}) => ({
|
|
|
6
6
|
icon: "data-table",
|
|
7
7
|
widgetList: [],
|
|
8
8
|
options: {
|
|
9
|
+
lineHeight: 50,
|
|
9
10
|
name: "",
|
|
10
11
|
label: "data-table",
|
|
11
12
|
hidden: !1,
|
|
12
13
|
tableHeight: "300px",
|
|
13
14
|
tableWidth: "100%",
|
|
14
|
-
lineHeight: 50,
|
|
15
15
|
customClass: [],
|
|
16
16
|
showIndex: !1,
|
|
17
17
|
showPagination: !0,
|