@kp-ui/lowcode 1.0.42 → 1.0.43
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 +1 -1
- 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/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 +108 -0
- package/src/components/form-render/SubmitButtonRender.vue2.js +4 -0
- package/src/components/form-render/dynamic-dialog.vue.js +87 -33
- 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/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 +58 -0
- package/types/src/components/form-render/SubmitButtonRender.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,13 +1,13 @@
|
|
|
1
1
|
if (typeof window !== "undefined") {
|
|
2
2
|
let loadSvg = function() {
|
|
3
3
|
var body = document.body;
|
|
4
|
-
var svgDom = document.getElementById("
|
|
4
|
+
var svgDom = document.getElementById("__svg__icons__dom__1747706782590__");
|
|
5
5
|
if (!svgDom) {
|
|
6
6
|
svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7
7
|
svgDom.style.position = "absolute";
|
|
8
8
|
svgDom.style.width = "0";
|
|
9
9
|
svgDom.style.height = "0";
|
|
10
|
-
svgDom.id = "
|
|
10
|
+
svgDom.id = "__svg__icons__dom__1747706782590__";
|
|
11
11
|
svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
12
12
|
svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
|
|
13
13
|
}
|
package/designer.js
CHANGED
|
@@ -4,10 +4,9 @@ import SettingPanel from "./src/components/form-designer/setting-panel/index.vue
|
|
|
4
4
|
import VFormWidget from "./src/components/form-designer/form-widget/index.vue.js";
|
|
5
5
|
import { createDesigner } from "./src/components/form-designer/designer.js";
|
|
6
6
|
import { traverseAllWidgets, getAllContainerWidgets, getAllFieldWidgets, deepClone, addWindowResizeHandler } from "./src/utils/util.js";
|
|
7
|
-
import { VARIANT_FORM_VERSION } from "./src/utils/config.js";
|
|
8
7
|
import i18n, { changeLocale } from "./src/utils/i18n.js";
|
|
9
8
|
import { isEmpty } from "lodash-es";
|
|
10
|
-
import { resolveComponent, createBlock, openBlock, withCtx,
|
|
9
|
+
import { resolveComponent, createBlock, openBlock, withCtx, createVNode, createSlots, renderList, renderSlot, createElementVNode } from "vue";
|
|
11
10
|
/* empty css */
|
|
12
11
|
import _export_sfc from "./_virtual/_plugin-vue_export-helper.js";
|
|
13
12
|
const _sfc_main = {
|
|
@@ -81,7 +80,6 @@ const _sfc_main = {
|
|
|
81
80
|
return {
|
|
82
81
|
leftWidth: 270,
|
|
83
82
|
rightWidth: 300,
|
|
84
|
-
vFormVersion: VARIANT_FORM_VERSION,
|
|
85
83
|
curLangName: "",
|
|
86
84
|
curLocale: "",
|
|
87
85
|
isLoading: false,
|
|
@@ -192,8 +190,11 @@ const _sfc_main = {
|
|
|
192
190
|
return;
|
|
193
191
|
}
|
|
194
192
|
},
|
|
193
|
+
changeLanguage(langName) {
|
|
194
|
+
changeLocale(langName);
|
|
195
|
+
},
|
|
195
196
|
initLocale() {
|
|
196
|
-
this.curLocale = localStorage.getItem("
|
|
197
|
+
this.curLocale = localStorage.getItem("lowcode_local");
|
|
197
198
|
if (!!this.vsCodeFlag) {
|
|
198
199
|
this.curLocale = this.curLocale || "en-US";
|
|
199
200
|
} else {
|
|
@@ -209,13 +210,6 @@ const _sfc_main = {
|
|
|
209
210
|
this.fieldList = await this.fieldListApi();
|
|
210
211
|
console.log("this.fieldList: ", this.fieldList);
|
|
211
212
|
},
|
|
212
|
-
handleLanguageChanged(command) {
|
|
213
|
-
this.changeLanguage(command);
|
|
214
|
-
this.curLangName = this.i18nt("application." + command);
|
|
215
|
-
},
|
|
216
|
-
changeLanguage(langName) {
|
|
217
|
-
changeLocale(langName);
|
|
218
|
-
},
|
|
219
213
|
setFormJson(formJson) {
|
|
220
214
|
console.log("formJson: ", formJson);
|
|
221
215
|
let modifiedFlag = false;
|
|
@@ -346,21 +340,18 @@ const _sfc_main = {
|
|
|
346
340
|
//TODO: 增加更多方法!!
|
|
347
341
|
}
|
|
348
342
|
};
|
|
349
|
-
const
|
|
343
|
+
const _hoisted_1 = { class: "container-scroll-bar" };
|
|
350
344
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
351
|
-
resolveComponent("
|
|
352
|
-
resolveComponent("a-select");
|
|
353
|
-
const _component_a_layout_header = resolveComponent("a-layout-header");
|
|
354
|
-
const _component_widget_panel = resolveComponent("widget-panel");
|
|
345
|
+
const _component_WidgetPanel = resolveComponent("WidgetPanel");
|
|
355
346
|
const _component_a_layout_sider = resolveComponent("a-layout-sider");
|
|
356
347
|
const _component_toolbar_panel = resolveComponent("toolbar-panel");
|
|
357
|
-
const
|
|
348
|
+
const _component_a_layout_header = resolveComponent("a-layout-header");
|
|
349
|
+
const _component_VFormWidget = resolveComponent("VFormWidget");
|
|
358
350
|
const _component_a_layout_content = resolveComponent("a-layout-content");
|
|
359
351
|
const _component_setting_panel = resolveComponent("setting-panel");
|
|
360
352
|
const _component_a_layout = resolveComponent("a-layout");
|
|
361
353
|
return openBlock(), createBlock(_component_a_layout, { class: "main-container full-height" }, {
|
|
362
354
|
default: withCtx(() => [
|
|
363
|
-
createCommentVNode("", true),
|
|
364
355
|
createVNode(_component_a_layout, null, {
|
|
365
356
|
default: withCtx(() => [
|
|
366
357
|
createVNode(_component_a_layout_sider, {
|
|
@@ -368,7 +359,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
368
359
|
class: "side-panel"
|
|
369
360
|
}, {
|
|
370
361
|
default: withCtx(() => [
|
|
371
|
-
createVNode(
|
|
362
|
+
createVNode(_component_WidgetPanel, { designer: $data.designer }, null, 8, ["designer"])
|
|
372
363
|
]),
|
|
373
364
|
_: 1
|
|
374
365
|
}, 8, ["width"]),
|
|
@@ -400,8 +391,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
400
391
|
}),
|
|
401
392
|
createVNode(_component_a_layout_content, { class: "form-widget-main" }, {
|
|
402
393
|
default: withCtx(() => [
|
|
403
|
-
createElementVNode("div",
|
|
404
|
-
createVNode(
|
|
394
|
+
createElementVNode("div", _hoisted_1, [
|
|
395
|
+
createVNode(_component_VFormWidget, {
|
|
405
396
|
designer: $data.designer,
|
|
406
397
|
"form-config": $data.designer.formConfig,
|
|
407
398
|
"global-dsv": $props.globalDsv,
|
|
@@ -433,7 +424,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
424
|
_: 3
|
|
434
425
|
});
|
|
435
426
|
}
|
|
436
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
427
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-03be64be"]]);
|
|
437
428
|
export {
|
|
438
429
|
index as default
|
|
439
430
|
};
|
package/index.js
CHANGED
|
@@ -16,7 +16,9 @@ import { default as default10 } from "./src/components/form-render/container-ite
|
|
|
16
16
|
import { default as default11 } from "./src/components/form-designer/form-widget/field-widget/static-content-wrapper.vue.js";
|
|
17
17
|
import { default as default12 } from "./src/components/form-designer/form-widget/field-widget/form-item-wrapper.vue.js";
|
|
18
18
|
import { default as default13 } from "./src/components/form-designer/form-widget/field-widget/fieldMixin.js";
|
|
19
|
-
import { default as default14 } from "./src/
|
|
19
|
+
import { default as default14 } from "./src/components/form-render/dynamic-dialog.vue.js";
|
|
20
|
+
import { default as default15 } from "./src/components/form-render/SubmitButtonRender.vue.js";
|
|
21
|
+
import { default as default16 } from "./src/utils/emitter.js";
|
|
20
22
|
const registerLowcodeCore = (params) => {
|
|
21
23
|
const { app, http, factoryRender } = params;
|
|
22
24
|
app.config.globalProperties.$http = http;
|
|
@@ -33,9 +35,11 @@ const registerLowcodeCore = (params) => {
|
|
|
33
35
|
export {
|
|
34
36
|
default9 as ContainerItemWrapper,
|
|
35
37
|
default5 as ContainerWrapper,
|
|
38
|
+
default14 as DynamicDialog,
|
|
36
39
|
default6 as FieldComponents,
|
|
37
40
|
default12 as FormItemWrapper,
|
|
38
41
|
default11 as StaticContentWrapper,
|
|
42
|
+
default15 as SubmitButtonRender,
|
|
39
43
|
default2 as VFormDesigner,
|
|
40
44
|
default3 as VFormRender,
|
|
41
45
|
addAdvancedFieldSchema,
|
|
@@ -45,7 +49,7 @@ export {
|
|
|
45
49
|
basicFieldsEnums,
|
|
46
50
|
default10 as containerItemMixin,
|
|
47
51
|
default4 as containerMixin,
|
|
48
|
-
|
|
52
|
+
default16 as emitter,
|
|
49
53
|
default13 as fieldMixin,
|
|
50
54
|
default8 as refMixin,
|
|
51
55
|
default7 as refMixinDesign,
|
package/package.json
CHANGED
package/render.js
CHANGED
|
@@ -92,6 +92,10 @@ const _sfc_main = {
|
|
|
92
92
|
},
|
|
93
93
|
data() {
|
|
94
94
|
return {
|
|
95
|
+
isClosing: false,
|
|
96
|
+
//是否正在关闭
|
|
97
|
+
isSubmitting: false,
|
|
98
|
+
//是否正在提交中
|
|
95
99
|
formJsonObj: this.formJson,
|
|
96
100
|
formDataModel: {
|
|
97
101
|
//
|
|
@@ -118,6 +122,12 @@ const _sfc_main = {
|
|
|
118
122
|
formConfig() {
|
|
119
123
|
return this.formJsonObj.formConfig;
|
|
120
124
|
},
|
|
125
|
+
cancelBtnLabel() {
|
|
126
|
+
return this.formConfig.cancelButtonLabel || this.i18nt("designer.hint.cancel");
|
|
127
|
+
},
|
|
128
|
+
okBtnLabel() {
|
|
129
|
+
return this.formConfig.okButtonLabel || this.i18nt("designer.hint.confirm");
|
|
130
|
+
},
|
|
121
131
|
widgetList() {
|
|
122
132
|
return this.formJsonObj.widgetList;
|
|
123
133
|
},
|
|
@@ -159,8 +169,44 @@ const _sfc_main = {
|
|
|
159
169
|
setLoading(flag) {
|
|
160
170
|
this.isLoading = flag;
|
|
161
171
|
},
|
|
162
|
-
|
|
163
|
-
|
|
172
|
+
handleCancelClick() {
|
|
173
|
+
if (this.isClosing) return;
|
|
174
|
+
if (!this.handleBeforeClose()) return;
|
|
175
|
+
try {
|
|
176
|
+
this.isClosing = true;
|
|
177
|
+
if (!!this.formConfig.onCancelButtonClick) {
|
|
178
|
+
const customFn = new Function(this.formConfig.onCancelButtonClick);
|
|
179
|
+
const clickResult = customFn.call(this);
|
|
180
|
+
if (clickResult === false) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
this.dialogVisible = false;
|
|
185
|
+
setTimeout(this.deleteWrapperNode, 150);
|
|
186
|
+
} catch (error) {
|
|
187
|
+
console.log("error: ", error);
|
|
188
|
+
} finally {
|
|
189
|
+
this.isClosing = false;
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
async handleOkClick() {
|
|
193
|
+
if (this.isSubmitting) return;
|
|
194
|
+
try {
|
|
195
|
+
this.isSubmitting = true;
|
|
196
|
+
if (!!this.formConfig.onOkButtonClick) {
|
|
197
|
+
const customFn = new Function(this.formConfig.onOkButtonClick);
|
|
198
|
+
const clickResult = await customFn.call(this);
|
|
199
|
+
if (clickResult === false) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
this.dialogVisible = false;
|
|
204
|
+
setTimeout(this.deleteWrapperNode, 150);
|
|
205
|
+
} catch (error) {
|
|
206
|
+
console.log("error: ", error);
|
|
207
|
+
} finally {
|
|
208
|
+
this.isClosing = false;
|
|
209
|
+
}
|
|
164
210
|
},
|
|
165
211
|
async onFormDetail() {
|
|
166
212
|
var _a;
|
|
@@ -195,7 +241,7 @@ const _sfc_main = {
|
|
|
195
241
|
this.addFieldValidateEventHandler();
|
|
196
242
|
this.registerFormToRefList();
|
|
197
243
|
this.handleOnCreated();
|
|
198
|
-
if (
|
|
244
|
+
if (this.disabledMode) {
|
|
199
245
|
this.$nextTick(() => {
|
|
200
246
|
this.disableForm();
|
|
201
247
|
});
|
|
@@ -211,7 +257,7 @@ const _sfc_main = {
|
|
|
211
257
|
return widget.type + "-widget";
|
|
212
258
|
},
|
|
213
259
|
initLocale() {
|
|
214
|
-
const curLocale = localStorage.getItem("
|
|
260
|
+
const curLocale = localStorage.getItem("lowcode_local") || "zh-CN";
|
|
215
261
|
this.changeLanguage(curLocale);
|
|
216
262
|
},
|
|
217
263
|
insertCustomStyleAndScriptNode() {
|
|
@@ -388,6 +434,12 @@ const _sfc_main = {
|
|
|
388
434
|
customFunc.call(this);
|
|
389
435
|
}
|
|
390
436
|
},
|
|
437
|
+
handleOnSubmit() {
|
|
438
|
+
if (!!this.formConfig && !!this.formConfig.handleOnSubmit) {
|
|
439
|
+
const customFunc = new Function(this.formConfig.handleOnSubmit);
|
|
440
|
+
customFunc.call(this);
|
|
441
|
+
}
|
|
442
|
+
},
|
|
391
443
|
handleOnMounted() {
|
|
392
444
|
if (!!this.formConfig && !!this.formConfig.onFormMounted) {
|
|
393
445
|
const customFunc = new Function(this.formConfig.onFormMounted);
|
|
@@ -501,7 +553,7 @@ const _sfc_main = {
|
|
|
501
553
|
changeLocale(langName);
|
|
502
554
|
},
|
|
503
555
|
getLanguageName() {
|
|
504
|
-
return localStorage.getItem("
|
|
556
|
+
return localStorage.getItem("lowcode_local") || "zh-CN";
|
|
505
557
|
},
|
|
506
558
|
getNativeForm() {
|
|
507
559
|
return this.$refs["renderForm"];
|
|
@@ -1004,7 +1056,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1004
1056
|
_: 3
|
|
1005
1057
|
}, 8, ["component-size"]);
|
|
1006
1058
|
}
|
|
1007
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
1059
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dffc3fa7"]]);
|
|
1008
1060
|
export {
|
|
1009
1061
|
index as default
|
|
1010
1062
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { deepClone, getDefaultFormConfig, generateId, overwriteObj } from "../../utils/util.js";
|
|
2
2
|
import { containers, basicFields, advancedFields, customFields } from "./widget-panel/widgetsConfig.js";
|
|
3
|
-
import { VARIANT_FORM_VERSION } from "../../utils/config.js";
|
|
4
3
|
import eventBus from "../../utils/event-bus.js";
|
|
5
4
|
function createDesigner(vueInstance) {
|
|
6
5
|
const defaultFormConfig = deepClone(getDefaultFormConfig());
|
|
@@ -25,11 +24,6 @@ function createDesigner(vueInstance) {
|
|
|
25
24
|
initDesigner(resetFormJson) {
|
|
26
25
|
this.widgetList = [];
|
|
27
26
|
this.formConfig = deepClone(defaultFormConfig);
|
|
28
|
-
console.info(
|
|
29
|
-
`%cVer${VARIANT_FORM_VERSION} %chttps://www.yuque.com/visualdev/vform3`,
|
|
30
|
-
"color:#999;font-size: 12px",
|
|
31
|
-
"color:#333"
|
|
32
|
-
);
|
|
33
27
|
if (!resetFormJson) {
|
|
34
28
|
this.initHistoryData();
|
|
35
29
|
}
|
|
@@ -369,7 +363,9 @@ function createDesigner(vueInstance) {
|
|
|
369
363
|
}
|
|
370
364
|
if (!!colArray[mergedColIdx].widgetList && colArray[mergedColIdx].widgetList.length > 0) {
|
|
371
365
|
if (!colArray[remainedColIdx].widgetList || colArray[remainedColIdx].widgetList.length === 0) {
|
|
372
|
-
colArray[remainedColIdx].widgetList = deepClone(
|
|
366
|
+
colArray[remainedColIdx].widgetList = deepClone(
|
|
367
|
+
colArray[mergedColIdx].widgetList
|
|
368
|
+
);
|
|
373
369
|
}
|
|
374
370
|
}
|
|
375
371
|
const newColspan = colArray[mergedColIdx].options.colspan * 1 + colArray[remainedColIdx].options.colspan * 1;
|
|
@@ -513,7 +509,9 @@ function createDesigner(vueInstance) {
|
|
|
513
509
|
}
|
|
514
510
|
if (unmatchedFlag) {
|
|
515
511
|
this.vueInstance.$message.info(
|
|
516
|
-
this.vueInstance.i18nt(
|
|
512
|
+
this.vueInstance.i18nt(
|
|
513
|
+
"designer.hint.colspanNotConsistentForDeleteEntireColumn"
|
|
514
|
+
)
|
|
517
515
|
);
|
|
518
516
|
return;
|
|
519
517
|
}
|
|
@@ -651,7 +649,9 @@ function createDesigner(vueInstance) {
|
|
|
651
649
|
moveUpWidget(parentList, indexOfParentList) {
|
|
652
650
|
if (!!parentList) {
|
|
653
651
|
if (indexOfParentList === 0) {
|
|
654
|
-
this.vueInstance.$message(
|
|
652
|
+
this.vueInstance.$message(
|
|
653
|
+
this.vueInstance.i18nt("designer.hint.moveUpFirstChildHint")
|
|
654
|
+
);
|
|
655
655
|
return;
|
|
656
656
|
}
|
|
657
657
|
const tempWidget = parentList[indexOfParentList];
|
|
@@ -662,7 +662,9 @@ function createDesigner(vueInstance) {
|
|
|
662
662
|
moveDownWidget(parentList, indexOfParentList) {
|
|
663
663
|
if (!!parentList) {
|
|
664
664
|
if (indexOfParentList === parentList.length - 1) {
|
|
665
|
-
this.vueInstance.$message(
|
|
665
|
+
this.vueInstance.$message(
|
|
666
|
+
this.vueInstance.i18nt("designer.hint.moveDownLastChildHint")
|
|
667
|
+
);
|
|
666
668
|
return;
|
|
667
669
|
}
|
|
668
670
|
const tempWidget = parentList[indexOfParentList];
|
|
@@ -812,7 +814,10 @@ function createDesigner(vueInstance) {
|
|
|
812
814
|
};
|
|
813
815
|
this.saveFormContentToStorage();
|
|
814
816
|
if (this.historyData.index < this.historyData.steps.length - 1) {
|
|
815
|
-
this.historyData.steps = this.historyData.steps.slice(
|
|
817
|
+
this.historyData.steps = this.historyData.steps.slice(
|
|
818
|
+
0,
|
|
819
|
+
this.historyData.index + 1
|
|
820
|
+
);
|
|
816
821
|
}
|
|
817
822
|
},
|
|
818
823
|
saveCurrentHistoryStep() {
|
|
@@ -2,7 +2,8 @@ import StaticContentWrapper from "./static-content-wrapper.vue.js";
|
|
|
2
2
|
import emitter from "../../../../utils/emitter.js";
|
|
3
3
|
import i18n from "../../../../utils/i18n.js";
|
|
4
4
|
import fieldMixin from "./fieldMixin.js";
|
|
5
|
-
import
|
|
5
|
+
import SvgIcon from "../../../svg-icon/index.vue.js";
|
|
6
|
+
import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, createVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
8
9
|
const _sfc_main = {
|
|
@@ -40,6 +41,7 @@ const _sfc_main = {
|
|
|
40
41
|
return {};
|
|
41
42
|
},
|
|
42
43
|
components: {
|
|
44
|
+
SvgIcon,
|
|
43
45
|
StaticContentWrapper
|
|
44
46
|
},
|
|
45
47
|
computed: {
|
|
@@ -92,6 +94,7 @@ const _sfc_main = {
|
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
96
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
97
|
+
const _component_SvgIcon = resolveComponent("SvgIcon");
|
|
95
98
|
const _component_a_button = resolveComponent("a-button");
|
|
96
99
|
const _component_a_space = resolveComponent("a-space");
|
|
97
100
|
const _component_static_content_wrapper = resolveComponent("static-content-wrapper");
|
|
@@ -118,14 +121,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
121
|
return openBlock(), createBlock(_component_a_button, {
|
|
119
122
|
key: item.key,
|
|
120
123
|
type: item.type,
|
|
124
|
+
danger: item.danger,
|
|
121
125
|
disabled: $options.handleDisabled(item),
|
|
122
126
|
onClick: ($event) => $options.hanldeClick(item)
|
|
123
127
|
}, {
|
|
124
128
|
default: withCtx(() => [
|
|
125
|
-
|
|
129
|
+
item.icon ? (openBlock(), createBlock(_component_SvgIcon, {
|
|
130
|
+
key: 0,
|
|
131
|
+
"icon-class": item.icon
|
|
132
|
+
}, null, 8, ["icon-class"])) : createCommentVNode("", true),
|
|
133
|
+
createTextVNode(" " + toDisplayString(item.label), 1)
|
|
126
134
|
]),
|
|
127
135
|
_: 2
|
|
128
|
-
}, 1032, ["type", "disabled", "onClick"]);
|
|
136
|
+
}, 1032, ["type", "danger", "disabled", "onClick"]);
|
|
129
137
|
}), 128))
|
|
130
138
|
]),
|
|
131
139
|
_: 1
|
|
@@ -135,7 +143,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
135
143
|
_: 1
|
|
136
144
|
}, 8, ["designer", "field", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
|
|
137
145
|
}
|
|
138
|
-
const buttonListWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
146
|
+
const buttonListWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7e133232"]]);
|
|
139
147
|
export {
|
|
140
148
|
buttonListWidget as default
|
|
141
149
|
};
|