@kp-ui/lowcode 1.0.42 → 1.0.44
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/designer.js +13 -22
- package/index.js +6 -2
- package/package.json +28 -28
- package/render.js +58 -6
- package/src/components/form-designer/designer.js +16 -11
- package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js +12 -4
- package/src/components/form-designer/form-widget/index.vue.js +15 -5
- package/src/components/form-designer/setting-panel/form-setting.vue.js +114 -152
- package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js +33 -4
- package/src/components/form-designer/setting-panel/property-editor/button-postion-editor.vue.js +23 -0
- package/src/components/form-designer/setting-panel/property-editor/button-postion-editor.vue2.js +16 -0
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +5 -3
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +192 -222
- package/src/components/form-designer/setting-panel/property-editor/index.js +2 -1
- package/src/components/form-designer/setting-panel/propertyRegister.js +2 -1
- package/src/components/form-designer/toolbar-panel/index.vue.js +2 -1
- package/src/components/form-designer/widget-panel/basicFields/buttonList.js +1 -0
- package/src/components/form-render/SubmitButtonRender.vue.js +101 -0
- package/src/components/form-render/SubmitButtonRender.vue2.js +4 -0
- package/src/components/form-render/dynamic-dialog.vue.js +92 -58
- package/src/components/public/methoad-item.vue.js +132 -0
- package/src/components/public/methoad-item.vue2.js +4 -0
- package/src/constants/index.js +13 -0
- package/src/lang/zh-CN.js +2 -0
- package/src/utils/i18n.js +16 -3
- package/src/utils/smart-vue-i18n/index.js +1 -1
- package/src/utils/util.js +6 -0
- package/styles/style.css +1 -1
- package/types/install.d.ts +3 -1
- package/types/install.d.ts.map +1 -1
- package/types/src/components/form-designer/form-widget/index.d.ts.map +1 -1
- package/types/src/components/form-designer/index.d.ts +1 -3
- package/types/src/components/form-designer/index.d.ts.map +1 -1
- package/types/src/components/form-designer/setting-panel/index.d.ts +1 -0
- package/types/src/components/form-designer/widget-panel/basicFields/buttonList.d.ts.map +1 -1
- package/types/src/components/form-render/SubmitButtonRender.d.ts +32 -0
- package/types/src/components/form-render/SubmitButtonRender.d.ts.map +1 -0
- package/types/src/components/form-render/dynamic-dialog.d.ts +129 -0
- package/types/src/components/form-render/dynamic-dialog.d.ts.map +1 -0
- package/types/src/components/form-render/index.d.ts +15 -1
- package/types/src/components/form-render/index.d.ts.map +1 -1
- package/types/src/constants/index.d.ts +4 -0
- package/types/src/constants/index.d.ts.map +1 -1
- package/src/utils/config.js +0 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import i18n from "../../../utils/i18n.js";
|
|
2
2
|
import CodeEditor from "../../code-editor/index.vue.js";
|
|
3
3
|
import { insertGlobalFunctionsToHtml, insertCustomCssToHead, deepClone } from "../../../utils/util.js";
|
|
4
|
+
import _sfc_main$1 from "../../public/methoad-item.vue.js";
|
|
4
5
|
import { resolveComponent, createElementBlock, openBlock, createVNode, createCommentVNode, withModifiers, withCtx, createBlock, createTextVNode, toDisplayString, normalizeClass, createElementVNode } from "vue";
|
|
5
6
|
/* empty css */
|
|
6
7
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
@@ -8,7 +9,8 @@ const _sfc_main = {
|
|
|
8
9
|
name: "form-setting",
|
|
9
10
|
mixins: [i18n],
|
|
10
11
|
components: {
|
|
11
|
-
CodeEditor
|
|
12
|
+
CodeEditor,
|
|
13
|
+
MethodItem: _sfc_main$1
|
|
12
14
|
},
|
|
13
15
|
props: {
|
|
14
16
|
designer: Object,
|
|
@@ -35,6 +37,8 @@ const _sfc_main = {
|
|
|
35
37
|
eventParamsMap: {
|
|
36
38
|
onFormCreated: "onFormCreated() {",
|
|
37
39
|
onFormMounted: "onFormMounted() {",
|
|
40
|
+
onOkButtonClick: "onOkButtonClick() {",
|
|
41
|
+
onCancelButtonClick: "onCancelButtonClick() {",
|
|
38
42
|
onFormDataChange: "onFormDataChange(fieldName, newValue, oldValue, formModel, subFormName, subFormRowIndex) {"
|
|
39
43
|
//'onFormValidate': 'onFormValidate() {',
|
|
40
44
|
}
|
|
@@ -57,6 +61,15 @@ const _sfc_main = {
|
|
|
57
61
|
}, 1200);
|
|
58
62
|
},
|
|
59
63
|
methods: {
|
|
64
|
+
getPropEditor(key) {
|
|
65
|
+
const ownPropEditorName = `${key}-editor`;
|
|
66
|
+
if (this.$options.components[ownPropEditorName]) {
|
|
67
|
+
return ownPropEditorName;
|
|
68
|
+
}
|
|
69
|
+
this.$root.$.appContext.components[ownPropEditorName] ? ownPropEditorName : key;
|
|
70
|
+
console.log(allWiget[ownPropEditorName]);
|
|
71
|
+
return allWiget[ownPropEditorName];
|
|
72
|
+
},
|
|
60
73
|
getFormEventHandled(eventName) {
|
|
61
74
|
return !!this.formConfig[eventName] && this.formConfig[eventName].length > 0;
|
|
62
75
|
},
|
|
@@ -146,23 +159,6 @@ const _sfc_main = {
|
|
|
146
159
|
this.curEventName = eventName;
|
|
147
160
|
this.formEventHandlerCode = this.formConfig[eventName];
|
|
148
161
|
this.showFormEventDialogFlag = true;
|
|
149
|
-
},
|
|
150
|
-
saveFormEventHandler() {
|
|
151
|
-
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
152
|
-
let syntaxErrorFlag = false;
|
|
153
|
-
if (!!codeHints && codeHints.length > 0) {
|
|
154
|
-
codeHints.forEach((chItem) => {
|
|
155
|
-
if (chItem.type === "error") {
|
|
156
|
-
syntaxErrorFlag = true;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
if (syntaxErrorFlag) {
|
|
160
|
-
this.$message.error(this.i18nt("designer.setting.syntaxCheckWarning"));
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
this.formConfig[this.curEventName] = this.formEventHandlerCode;
|
|
165
|
-
this.showFormEventDialogFlag = false;
|
|
166
162
|
}
|
|
167
163
|
}
|
|
168
164
|
};
|
|
@@ -176,11 +172,6 @@ const _hoisted_3 = {
|
|
|
176
172
|
class: ""
|
|
177
173
|
};
|
|
178
174
|
const _hoisted_4 = { class: "dialog-footer" };
|
|
179
|
-
const _hoisted_5 = {
|
|
180
|
-
key: 2,
|
|
181
|
-
class: ""
|
|
182
|
-
};
|
|
183
|
-
const _hoisted_6 = { class: "dialog-footer" };
|
|
184
175
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
185
176
|
const _component_a_select = resolveComponent("a-select");
|
|
186
177
|
const _component_a_form_item = resolveComponent("a-form-item");
|
|
@@ -188,10 +179,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
188
179
|
const _component_a_radio_group = resolveComponent("a-radio-group");
|
|
189
180
|
const _component_a_input_number = resolveComponent("a-input-number");
|
|
190
181
|
const _component_a_button = resolveComponent("a-button");
|
|
182
|
+
const _component_a_input = resolveComponent("a-input");
|
|
183
|
+
const _component_a_switch = resolveComponent("a-switch");
|
|
191
184
|
const _component_a_collapse_panel = resolveComponent("a-collapse-panel");
|
|
185
|
+
const _component_MethodItem = resolveComponent("MethodItem");
|
|
192
186
|
const _component_a_collapse = resolveComponent("a-collapse");
|
|
193
187
|
const _component_a_form = resolveComponent("a-form");
|
|
194
|
-
const _component_a_alert = resolveComponent("a-alert");
|
|
195
188
|
const _component_code_editor = resolveComponent("code-editor");
|
|
196
189
|
const _component_a_modal = resolveComponent("a-modal");
|
|
197
190
|
return openBlock(), createElementBlock("div", null, [
|
|
@@ -200,13 +193,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
200
193
|
labelAlign: "left",
|
|
201
194
|
"label-width": "120px",
|
|
202
195
|
class: "setting-form tpf-form",
|
|
203
|
-
onSubmit: _cache[
|
|
196
|
+
onSubmit: _cache[15] || (_cache[15] = withModifiers(() => {
|
|
204
197
|
}, ["prevent"]))
|
|
205
198
|
}, {
|
|
206
199
|
default: withCtx(() => [
|
|
207
200
|
createVNode(_component_a_collapse, {
|
|
208
201
|
activeKey: $data.formActiveCollapseNames,
|
|
209
|
-
"onUpdate:activeKey": _cache[
|
|
202
|
+
"onUpdate:activeKey": _cache[14] || (_cache[14] = ($event) => $data.formActiveCollapseNames = $event),
|
|
210
203
|
class: "setting-collapse"
|
|
211
204
|
}, {
|
|
212
205
|
default: withCtx(() => [
|
|
@@ -348,81 +341,106 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
348
341
|
}, 8, ["class", "onClick"])
|
|
349
342
|
]),
|
|
350
343
|
_: 1
|
|
351
|
-
}, 8, ["label"])
|
|
352
|
-
]),
|
|
353
|
-
_: 1
|
|
354
|
-
}, 8, ["header"]),
|
|
355
|
-
$options.showEventCollapse() ? (openBlock(), createBlock(_component_a_collapse_panel, {
|
|
356
|
-
key: "2",
|
|
357
|
-
class: "eventPanel",
|
|
358
|
-
header: _ctx.i18nt("designer.setting.事件属性")
|
|
359
|
-
}, {
|
|
360
|
-
default: withCtx(() => [
|
|
344
|
+
}, 8, ["label"]),
|
|
361
345
|
createVNode(_component_a_form_item, {
|
|
362
|
-
label: "
|
|
363
|
-
"label-width": "150px"
|
|
346
|
+
label: _ctx.i18nt("designer.setting.cancelButtonLabel")
|
|
364
347
|
}, {
|
|
365
348
|
default: withCtx(() => [
|
|
366
|
-
createVNode(
|
|
367
|
-
type: "
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
$options.getFormEventHandled("onFormCreated") ? "button-text-highlight" : ""
|
|
372
|
-
]),
|
|
373
|
-
onClick: _cache[5] || (_cache[5] = ($event) => $options.editFormEventHandler("onFormCreated"))
|
|
374
|
-
}, {
|
|
375
|
-
default: withCtx(() => [
|
|
376
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addEventHandler")), 1)
|
|
377
|
-
]),
|
|
378
|
-
_: 1
|
|
379
|
-
}, 8, ["class"])
|
|
349
|
+
createVNode(_component_a_input, {
|
|
350
|
+
type: "text",
|
|
351
|
+
value: $props.formConfig.cancelButtonLabel,
|
|
352
|
+
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => $props.formConfig.cancelButtonLabel = $event)
|
|
353
|
+
}, null, 8, ["value"])
|
|
380
354
|
]),
|
|
381
355
|
_: 1
|
|
382
|
-
}),
|
|
356
|
+
}, 8, ["label"]),
|
|
383
357
|
createVNode(_component_a_form_item, {
|
|
384
|
-
label: "
|
|
385
|
-
"label-width": "150px"
|
|
358
|
+
label: _ctx.i18nt("designer.setting.cancelButtonHidden")
|
|
386
359
|
}, {
|
|
387
360
|
default: withCtx(() => [
|
|
388
|
-
createVNode(
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
onClick: _cache[6] || (_cache[6] = ($event) => $options.editFormEventHandler("onFormMounted"))
|
|
395
|
-
}, {
|
|
396
|
-
default: withCtx(() => [
|
|
397
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addEventHandler")), 1)
|
|
398
|
-
]),
|
|
399
|
-
_: 1
|
|
400
|
-
}, 8, ["class"])
|
|
361
|
+
createVNode(_component_a_switch, {
|
|
362
|
+
checkedValue: 0,
|
|
363
|
+
unCheckedValue: 1,
|
|
364
|
+
checked: $props.formConfig.cancelButtonHidden,
|
|
365
|
+
"onUpdate:checked": _cache[6] || (_cache[6] = ($event) => $props.formConfig.cancelButtonHidden = $event)
|
|
366
|
+
}, null, 8, ["checked"])
|
|
401
367
|
]),
|
|
402
368
|
_: 1
|
|
403
|
-
}),
|
|
369
|
+
}, 8, ["label"]),
|
|
404
370
|
createVNode(_component_a_form_item, {
|
|
405
|
-
label: "
|
|
406
|
-
"label-width": "150px"
|
|
371
|
+
label: _ctx.i18nt("designer.setting.okButtonLabel")
|
|
407
372
|
}, {
|
|
408
373
|
default: withCtx(() => [
|
|
409
|
-
createVNode(
|
|
410
|
-
type: "
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
374
|
+
createVNode(_component_a_input, {
|
|
375
|
+
type: "text",
|
|
376
|
+
value: $props.formConfig.okButtonLabel,
|
|
377
|
+
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => $props.formConfig.okButtonLabel = $event)
|
|
378
|
+
}, null, 8, ["value"])
|
|
379
|
+
]),
|
|
380
|
+
_: 1
|
|
381
|
+
}, 8, ["label"]),
|
|
382
|
+
createVNode(_component_a_form_item, {
|
|
383
|
+
label: _ctx.i18nt("designer.setting.okButtonHidden")
|
|
384
|
+
}, {
|
|
385
|
+
default: withCtx(() => [
|
|
386
|
+
createVNode(_component_a_switch, {
|
|
387
|
+
checkedValue: 0,
|
|
388
|
+
unCheckedValue: 1,
|
|
389
|
+
checked: $props.formConfig.okButtonHidden,
|
|
390
|
+
"onUpdate:checked": _cache[8] || (_cache[8] = ($event) => $props.formConfig.okButtonHidden = $event)
|
|
391
|
+
}, null, 8, ["checked"])
|
|
423
392
|
]),
|
|
424
393
|
_: 1
|
|
425
|
-
})
|
|
394
|
+
}, 8, ["label"])
|
|
395
|
+
]),
|
|
396
|
+
_: 1
|
|
397
|
+
}, 8, ["header"]),
|
|
398
|
+
$options.showEventCollapse() ? (openBlock(), createBlock(_component_a_collapse_panel, {
|
|
399
|
+
key: "2",
|
|
400
|
+
class: "eventPanel",
|
|
401
|
+
header: _ctx.i18nt("designer.setting.事件属性")
|
|
402
|
+
}, {
|
|
403
|
+
default: withCtx(() => [
|
|
404
|
+
createVNode(_component_MethodItem, {
|
|
405
|
+
"event-name": "onFormCreated",
|
|
406
|
+
value: $props.formConfig.onFormCreated,
|
|
407
|
+
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => $props.formConfig.onFormCreated = $event),
|
|
408
|
+
"get-form-event-handled": $options.getFormEventHandled,
|
|
409
|
+
"event-params-map": $data.eventParamsMap,
|
|
410
|
+
"form-config": $props.formConfig
|
|
411
|
+
}, null, 8, ["value", "get-form-event-handled", "event-params-map", "form-config"]),
|
|
412
|
+
createVNode(_component_MethodItem, {
|
|
413
|
+
value: $props.formConfig.onFormMounted,
|
|
414
|
+
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => $props.formConfig.onFormMounted = $event),
|
|
415
|
+
"event-name": "onFormMounted",
|
|
416
|
+
"get-form-event-handled": $options.getFormEventHandled,
|
|
417
|
+
"event-params-map": $data.eventParamsMap,
|
|
418
|
+
"form-config": $props.formConfig
|
|
419
|
+
}, null, 8, ["value", "get-form-event-handled", "event-params-map", "form-config"]),
|
|
420
|
+
createVNode(_component_MethodItem, {
|
|
421
|
+
value: $props.formConfig.onFormDataChange,
|
|
422
|
+
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => $props.formConfig.onFormDataChange = $event),
|
|
423
|
+
"event-name": "onFormDataChange",
|
|
424
|
+
"get-form-event-handled": $options.getFormEventHandled,
|
|
425
|
+
"event-params-map": $data.eventParamsMap,
|
|
426
|
+
"form-config": $props.formConfig
|
|
427
|
+
}, null, 8, ["value", "get-form-event-handled", "event-params-map", "form-config"]),
|
|
428
|
+
createVNode(_component_MethodItem, {
|
|
429
|
+
value: $props.formConfig.onOkButtonClick,
|
|
430
|
+
"onUpdate:value": _cache[12] || (_cache[12] = ($event) => $props.formConfig.onOkButtonClick = $event),
|
|
431
|
+
"event-name": "onOkButtonClick",
|
|
432
|
+
"get-form-event-handled": $options.getFormEventHandled,
|
|
433
|
+
"event-params-map": $data.eventParamsMap,
|
|
434
|
+
"form-config": $props.formConfig
|
|
435
|
+
}, null, 8, ["value", "get-form-event-handled", "event-params-map", "form-config"]),
|
|
436
|
+
createVNode(_component_MethodItem, {
|
|
437
|
+
value: $props.formConfig.onCancelButtonClick,
|
|
438
|
+
"onUpdate:value": _cache[13] || (_cache[13] = ($event) => $props.formConfig.onCancelButtonClick = $event),
|
|
439
|
+
"event-name": "onCancelButtonClick",
|
|
440
|
+
"get-form-event-handled": $options.getFormEventHandled,
|
|
441
|
+
"event-params-map": $data.eventParamsMap,
|
|
442
|
+
"form-config": $props.formConfig
|
|
443
|
+
}, null, 8, ["value", "get-form-event-handled", "event-params-map", "form-config"])
|
|
426
444
|
]),
|
|
427
445
|
_: 1
|
|
428
446
|
}, 8, ["header"])) : createCommentVNode("", true)
|
|
@@ -432,67 +450,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
450
|
]),
|
|
433
451
|
_: 1
|
|
434
452
|
}, 8, ["model"]),
|
|
435
|
-
$data.
|
|
436
|
-
createVNode(_component_a_modal, {
|
|
437
|
-
title: _ctx.i18nt("designer.setting.editFormEventHandler"),
|
|
438
|
-
visible: $data.showFormEventDialogFlag,
|
|
439
|
-
"onUpdate:visible": _cache[12] || (_cache[12] = ($event) => $data.showFormEventDialogFlag = $event),
|
|
440
|
-
"show-close": true,
|
|
441
|
-
"custom-class": "drag-dialog small-padding-dialog",
|
|
442
|
-
"append-to-body": "",
|
|
443
|
-
"close-on-click-modal": false,
|
|
444
|
-
"close-on-press-escape": false,
|
|
445
|
-
"destroy-on-close": true,
|
|
446
|
-
width: 800
|
|
447
|
-
}, {
|
|
448
|
-
footer: withCtx(() => [
|
|
449
|
-
createElementVNode("div", _hoisted_2, [
|
|
450
|
-
createVNode(_component_a_button, {
|
|
451
|
-
onClick: _cache[11] || (_cache[11] = ($event) => $data.showFormEventDialogFlag = false)
|
|
452
|
-
}, {
|
|
453
|
-
default: withCtx(() => [
|
|
454
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
455
|
-
]),
|
|
456
|
-
_: 1
|
|
457
|
-
}),
|
|
458
|
-
createVNode(_component_a_button, {
|
|
459
|
-
type: "primary",
|
|
460
|
-
onClick: $options.saveFormEventHandler
|
|
461
|
-
}, {
|
|
462
|
-
default: withCtx(() => [
|
|
463
|
-
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.confirm")), 1)
|
|
464
|
-
]),
|
|
465
|
-
_: 1
|
|
466
|
-
}, 8, ["onClick"])
|
|
467
|
-
])
|
|
468
|
-
]),
|
|
469
|
-
default: withCtx(() => [
|
|
470
|
-
createVNode(_component_a_alert, {
|
|
471
|
-
type: "info",
|
|
472
|
-
closable: false,
|
|
473
|
-
message: "form." + $data.eventParamsMap[$data.curEventName]
|
|
474
|
-
}, null, 8, ["message"]),
|
|
475
|
-
createVNode(_component_code_editor, {
|
|
476
|
-
mode: "javascript",
|
|
477
|
-
readonly: false,
|
|
478
|
-
modelValue: $data.formEventHandlerCode,
|
|
479
|
-
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.formEventHandlerCode = $event),
|
|
480
|
-
ref: "ecEditor"
|
|
481
|
-
}, null, 8, ["modelValue"]),
|
|
482
|
-
createVNode(_component_a_alert, {
|
|
483
|
-
type: "info",
|
|
484
|
-
closable: false,
|
|
485
|
-
message: "}"
|
|
486
|
-
})
|
|
487
|
-
]),
|
|
488
|
-
_: 1
|
|
489
|
-
}, 8, ["title", "visible"])
|
|
490
|
-
])) : createCommentVNode("", true),
|
|
491
|
-
$data.showEditFormCssDialogFlag ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
453
|
+
$data.showEditFormCssDialogFlag ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
492
454
|
createVNode(_component_a_modal, {
|
|
493
455
|
title: _ctx.i18nt("designer.setting.formCss"),
|
|
494
456
|
visible: $data.showEditFormCssDialogFlag,
|
|
495
|
-
"onUpdate:visible": _cache[
|
|
457
|
+
"onUpdate:visible": _cache[18] || (_cache[18] = ($event) => $data.showEditFormCssDialogFlag = $event),
|
|
496
458
|
"show-close": true,
|
|
497
459
|
"custom-class": "drag-dialog small-padding-dialog",
|
|
498
460
|
"append-to-body": "",
|
|
@@ -501,9 +463,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
501
463
|
"destroy-on-close": true
|
|
502
464
|
}, {
|
|
503
465
|
footer: withCtx(() => [
|
|
504
|
-
createElementVNode("div",
|
|
466
|
+
createElementVNode("div", _hoisted_2, [
|
|
505
467
|
createVNode(_component_a_button, {
|
|
506
|
-
onClick: _cache[
|
|
468
|
+
onClick: _cache[17] || (_cache[17] = ($event) => $data.showEditFormCssDialogFlag = false)
|
|
507
469
|
}, {
|
|
508
470
|
default: withCtx(() => [
|
|
509
471
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
@@ -526,17 +488,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
526
488
|
mode: "css",
|
|
527
489
|
readonly: false,
|
|
528
490
|
modelValue: $data.formCssCode,
|
|
529
|
-
"onUpdate:modelValue": _cache[
|
|
491
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.formCssCode = $event)
|
|
530
492
|
}, null, 8, ["modelValue"])
|
|
531
493
|
]),
|
|
532
494
|
_: 1
|
|
533
495
|
}, 8, ["title", "visible"])
|
|
534
496
|
])) : createCommentVNode("", true),
|
|
535
|
-
$data.showEditFunctionsDialogFlag ? (openBlock(), createElementBlock("div",
|
|
497
|
+
$data.showEditFunctionsDialogFlag ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
536
498
|
createVNode(_component_a_modal, {
|
|
537
499
|
title: _ctx.i18nt("designer.setting.globalFunctions"),
|
|
538
500
|
visible: $data.showEditFunctionsDialogFlag,
|
|
539
|
-
"onUpdate:visible": _cache[
|
|
501
|
+
"onUpdate:visible": _cache[21] || (_cache[21] = ($event) => $data.showEditFunctionsDialogFlag = $event),
|
|
540
502
|
width: 600,
|
|
541
503
|
"show-close": true,
|
|
542
504
|
"custom-class": "drag-dialog small-padding-dialog",
|
|
@@ -546,9 +508,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
546
508
|
"destroy-on-close": true
|
|
547
509
|
}, {
|
|
548
510
|
footer: withCtx(() => [
|
|
549
|
-
createElementVNode("div",
|
|
511
|
+
createElementVNode("div", _hoisted_4, [
|
|
550
512
|
createVNode(_component_a_button, {
|
|
551
|
-
onClick: _cache[
|
|
513
|
+
onClick: _cache[20] || (_cache[20] = ($event) => $data.showEditFunctionsDialogFlag = false)
|
|
552
514
|
}, {
|
|
553
515
|
default: withCtx(() => [
|
|
554
516
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
@@ -571,7 +533,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
571
533
|
mode: "javascript",
|
|
572
534
|
readonly: false,
|
|
573
535
|
modelValue: $data.functionsCode,
|
|
574
|
-
"onUpdate:modelValue": _cache[
|
|
536
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => $data.functionsCode = $event),
|
|
575
537
|
ref: "gfEditor"
|
|
576
538
|
}, null, 8, ["modelValue"])
|
|
577
539
|
]),
|
package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js
CHANGED
|
@@ -30,14 +30,13 @@ const _sfc_main = {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
methods: {
|
|
33
|
-
onButtonNameChange() {
|
|
34
|
-
console.log(1221);
|
|
35
|
-
},
|
|
36
33
|
addOperationButton() {
|
|
37
34
|
this.buttonList.splice(0, 0, {
|
|
38
35
|
key: generateId(),
|
|
39
36
|
label: "new btn",
|
|
40
37
|
type: "primary",
|
|
38
|
+
danger: false,
|
|
39
|
+
icon: "",
|
|
41
40
|
onHidden: "",
|
|
42
41
|
onDisabled: "",
|
|
43
42
|
onClick: ""
|
|
@@ -66,6 +65,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
66
65
|
const _component_STableColumn = resolveComponent("STableColumn");
|
|
67
66
|
const _component_a_select_option = resolveComponent("a-select-option");
|
|
68
67
|
const _component_a_select = resolveComponent("a-select");
|
|
68
|
+
const _component_a_switch = resolveComponent("a-switch");
|
|
69
69
|
const _component_STable = resolveComponent("STable");
|
|
70
70
|
const _component_a_modal = resolveComponent("a-modal");
|
|
71
71
|
const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
|
|
@@ -186,6 +186,35 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
186
186
|
]),
|
|
187
187
|
_: 1
|
|
188
188
|
}, 8, ["title"]),
|
|
189
|
+
createVNode(_component_STableColumn, {
|
|
190
|
+
dataIndex: "size",
|
|
191
|
+
title: _ctx.i18nt("designer.setting.danger"),
|
|
192
|
+
width: 120
|
|
193
|
+
}, {
|
|
194
|
+
default: withCtx(({ index }) => [
|
|
195
|
+
createVNode(_component_a_switch, {
|
|
196
|
+
checkedValue: 1,
|
|
197
|
+
unCheckedValue: 0,
|
|
198
|
+
checked: $data.buttonList[index].danger,
|
|
199
|
+
"onUpdate:checked": ($event) => $data.buttonList[index].danger = $event
|
|
200
|
+
}, null, 8, ["checked", "onUpdate:checked"])
|
|
201
|
+
]),
|
|
202
|
+
_: 1
|
|
203
|
+
}, 8, ["title"]),
|
|
204
|
+
createVNode(_component_STableColumn, {
|
|
205
|
+
dataIndex: "size",
|
|
206
|
+
title: _ctx.i18nt("designer.setting.buttonIcon"),
|
|
207
|
+
width: 120
|
|
208
|
+
}, {
|
|
209
|
+
default: withCtx(({ index }) => [
|
|
210
|
+
createVNode(_component_a_input, {
|
|
211
|
+
type: "text",
|
|
212
|
+
value: $data.buttonList[index].icon,
|
|
213
|
+
"onUpdate:value": ($event) => $data.buttonList[index].icon = $event
|
|
214
|
+
}, null, 8, ["value", "onUpdate:value"])
|
|
215
|
+
]),
|
|
216
|
+
_: 1
|
|
217
|
+
}, 8, ["title"]),
|
|
189
218
|
createVNode(_component_STableColumn, {
|
|
190
219
|
dataIndex: "onHidden",
|
|
191
220
|
title: _ctx.i18nt("designer.setting.operationButtonHidden"),
|
|
@@ -288,7 +317,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
288
317
|
}, null, 8, ["modelValue", "event-header"])
|
|
289
318
|
], 64);
|
|
290
319
|
}
|
|
291
|
-
const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
320
|
+
const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-77f39703"]]);
|
|
292
321
|
export {
|
|
293
322
|
buttonListEditor as default
|
|
294
323
|
};
|
package/src/components/form-designer/setting-panel/property-editor/button-postion-editor.vue.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _sfc_main from "./button-postion-editor.vue2.js";
|
|
2
|
+
import { resolveComponent, createBlock, openBlock, withCtx, createVNode } from "vue";
|
|
3
|
+
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_a_select = resolveComponent("a-select");
|
|
6
|
+
const _component_a_form_item = resolveComponent("a-form-item");
|
|
7
|
+
return openBlock(), createBlock(_component_a_form_item, {
|
|
8
|
+
label: _ctx.i18nt("designer.setting.buttonPosition")
|
|
9
|
+
}, {
|
|
10
|
+
default: withCtx(() => [
|
|
11
|
+
createVNode(_component_a_select, {
|
|
12
|
+
options: _ctx.BUTTON_POSITION,
|
|
13
|
+
value: _ctx.optionModel.buttonPosition,
|
|
14
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.optionModel.buttonPosition = $event)
|
|
15
|
+
}, null, 8, ["options", "value"])
|
|
16
|
+
]),
|
|
17
|
+
_: 1
|
|
18
|
+
}, 8, ["label"]);
|
|
19
|
+
}
|
|
20
|
+
const buttonPostionEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
21
|
+
export {
|
|
22
|
+
buttonPostionEditor as default
|
|
23
|
+
};
|
package/src/components/form-designer/setting-panel/property-editor/button-postion-editor.vue2.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import i18n from "../../../../utils/i18n.js";
|
|
2
|
+
import { BUTTON_POSITION } from "../../../../constants/index.js";
|
|
3
|
+
import { defineComponent } from "vue";
|
|
4
|
+
const _sfc_main = defineComponent({
|
|
5
|
+
name: "button-position-editor",
|
|
6
|
+
mixins: [i18n],
|
|
7
|
+
props: {
|
|
8
|
+
optionModel: Object
|
|
9
|
+
},
|
|
10
|
+
setup(props) {
|
|
11
|
+
return { BUTTON_POSITION };
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
_sfc_main as default
|
|
16
|
+
};
|
|
@@ -50,7 +50,9 @@ const _sfc_main = {
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
if (sameNameFlag) {
|
|
53
|
-
this.$message.error(
|
|
53
|
+
this.$message.error(
|
|
54
|
+
this.i18nt("designer.setting.operationButtonDuplicatedNameError")
|
|
55
|
+
);
|
|
54
56
|
this.optionModel.operationButtons[btnIdx].name = this.oldButtonName;
|
|
55
57
|
}
|
|
56
58
|
},
|
|
@@ -71,7 +73,7 @@ const _sfc_main = {
|
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
};
|
|
74
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
76
|
+
const _withScopeId = (n) => (pushScopeId("data-v-2884d0b4"), n = n(), popScopeId(), n);
|
|
75
77
|
const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("i", { class: "iconfont icon-drag drag-handler" }, null, -1));
|
|
76
78
|
const _hoisted_2 = { class: "dialog-footer" };
|
|
77
79
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -539,7 +541,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
539
541
|
}, null, 8, ["modelValue", "event-header"])
|
|
540
542
|
], 64);
|
|
541
543
|
}
|
|
542
|
-
const dataTableShowButtonsColumnEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
544
|
+
const dataTableShowButtonsColumnEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2884d0b4"]]);
|
|
543
545
|
export {
|
|
544
546
|
dataTableShowButtonsColumnEditor as default
|
|
545
547
|
};
|