@kp-ui/lowcode 1.0.67 → 1.0.69
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/packages/tmgc2-share/src/components/TpfCodeEditor/code-editor.vue.js +7 -0
- package/packages/tmgc2-share/src/components/TpfCodeEditor/code-editor.vue2.js +164 -0
- package/packages/tmgc2-share/src/components/TpfModal/index.vue.js +7 -0
- package/packages/tmgc2-share/src/components/TpfModal/index.vue2.js +173 -0
- package/packages/tmgc2-share/src/components/TpfModal/index.vue3.js +1 -0
- package/render.js +6 -7
- 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/container-widget/data-table-widget.vue.js +40 -37
- package/src/components/form-designer/form-widget/index.vue.js +5 -3
- package/src/components/form-designer/setting-panel/form-setting.vue.js +1 -1
- package/src/components/form-designer/setting-panel/index.vue.js +35 -80
- 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 +89 -91
- 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 +99 -108
- package/src/components/form-designer/widget-panel/index.vue.js +4 -2
- package/src/components/form-render/dynamic-dialog.vue.js +5 -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/lang/zh-CN.js +1 -1
- package/src/mixins/useDataTableMixin.js +10 -1
- 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,12 +1,18 @@
|
|
|
1
1
|
import i18n from "../../../../../utils/i18n.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import _sfc_main$1 from "../../../../code-editor/code-modal-editor.vue.js";
|
|
3
|
+
import { cloneDeep } from "lodash-es";
|
|
4
|
+
import { defineAsyncComponent, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, createBlock, createCommentVNode, normalizeClass } from "vue";
|
|
4
5
|
/* empty css */
|
|
5
6
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
7
|
const _sfc_main = {
|
|
7
8
|
name: "tableColumns-editor",
|
|
8
9
|
mixins: [i18n],
|
|
9
|
-
components: {
|
|
10
|
+
components: {
|
|
11
|
+
CodeModalEditor: _sfc_main$1,
|
|
12
|
+
TpfModal: defineAsyncComponent(
|
|
13
|
+
() => import("../../../../../../packages/tmgc2-share/src/components/TpfModal/index.vue.js")
|
|
14
|
+
)
|
|
15
|
+
},
|
|
10
16
|
props: {
|
|
11
17
|
designer: Object,
|
|
12
18
|
selectedWidget: Object,
|
|
@@ -14,6 +20,7 @@ const _sfc_main = {
|
|
|
14
20
|
},
|
|
15
21
|
data() {
|
|
16
22
|
return {
|
|
23
|
+
tableColumns: [],
|
|
17
24
|
columns: [
|
|
18
25
|
{
|
|
19
26
|
title: "序号",
|
|
@@ -33,6 +40,7 @@ const _sfc_main = {
|
|
|
33
40
|
{
|
|
34
41
|
title: this.i18nt("designer.setting.columnLabel"),
|
|
35
42
|
dataIndex: "title",
|
|
43
|
+
align: "center",
|
|
36
44
|
resizable: true,
|
|
37
45
|
width: 100
|
|
38
46
|
},
|
|
@@ -40,13 +48,7 @@ const _sfc_main = {
|
|
|
40
48
|
title: this.i18nt("designer.setting.columnWidth"),
|
|
41
49
|
dataIndex: "width",
|
|
42
50
|
resizable: true,
|
|
43
|
-
width:
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: "最小宽度",
|
|
47
|
-
dataIndex: "minWidth",
|
|
48
|
-
resizable: true,
|
|
49
|
-
width: 100
|
|
51
|
+
width: 120
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
title: this.i18nt("designer.setting.visibleColumn"),
|
|
@@ -112,10 +114,11 @@ const _sfc_main = {
|
|
|
112
114
|
this.$refs.CodeModalEditorRef.open(record.customRender);
|
|
113
115
|
},
|
|
114
116
|
saveColumnRender(value) {
|
|
115
|
-
this.
|
|
117
|
+
this.tableColumns[this.currentRecordIndexs].customRender = value;
|
|
116
118
|
},
|
|
117
119
|
addCol() {
|
|
118
120
|
const newRow = {
|
|
121
|
+
isAutoWidth: false,
|
|
119
122
|
columnId: (/* @__PURE__ */ new Date()).getTime(),
|
|
120
123
|
show: true,
|
|
121
124
|
width: 150,
|
|
@@ -128,30 +131,35 @@ const _sfc_main = {
|
|
|
128
131
|
resizable: true,
|
|
129
132
|
showSorterTooltip: false
|
|
130
133
|
};
|
|
131
|
-
this.
|
|
134
|
+
this.tableColumns.push(newRow);
|
|
132
135
|
this.designer.emitHistoryChange();
|
|
133
136
|
},
|
|
134
137
|
handleDelete(index) {
|
|
135
|
-
if (this.
|
|
138
|
+
if (this.tableColumns.length === 1) {
|
|
136
139
|
this.$message.warning(
|
|
137
140
|
this.i18nt("designer.setting.onlyOneColumnCannotBeDeleted")
|
|
138
141
|
);
|
|
139
142
|
return false;
|
|
140
143
|
}
|
|
141
|
-
this.
|
|
144
|
+
this.tableColumns.splice(index, 1);
|
|
142
145
|
},
|
|
143
146
|
// 确认表格列更改
|
|
144
147
|
colSubmit() {
|
|
148
|
+
this.optionModel.tableColumns = cloneDeep(this.tableColumns);
|
|
145
149
|
this.dialogVisible = false;
|
|
146
150
|
},
|
|
147
151
|
openSetting() {
|
|
148
152
|
this.dialogVisible = true;
|
|
153
|
+
this.tableColumns = cloneDeep(this.optionModel.tableColumns);
|
|
149
154
|
}
|
|
150
155
|
}
|
|
151
156
|
};
|
|
152
157
|
const _hoisted_1 = { class: "table-wrap" };
|
|
153
|
-
const _hoisted_2 = {
|
|
154
|
-
|
|
158
|
+
const _hoisted_2 = {
|
|
159
|
+
key: 2,
|
|
160
|
+
style: { "text-align": "center" }
|
|
161
|
+
};
|
|
162
|
+
const _hoisted_3 = { class: "add-btn" };
|
|
155
163
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
156
164
|
const _component_a_button = resolveComponent("a-button");
|
|
157
165
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
@@ -161,7 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
161
169
|
const _component_a_select = resolveComponent("a-select");
|
|
162
170
|
const _component_a_space = resolveComponent("a-space");
|
|
163
171
|
const _component_s_table = resolveComponent("s-table");
|
|
164
|
-
const
|
|
172
|
+
const _component_TpfModal = resolveComponent("TpfModal");
|
|
165
173
|
const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
|
|
166
174
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
167
175
|
createVNode(_component_a_form_item, {
|
|
@@ -181,52 +189,45 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
181
189
|
]),
|
|
182
190
|
_: 1
|
|
183
191
|
}, 8, ["label"]),
|
|
184
|
-
createVNode(
|
|
192
|
+
createVNode(_component_TpfModal, {
|
|
185
193
|
title: _ctx.i18nt("designer.setting.tableColEdit"),
|
|
186
194
|
visible: $data.dialogVisible,
|
|
187
195
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => $data.dialogVisible = $event),
|
|
188
|
-
"
|
|
189
|
-
"close-on-click-modal": false,
|
|
190
|
-
"close-on-press-escape": false,
|
|
191
|
-
"destroy-on-close": true,
|
|
192
|
-
width: "1200px",
|
|
193
|
-
"aria-hidden": "false",
|
|
194
|
-
wrapClassName: "table-columns-modal"
|
|
196
|
+
width: "1200px"
|
|
195
197
|
}, {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}, 8, ["onClick"])
|
|
217
|
-
])
|
|
198
|
+
footerRight: withCtx(() => [
|
|
199
|
+
createVNode(_component_a_button, {
|
|
200
|
+
size: "default",
|
|
201
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $data.dialogVisible = false)
|
|
202
|
+
}, {
|
|
203
|
+
default: withCtx(() => [
|
|
204
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
205
|
+
]),
|
|
206
|
+
_: 1
|
|
207
|
+
}),
|
|
208
|
+
createVNode(_component_a_button, {
|
|
209
|
+
size: "default",
|
|
210
|
+
type: "primary",
|
|
211
|
+
onClick: $options.colSubmit
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [
|
|
214
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.confirm")), 1)
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}, 8, ["onClick"])
|
|
218
218
|
]),
|
|
219
219
|
default: withCtx(() => [
|
|
220
220
|
createElementVNode("div", _hoisted_1, [
|
|
221
221
|
createVNode(_component_s_table, {
|
|
222
|
+
class: "tpf-surely-table",
|
|
222
223
|
"aria-hidden": "false",
|
|
223
|
-
dataSource: $
|
|
224
|
+
dataSource: $data.tableColumns,
|
|
224
225
|
style: { "width": "100%" },
|
|
225
|
-
class: "tpf-surely-table",
|
|
226
226
|
deepWatchDataSource: "",
|
|
227
227
|
"cell-style": { padding: "0" },
|
|
228
228
|
height: "600",
|
|
229
229
|
id: "singleTable",
|
|
230
|
+
size: "medium",
|
|
230
231
|
scroll: { y: 300, x: 300 },
|
|
231
232
|
pagination: false,
|
|
232
233
|
resizable: "",
|
|
@@ -236,53 +237,50 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
236
237
|
bodyCell: withCtx(({ column, record, index, recordIndexs }) => [
|
|
237
238
|
column.dataIndex === "dataIndex" ? (openBlock(), createBlock(_component_a_input, {
|
|
238
239
|
key: 0,
|
|
239
|
-
value: $
|
|
240
|
-
"onUpdate:value": ($event) => $
|
|
240
|
+
value: $data.tableColumns[recordIndexs[0]].dataIndex,
|
|
241
|
+
"onUpdate:value": ($event) => $data.tableColumns[recordIndexs[0]].dataIndex = $event
|
|
241
242
|
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
242
243
|
column.dataIndex === "title" ? (openBlock(), createBlock(_component_a_input, {
|
|
243
244
|
key: 1,
|
|
244
|
-
value: $
|
|
245
|
-
"onUpdate:value": ($event) => $
|
|
246
|
-
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
247
|
-
column.dataIndex === "width" ? (openBlock(), createBlock(_component_a_input, {
|
|
248
|
-
key: 2,
|
|
249
|
-
value: $props.optionModel.tableColumns[recordIndexs[0]].width,
|
|
250
|
-
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].width = $event
|
|
251
|
-
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
252
|
-
column.dataIndex === "maxWidth" ? (openBlock(), createBlock(_component_a_input, {
|
|
253
|
-
key: 3,
|
|
254
|
-
value: $props.optionModel.tableColumns[recordIndexs[0]].maxWidth,
|
|
255
|
-
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].maxWidth = $event
|
|
256
|
-
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
257
|
-
column.dataIndex === "minWidth" ? (openBlock(), createBlock(_component_a_input, {
|
|
258
|
-
key: 4,
|
|
259
|
-
value: $props.optionModel.tableColumns[recordIndexs[0]].minWidth,
|
|
260
|
-
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].minWidth = $event
|
|
245
|
+
value: $data.tableColumns[recordIndexs[0]].title,
|
|
246
|
+
"onUpdate:value": ($event) => $data.tableColumns[recordIndexs[0]].title = $event
|
|
261
247
|
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
248
|
+
column.dataIndex === "width" ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
249
|
+
createVNode(_component_a_switch, {
|
|
250
|
+
"checked-children": "自动宽度",
|
|
251
|
+
checked: $data.tableColumns[recordIndexs[0]].isAutoWidth,
|
|
252
|
+
"onUpdate:checked": ($event) => $data.tableColumns[recordIndexs[0]].isAutoWidth = $event
|
|
253
|
+
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
254
|
+
!record.isAutoWidth ? (openBlock(), createBlock(_component_a_input, {
|
|
255
|
+
key: 0,
|
|
256
|
+
value: $data.tableColumns[recordIndexs[0]].width,
|
|
257
|
+
"onUpdate:value": ($event) => $data.tableColumns[recordIndexs[0]].width = $event
|
|
258
|
+
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true)
|
|
259
|
+
])) : createCommentVNode("", true),
|
|
262
260
|
column.dataIndex === "show" ? (openBlock(), createBlock(_component_a_switch, {
|
|
263
|
-
key:
|
|
264
|
-
checked: $
|
|
265
|
-
"onUpdate:checked": ($event) => $
|
|
261
|
+
key: 3,
|
|
262
|
+
checked: $data.tableColumns[recordIndexs[0]].show,
|
|
263
|
+
"onUpdate:checked": ($event) => $data.tableColumns[recordIndexs[0]].show = $event
|
|
266
264
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
267
265
|
column.dataIndex === "sorter" ? (openBlock(), createBlock(_component_a_switch, {
|
|
268
|
-
key:
|
|
269
|
-
checked: $
|
|
270
|
-
"onUpdate:checked": ($event) => $
|
|
266
|
+
key: 4,
|
|
267
|
+
checked: $data.tableColumns[recordIndexs[0]].sorter,
|
|
268
|
+
"onUpdate:checked": ($event) => $data.tableColumns[recordIndexs[0]].sorter = $event
|
|
271
269
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
272
270
|
column.dataIndex === "resizable" ? (openBlock(), createBlock(_component_a_switch, {
|
|
273
|
-
key:
|
|
274
|
-
checked: $
|
|
275
|
-
"onUpdate:checked": ($event) => $
|
|
271
|
+
key: 5,
|
|
272
|
+
checked: $data.tableColumns[recordIndexs[0]].resizable,
|
|
273
|
+
"onUpdate:checked": ($event) => $data.tableColumns[recordIndexs[0]].resizable = $event
|
|
276
274
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
277
275
|
column.dataIndex === "ellipsis" ? (openBlock(), createBlock(_component_a_switch, {
|
|
278
|
-
key:
|
|
279
|
-
checked: $
|
|
280
|
-
"onUpdate:checked": ($event) => $
|
|
276
|
+
key: 6,
|
|
277
|
+
checked: $data.tableColumns[recordIndexs[0]].ellipsis,
|
|
278
|
+
"onUpdate:checked": ($event) => $data.tableColumns[recordIndexs[0]].ellipsis = $event
|
|
281
279
|
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
282
280
|
column.dataIndex === "fixed" ? (openBlock(), createBlock(_component_a_select, {
|
|
283
|
-
key:
|
|
284
|
-
value: $
|
|
285
|
-
"onUpdate:value": ($event) => $
|
|
281
|
+
key: 7,
|
|
282
|
+
value: $data.tableColumns[recordIndexs[0]].fixed,
|
|
283
|
+
"onUpdate:value": ($event) => $data.tableColumns[recordIndexs[0]].fixed = $event,
|
|
286
284
|
allowClear: "",
|
|
287
285
|
style: {}
|
|
288
286
|
}, {
|
|
@@ -303,14 +301,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
303
301
|
_: 2
|
|
304
302
|
}, 1032, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
305
303
|
column.dataIndex === "align" ? (openBlock(), createBlock(_component_a_select, {
|
|
306
|
-
key:
|
|
304
|
+
key: 8,
|
|
307
305
|
style: {},
|
|
308
|
-
value: $
|
|
309
|
-
"onUpdate:value": ($event) => $
|
|
306
|
+
value: $data.tableColumns[recordIndexs[0]].align,
|
|
307
|
+
"onUpdate:value": ($event) => $data.tableColumns[recordIndexs[0]].align = $event,
|
|
310
308
|
options: $data.alignOptions
|
|
311
309
|
}, null, 8, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
|
|
312
310
|
column.dataIndex === "customRender" ? (openBlock(), createBlock(_component_a_button, {
|
|
313
|
-
key:
|
|
311
|
+
key: 9,
|
|
314
312
|
onClick: ($event) => $options.showRenderDialog(recordIndexs[0], record, _ctx.dataIndex),
|
|
315
313
|
class: normalizeClass([{ "button-text-highlight": !!record.customRender }]),
|
|
316
314
|
size: "small",
|
|
@@ -321,7 +319,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
321
319
|
])),
|
|
322
320
|
_: 2
|
|
323
321
|
}, 1032, ["onClick", "class"])) : createCommentVNode("", true),
|
|
324
|
-
column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key:
|
|
322
|
+
column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key: 10 }, {
|
|
325
323
|
default: withCtx(() => [
|
|
326
324
|
createVNode(_component_a_button, {
|
|
327
325
|
title: _ctx.i18nt("designer.setting.deleteTableColumn"),
|
|
@@ -340,7 +338,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
340
338
|
]),
|
|
341
339
|
_: 1
|
|
342
340
|
}, 8, ["dataSource", "row-key", "columns"]),
|
|
343
|
-
createElementVNode("div",
|
|
341
|
+
createElementVNode("div", _hoisted_3, [
|
|
344
342
|
createVNode(_component_a_button, {
|
|
345
343
|
title: _ctx.i18nt("designer.setting.addTableColumn"),
|
|
346
344
|
type: "primary",
|
|
@@ -361,11 +359,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
361
359
|
onSave: $options.saveColumnRender,
|
|
362
360
|
ref: "CodeModalEditorRef",
|
|
363
361
|
title: _ctx.i18nt("designer.setting.renderFunction"),
|
|
364
|
-
"
|
|
362
|
+
"fn-params": "scope"
|
|
365
363
|
}, null, 8, ["onSave", "title"])
|
|
366
364
|
], 64);
|
|
367
365
|
}
|
|
368
|
-
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
366
|
+
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-11e67ce4"]]);
|
|
369
367
|
export {
|
|
370
368
|
dataTableTableColumnsEditor as default
|
|
371
369
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
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, createTextVNode, toDisplayString } from "vue";
|
|
4
4
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
name: "menuList-editor",
|
|
7
7
|
mixins: [i18n],
|
|
8
|
-
components: { CodeModalEditor },
|
|
8
|
+
components: { CodeModalEditor: _sfc_main$1 },
|
|
9
9
|
props: {
|
|
10
10
|
designer: Object,
|
|
11
11
|
selectedWidget: Object,
|
|
@@ -15,8 +15,12 @@ const _sfc_main = {
|
|
|
15
15
|
mixins: [i18n],
|
|
16
16
|
components: {
|
|
17
17
|
VFormRender: defineAsyncComponent(() => import("../../../../render.js")),
|
|
18
|
-
CodeEditor: defineAsyncComponent(
|
|
19
|
-
|
|
18
|
+
CodeEditor: defineAsyncComponent(
|
|
19
|
+
() => import("../../../../packages/tmgc2-share/src/components/TpfCodeEditor/code-editor.vue.js")
|
|
20
|
+
),
|
|
21
|
+
TpfModal: defineAsyncComponent(
|
|
22
|
+
() => import("../../../../packages/tmgc2-share/src/components/TpfModal/index.vue.js")
|
|
23
|
+
),
|
|
20
24
|
SvgIcon
|
|
21
25
|
},
|
|
22
26
|
props: {
|
|
@@ -513,9 +517,6 @@ const _hoisted_4 = { class: "right-toolbar-con" };
|
|
|
513
517
|
const _hoisted_5 = { class: "dialog-footer" };
|
|
514
518
|
const _hoisted_6 = { class: "dialog-footer" };
|
|
515
519
|
const _hoisted_7 = { class: "dialog-footer" };
|
|
516
|
-
const _hoisted_8 = { style: { "border": "1px solid #dcdfe6" } };
|
|
517
|
-
const _hoisted_9 = { class: "dialog-footer" };
|
|
518
|
-
const _hoisted_10 = { class: "dialog-footer" };
|
|
519
520
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
520
521
|
const _component_svg_icon = resolveComponent("svg-icon");
|
|
521
522
|
const _component_a_button = resolveComponent("a-button");
|
|
@@ -524,9 +525,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
524
525
|
const _component_a_tree = resolveComponent("a-tree");
|
|
525
526
|
const _component_a_drawer = resolveComponent("a-drawer");
|
|
526
527
|
const _component_VFormRender = resolveComponent("VFormRender");
|
|
527
|
-
const
|
|
528
|
+
const _component_TpfModal = resolveComponent("TpfModal");
|
|
528
529
|
const _component_a_alert = resolveComponent("a-alert");
|
|
529
530
|
const _component_code_editor = resolveComponent("code-editor");
|
|
531
|
+
const _component_a_modal = resolveComponent("a-modal");
|
|
532
|
+
const _component_CodeEditor = resolveComponent("CodeEditor");
|
|
530
533
|
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
|
531
534
|
const _component_a_tabs = resolveComponent("a-tabs");
|
|
532
535
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -697,7 +700,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
697
700
|
}), 256))
|
|
698
701
|
])
|
|
699
702
|
]),
|
|
700
|
-
createVNode(
|
|
703
|
+
createVNode(_component_TpfModal, {
|
|
701
704
|
title: _ctx.i18nt("designer.toolbar.preview"),
|
|
702
705
|
visible: $data.showPreviewDialogFlag,
|
|
703
706
|
"onUpdate:visible": _cache[8] || (_cache[8] = ($event) => $data.showPreviewDialogFlag = $event),
|
|
@@ -711,59 +714,57 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
711
714
|
width: "75%",
|
|
712
715
|
fullscreen: $options.layoutType === "H5" || $options.layoutType === "Pad"
|
|
713
716
|
}, {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
})
|
|
766
|
-
])
|
|
717
|
+
footerRight: withCtx(() => [
|
|
718
|
+
createVNode(_component_a_button, { onClick: $options.showData }, {
|
|
719
|
+
default: withCtx(() => _cache[24] || (_cache[24] = [
|
|
720
|
+
createTextVNode("数据回显")
|
|
721
|
+
])),
|
|
722
|
+
_: 1
|
|
723
|
+
}, 8, ["onClick"]),
|
|
724
|
+
createVNode(_component_a_button, {
|
|
725
|
+
type: "primary",
|
|
726
|
+
onClick: $options.getFormData
|
|
727
|
+
}, {
|
|
728
|
+
default: withCtx(() => [
|
|
729
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.getFormData")), 1)
|
|
730
|
+
]),
|
|
731
|
+
_: 1
|
|
732
|
+
}, 8, ["onClick"]),
|
|
733
|
+
createVNode(_component_a_button, {
|
|
734
|
+
type: "primary",
|
|
735
|
+
onClick: $options.resetForm
|
|
736
|
+
}, {
|
|
737
|
+
default: withCtx(() => [
|
|
738
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.resetForm")), 1)
|
|
739
|
+
]),
|
|
740
|
+
_: 1
|
|
741
|
+
}, 8, ["onClick"]),
|
|
742
|
+
createVNode(_component_a_button, {
|
|
743
|
+
type: "primary",
|
|
744
|
+
onClick: $options.setFormDisabled
|
|
745
|
+
}, {
|
|
746
|
+
default: withCtx(() => [
|
|
747
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.disableForm")), 1)
|
|
748
|
+
]),
|
|
749
|
+
_: 1
|
|
750
|
+
}, 8, ["onClick"]),
|
|
751
|
+
createVNode(_component_a_button, {
|
|
752
|
+
type: "primary",
|
|
753
|
+
onClick: $options.setFormEnabled
|
|
754
|
+
}, {
|
|
755
|
+
default: withCtx(() => [
|
|
756
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.enableForm")), 1)
|
|
757
|
+
]),
|
|
758
|
+
_: 1
|
|
759
|
+
}, 8, ["onClick"]),
|
|
760
|
+
createVNode(_component_a_button, {
|
|
761
|
+
onClick: _cache[7] || (_cache[7] = ($event) => $data.showPreviewDialogFlag = false)
|
|
762
|
+
}, {
|
|
763
|
+
default: withCtx(() => [
|
|
764
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
765
|
+
]),
|
|
766
|
+
_: 1
|
|
767
|
+
})
|
|
767
768
|
]),
|
|
768
769
|
default: withCtx(() => [
|
|
769
770
|
createElementVNode("div", null, [
|
|
@@ -804,7 +805,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
804
805
|
"destroy-on-close": true
|
|
805
806
|
}, {
|
|
806
807
|
footer: withCtx(() => [
|
|
807
|
-
createElementVNode("div",
|
|
808
|
+
createElementVNode("div", _hoisted_5, [
|
|
808
809
|
createVNode(_component_a_button, {
|
|
809
810
|
type: "primary",
|
|
810
811
|
onClick: $options.doJsonImport
|
|
@@ -854,7 +855,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
854
855
|
"destroy-on-close": true
|
|
855
856
|
}, {
|
|
856
857
|
footer: withCtx(() => [
|
|
857
|
-
createElementVNode("div",
|
|
858
|
+
createElementVNode("div", _hoisted_6, [
|
|
858
859
|
createVNode(_component_a_button, {
|
|
859
860
|
type: "primary",
|
|
860
861
|
class: "copy-json-btn",
|
|
@@ -892,56 +893,46 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
892
893
|
]),
|
|
893
894
|
_: 1
|
|
894
895
|
}, 8, ["title", "visible"]),
|
|
895
|
-
createVNode(
|
|
896
|
+
createVNode(_component_TpfModal, {
|
|
896
897
|
title: _ctx.i18nt("designer.hint.exportFormData"),
|
|
897
898
|
visible: $data.showFormDataDialogFlag,
|
|
898
899
|
"onUpdate:visible": _cache[17] || (_cache[17] = ($event) => $data.showFormDataDialogFlag = $event),
|
|
899
|
-
"
|
|
900
|
-
class: "nested-drag-dialog dialog-title-light-bg",
|
|
901
|
-
center: "",
|
|
902
|
-
"close-on-click-modal": false,
|
|
903
|
-
"close-on-press-escape": false,
|
|
904
|
-
"destroy-on-close": true,
|
|
905
|
-
"append-to-body": true
|
|
900
|
+
width: "1200px"
|
|
906
901
|
}, {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
})
|
|
934
|
-
])
|
|
902
|
+
footerRight: withCtx(() => [
|
|
903
|
+
createVNode(_component_a_button, {
|
|
904
|
+
type: "primary",
|
|
905
|
+
class: "copy-form-data-json-btn",
|
|
906
|
+
"data-clipboard-text": $data.formDataRawJson,
|
|
907
|
+
onClick: $options.copyFormDataJson
|
|
908
|
+
}, {
|
|
909
|
+
default: withCtx(() => [
|
|
910
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.copyFormData")), 1)
|
|
911
|
+
]),
|
|
912
|
+
_: 1
|
|
913
|
+
}, 8, ["data-clipboard-text", "onClick"]),
|
|
914
|
+
createVNode(_component_a_button, { onClick: $options.saveFormData }, {
|
|
915
|
+
default: withCtx(() => [
|
|
916
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.saveFormData")), 1)
|
|
917
|
+
]),
|
|
918
|
+
_: 1
|
|
919
|
+
}, 8, ["onClick"]),
|
|
920
|
+
createVNode(_component_a_button, {
|
|
921
|
+
onClick: _cache[16] || (_cache[16] = ($event) => $data.showFormDataDialogFlag = false)
|
|
922
|
+
}, {
|
|
923
|
+
default: withCtx(() => [
|
|
924
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
|
|
925
|
+
]),
|
|
926
|
+
_: 1
|
|
927
|
+
})
|
|
935
928
|
]),
|
|
936
929
|
default: withCtx(() => [
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
}, null, 8, ["modelValue"])
|
|
944
|
-
])
|
|
930
|
+
createVNode(_component_CodeEditor, {
|
|
931
|
+
mode: "json",
|
|
932
|
+
readonly: true,
|
|
933
|
+
modelValue: $data.formDataJson,
|
|
934
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.formDataJson = $event)
|
|
935
|
+
}, null, 8, ["modelValue"])
|
|
945
936
|
]),
|
|
946
937
|
_: 1
|
|
947
938
|
}, 8, ["title", "visible"]),
|
|
@@ -960,7 +951,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
960
951
|
"destroy-on-close": true
|
|
961
952
|
}, {
|
|
962
953
|
footer: withCtx(() => [
|
|
963
|
-
createElementVNode("div",
|
|
954
|
+
createElementVNode("div", _hoisted_7, [
|
|
964
955
|
createVNode(_component_a_button, {
|
|
965
956
|
type: "primary",
|
|
966
957
|
class: "copy-vue2-sfc-btn",
|
|
@@ -1051,7 +1042,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1051
1042
|
}, 8, ["title", "visible"])) : createCommentVNode("", true)
|
|
1052
1043
|
]);
|
|
1053
1044
|
}
|
|
1054
|
-
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1045
|
+
const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4241259f"]]);
|
|
1055
1046
|
export {
|
|
1056
1047
|
ToolbarPanel as default
|
|
1057
1048
|
};
|
|
@@ -164,7 +164,9 @@ const _sfc_main = {
|
|
|
164
164
|
if (modifiedFlag) {
|
|
165
165
|
this.designer.emitHistoryChange();
|
|
166
166
|
}
|
|
167
|
-
this.$message.success(
|
|
167
|
+
this.$message.success(
|
|
168
|
+
this.i18nt("designer.hint.loadFormTemplateSuccess")
|
|
169
|
+
);
|
|
168
170
|
}).catch((error) => {
|
|
169
171
|
this.$message.error(
|
|
170
172
|
this.i18nt("designer.hint.loadFormTemplateFailed") + ":" + error
|
|
@@ -381,7 +383,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
381
383
|
])
|
|
382
384
|
]);
|
|
383
385
|
}
|
|
384
|
-
const WidgetPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
386
|
+
const WidgetPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-75f46b0a"]]);
|
|
385
387
|
export {
|
|
386
388
|
WidgetPanel as default
|
|
387
389
|
};
|