@fecp/designer 5.3.12 → 5.3.14
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/es/designer.css +165 -87
- package/es/packages/designer/package.json.mjs +1 -1
- package/es/packages/designer/src/api/index.mjs +3 -3
- package/es/packages/designer/src/components/OnlyFLowConfigButton.vue2.mjs +8 -3
- package/es/packages/designer/src/packages/form/property/index.vue.mjs +6 -6
- package/es/packages/designer/src/packages/form/property/subTable.vue.mjs +211 -57
- package/es/packages/designer/src/packages/form/property/widgets.vue.mjs +21 -4
- package/es/packages/designer/src/packages/table/property/customBtn.vue.mjs +10 -0
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +2 -2
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +4 -3
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +58 -29
- package/es/packages/vue/src/components/table/CustomButtons.vue.mjs +29 -3
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +21 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +27 -12
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +26 -16
- package/lib/designer.css +165 -87
- package/lib/packages/designer/package.json.js +1 -1
- package/lib/packages/designer/src/api/index.js +3 -3
- package/lib/packages/designer/src/components/OnlyFLowConfigButton.vue2.js +8 -3
- package/lib/packages/designer/src/packages/form/property/subTable.vue.js +210 -56
- package/lib/packages/designer/src/packages/form/property/widgets.vue.js +44 -27
- package/lib/packages/designer/src/packages/table/property/customBtn.vue.js +10 -0
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +2 -2
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +4 -3
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +58 -29
- package/lib/packages/vue/src/components/table/CustomButtons.vue.js +29 -3
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +21 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +27 -12
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +25 -15
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import _Table from "../../table/Table.vue.mjs";
|
|
|
5
5
|
import { SubTitle } from "../subTitle/index.mjs";
|
|
6
6
|
import { H2 } from "../h2/index.mjs";
|
|
7
7
|
import { parseRouteParams } from "../../../utils/parseRouteParams.mjs";
|
|
8
|
+
import { checkFilterMatch } from "../../../utils/parseFilterConfig.mjs";
|
|
8
9
|
import { ElButton } from "../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/button/index.mjs";
|
|
9
10
|
const _hoisted_1 = {
|
|
10
11
|
key: 0,
|
|
@@ -22,27 +23,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
22
23
|
localConfig: {
|
|
23
24
|
type: Object,
|
|
24
25
|
required: true
|
|
26
|
+
},
|
|
27
|
+
formMode: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
25
30
|
}
|
|
26
|
-
// subFormId: {
|
|
27
|
-
// type: String,
|
|
28
|
-
// required: true,
|
|
29
|
-
// },
|
|
30
|
-
// subFormKey: {
|
|
31
|
-
// type: String,
|
|
32
|
-
// default: "",
|
|
33
|
-
// },
|
|
34
|
-
// subFormName: {
|
|
35
|
-
// type: String,
|
|
36
|
-
// default: "",
|
|
37
|
-
// },
|
|
38
|
-
// dataSourceFrom: {
|
|
39
|
-
// type: String,
|
|
40
|
-
// default: "",
|
|
41
|
-
// },
|
|
42
|
-
// triggerSubFormPageEvent: {
|
|
43
|
-
// type: Boolean,
|
|
44
|
-
// default: false,
|
|
45
|
-
// },
|
|
46
31
|
},
|
|
47
32
|
setup(__props, { expose: __expose }) {
|
|
48
33
|
const props = __props;
|
|
@@ -50,6 +35,22 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
50
35
|
inject("rowHeight");
|
|
51
36
|
inject("gridLayout");
|
|
52
37
|
const setFormItemHeight = inject("setFormItemHeight");
|
|
38
|
+
const handleEvent = inject("handleEvent");
|
|
39
|
+
const btnRollbackEvent = computed(() => {
|
|
40
|
+
const btnRollback = props.config.btnRollback || [];
|
|
41
|
+
const data = {};
|
|
42
|
+
for (const item of btnRollback) {
|
|
43
|
+
const handleFunc = () => {
|
|
44
|
+
handleEvent.value(
|
|
45
|
+
formData.value,
|
|
46
|
+
{},
|
|
47
|
+
{ eventFlow: item.callbackEventConfig }
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
data[item.id] = handleFunc;
|
|
51
|
+
}
|
|
52
|
+
return data;
|
|
53
|
+
});
|
|
53
54
|
const subTableData = computed(() => {
|
|
54
55
|
if (props.config.dataSourceFrom == "main") {
|
|
55
56
|
return formData.value[props.config.fieldName];
|
|
@@ -74,8 +75,34 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
74
75
|
return {};
|
|
75
76
|
});
|
|
76
77
|
const subTableOption = ref({});
|
|
77
|
-
const
|
|
78
|
-
|
|
78
|
+
const subTableFieldsData = computed(() => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
return [
|
|
81
|
+
...((_a = subTableOption.value) == null ? void 0 : _a.fieldsData) || [],
|
|
82
|
+
...((_b = subTableOption.value) == null ? void 0 : _b.hiddenFields) || []
|
|
83
|
+
];
|
|
84
|
+
});
|
|
85
|
+
const leftButtons = computed(() => {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.left) || []).filter((item) => {
|
|
88
|
+
if (!item.showCondition) return true;
|
|
89
|
+
return checkFilterMatch(
|
|
90
|
+
item.showCondition,
|
|
91
|
+
initHiddenData.value,
|
|
92
|
+
subTableFieldsData.value
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
const rightButtons = computed(() => {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
return (((_b = (_a = subTableOption.value) == null ? void 0 : _a.customBtns) == null ? void 0 : _b.right) || []).filter((item) => {
|
|
99
|
+
if (!item.showCondition) return true;
|
|
100
|
+
return checkFilterMatch(
|
|
101
|
+
item.showCondition,
|
|
102
|
+
initHiddenData.value,
|
|
103
|
+
subTableFieldsData.value
|
|
104
|
+
);
|
|
105
|
+
});
|
|
79
106
|
});
|
|
80
107
|
function subTableLoaded(subOption) {
|
|
81
108
|
subTableOption.value = subOption;
|
|
@@ -114,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
114
141
|
config: __props.config
|
|
115
142
|
}, createSlots({
|
|
116
143
|
default: withCtx(() => [
|
|
117
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
144
|
+
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(rightButtons), (btn) => {
|
|
118
145
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
119
146
|
btn.btnType == "custom" ? (openBlock(), createBlock(_component_el_button, {
|
|
120
147
|
key: btn.id,
|
|
@@ -128,14 +155,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
128
155
|
_: 2
|
|
129
156
|
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
130
157
|
], 64);
|
|
131
|
-
}), 256))
|
|
158
|
+
}), 256)) : createCommentVNode("", true)
|
|
132
159
|
]),
|
|
133
160
|
_: 2
|
|
134
161
|
}, [
|
|
135
|
-
unref(
|
|
162
|
+
unref(leftButtons) ? {
|
|
136
163
|
name: "left",
|
|
137
164
|
fn: withCtx(() => [
|
|
138
|
-
(openBlock(true), createElementBlock(Fragment,
|
|
165
|
+
__props.formMode != "query" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(leftButtons), (btn) => {
|
|
139
166
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
140
167
|
btn.btnType == "custom" ? (openBlock(), createBlock(_component_el_button, {
|
|
141
168
|
key: btn.id,
|
|
@@ -149,7 +176,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
149
176
|
_: 2
|
|
150
177
|
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
151
178
|
], 64);
|
|
152
|
-
}), 256))
|
|
179
|
+
}), 256)) : createCommentVNode("", true)
|
|
153
180
|
]),
|
|
154
181
|
key: "0"
|
|
155
182
|
} : void 0
|
|
@@ -165,13 +192,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
165
192
|
isSubTable: "",
|
|
166
193
|
onLoaded: subTableLoaded,
|
|
167
194
|
mode: __props.config.subTableMode,
|
|
195
|
+
titleMode: __props.config.titleMode,
|
|
168
196
|
hasPagination: __props.config.isSubTablePagination,
|
|
169
197
|
height: __props.config.subTableHeight,
|
|
170
198
|
tableData: unref(subTableData),
|
|
171
199
|
initHiddenData: unref(initHiddenData),
|
|
172
200
|
canLoadBySearchData: __props.config.reloadOnParamsChange,
|
|
173
|
-
readonly: __props.config.isSubTableReadOnly
|
|
174
|
-
|
|
201
|
+
readonly: __props.config.isSubTableReadOnly || __props.formMode == "query",
|
|
202
|
+
btnRollbackEvent: unref(btnRollbackEvent)
|
|
203
|
+
}, null, 8, ["templateKey", "mode", "titleMode", "hasPagination", "height", "tableData", "initHiddenData", "canLoadBySearchData", "readonly", "btnRollbackEvent"])
|
|
175
204
|
], 64);
|
|
176
205
|
};
|
|
177
206
|
}
|
|
@@ -4,6 +4,7 @@ import { computed, createElementBlock, openBlock, createCommentVNode, createBloc
|
|
|
4
4
|
import "../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/components.mjs";
|
|
5
5
|
import { ArrowLeftBold as arrow_left_bold_default, Search as search_default, Edit as edit_default, Delete as delete_default, Plus as plus_default, Setting as setting_default, Download as download_default, Refresh as refresh_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
6
6
|
import { getCurrentVueInstance } from "../../utils/getInstance.mjs";
|
|
7
|
+
import { checkFilterMatch } from "../../utils/parseFilterConfig.mjs";
|
|
7
8
|
/* empty css */
|
|
8
9
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
9
10
|
import { ElIcon } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.mjs";
|
|
@@ -35,6 +36,10 @@ const _sfc_main = {
|
|
|
35
36
|
isSubTable: {
|
|
36
37
|
type: Boolean,
|
|
37
38
|
default: false
|
|
39
|
+
},
|
|
40
|
+
hiddenFormData: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: {}
|
|
38
43
|
}
|
|
39
44
|
},
|
|
40
45
|
emits: ["click"],
|
|
@@ -42,11 +47,32 @@ const _sfc_main = {
|
|
|
42
47
|
const ctx = getCurrentVueInstance();
|
|
43
48
|
const props = __props;
|
|
44
49
|
const emit = __emit;
|
|
50
|
+
const fieldsData = computed(() => {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
return [
|
|
53
|
+
...((_a = props.localConfig) == null ? void 0 : _a.fieldsData) || [],
|
|
54
|
+
...((_b = props.localConfig) == null ? void 0 : _b.hiddenFields) || []
|
|
55
|
+
];
|
|
56
|
+
});
|
|
45
57
|
const leftButtons = computed(() => {
|
|
46
|
-
return props.customBtns.left || []
|
|
58
|
+
return (props.customBtns.left || []).filter((item) => {
|
|
59
|
+
if (!item.showCondition) return true;
|
|
60
|
+
return checkFilterMatch(
|
|
61
|
+
item.showCondition,
|
|
62
|
+
props.hiddenFormData,
|
|
63
|
+
fieldsData.value
|
|
64
|
+
);
|
|
65
|
+
});
|
|
47
66
|
});
|
|
48
67
|
const rightButtons = computed(() => {
|
|
49
|
-
return props.customBtns.right || []
|
|
68
|
+
return (props.customBtns.right || []).filter((item) => {
|
|
69
|
+
if (!item.showCondition) return true;
|
|
70
|
+
return checkFilterMatch(
|
|
71
|
+
item.showCondition,
|
|
72
|
+
props.hiddenFormData,
|
|
73
|
+
fieldsData.value
|
|
74
|
+
);
|
|
75
|
+
});
|
|
50
76
|
});
|
|
51
77
|
const hasButtons = computed(() => {
|
|
52
78
|
return leftButtons.value.length > 0 || rightButtons.value.length > 0;
|
|
@@ -137,7 +163,7 @@ const _sfc_main = {
|
|
|
137
163
|
};
|
|
138
164
|
}
|
|
139
165
|
};
|
|
140
|
-
const CustomButtons = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
166
|
+
const CustomButtons = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d1552802"]]);
|
|
141
167
|
export {
|
|
142
168
|
CustomButtons as default
|
|
143
169
|
};
|
|
@@ -23,6 +23,7 @@ import { MultipleSelection } from "../forms/multipleSelection/index.mjs";
|
|
|
23
23
|
import { Date } from "../forms/date/index.mjs";
|
|
24
24
|
import { Number } from "../forms/number/index.mjs";
|
|
25
25
|
import { handleSearchData } from "../../utils/common.mjs";
|
|
26
|
+
import { checkFilterMatch } from "../../utils/parseFilterConfig.mjs";
|
|
26
27
|
/* empty css */
|
|
27
28
|
import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
28
29
|
import { ElIcon } from "../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.mjs";
|
|
@@ -79,6 +80,10 @@ const _sfc_main = {
|
|
|
79
80
|
readOnly: {
|
|
80
81
|
type: Boolean,
|
|
81
82
|
default: false
|
|
83
|
+
},
|
|
84
|
+
hiddenFormData: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: {}
|
|
82
87
|
}
|
|
83
88
|
},
|
|
84
89
|
emits: ["click", "search"],
|
|
@@ -99,9 +104,23 @@ const _sfc_main = {
|
|
|
99
104
|
activeTab.value = ((_b = (_a = dynamicConfig.value) == null ? void 0 : _a.tabConfigs) == null ? void 0 : _b.length) > 0 ? (_c = dynamicConfig.value) == null ? void 0 : _c.tabActive : "";
|
|
100
105
|
return ((_d = dynamicConfig.value) == null ? void 0 : _d.tabConfigs) || [];
|
|
101
106
|
});
|
|
107
|
+
const fieldsData = computed(() => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
return [
|
|
110
|
+
...((_a = props.localConfig) == null ? void 0 : _a.fieldsData) || [],
|
|
111
|
+
...((_b = props.localConfig) == null ? void 0 : _b.hiddenFields) || []
|
|
112
|
+
];
|
|
113
|
+
});
|
|
102
114
|
const rightButtons = computed(() => {
|
|
103
115
|
var _a;
|
|
104
|
-
return ((_a = props.localConfig) == null ? void 0 : _a.customBtns.right) || []
|
|
116
|
+
return (((_a = props.localConfig) == null ? void 0 : _a.customBtns.right) || []).filter((item) => {
|
|
117
|
+
if (!item.showCondition) return true;
|
|
118
|
+
return checkFilterMatch(
|
|
119
|
+
item.showCondition,
|
|
120
|
+
props.hiddenFormData,
|
|
121
|
+
fieldsData.value
|
|
122
|
+
);
|
|
123
|
+
});
|
|
105
124
|
});
|
|
106
125
|
const getBtnIcon = (btnType) => {
|
|
107
126
|
const iconMap = {
|
|
@@ -431,7 +450,7 @@ const _sfc_main = {
|
|
|
431
450
|
};
|
|
432
451
|
}
|
|
433
452
|
};
|
|
434
|
-
const DynamicQuery = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
453
|
+
const DynamicQuery = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bb55debf"]]);
|
|
435
454
|
export {
|
|
436
455
|
DynamicQuery as default
|
|
437
456
|
};
|
|
@@ -48,6 +48,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
48
48
|
type: String,
|
|
49
49
|
default: ""
|
|
50
50
|
},
|
|
51
|
+
titleMode: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
51
55
|
// 表格数据
|
|
52
56
|
tableData: {
|
|
53
57
|
type: Array,
|
|
@@ -94,6 +98,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
94
98
|
initHiddenData: {
|
|
95
99
|
type: Object,
|
|
96
100
|
default: {}
|
|
101
|
+
},
|
|
102
|
+
btnRollbackEvent: {
|
|
103
|
+
type: Object,
|
|
104
|
+
default: {}
|
|
97
105
|
}
|
|
98
106
|
},
|
|
99
107
|
emits: [
|
|
@@ -287,7 +295,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
287
295
|
}
|
|
288
296
|
};
|
|
289
297
|
const handleFlowEvent = ref(null);
|
|
290
|
-
const handleCustomBtnClick = ({ btn, event, type }) => {
|
|
298
|
+
const handleCustomBtnClick = async ({ btn, event, type }) => {
|
|
291
299
|
var _a, _b;
|
|
292
300
|
switch (btn.btnType) {
|
|
293
301
|
case "refresh":
|
|
@@ -300,12 +308,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
300
308
|
handlePersonalize();
|
|
301
309
|
break;
|
|
302
310
|
default:
|
|
303
|
-
(_b = handleFlowEvent.value) == null ? void 0 : _b.call(
|
|
311
|
+
await ((_b = handleFlowEvent.value) == null ? void 0 : _b.call(
|
|
304
312
|
handleFlowEvent,
|
|
305
313
|
hiddenFormData.value,
|
|
306
314
|
btn,
|
|
307
315
|
(_a = btn.eventConfig) == null ? void 0 : _a.find((item) => item.name == "Click")
|
|
308
|
-
);
|
|
316
|
+
));
|
|
317
|
+
const handleFunc = props.btnRollbackEvent[btn.id];
|
|
318
|
+
if (handleFunc && typeof handleFunc == "function") {
|
|
319
|
+
handleFunc();
|
|
320
|
+
}
|
|
309
321
|
}
|
|
310
322
|
};
|
|
311
323
|
const handleSortChange = ({ property, order }) => {
|
|
@@ -568,19 +580,21 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
568
580
|
"custom-btns": localConfig.value.customBtns,
|
|
569
581
|
localConfig: localConfig.value,
|
|
570
582
|
readonly: __props.readonly,
|
|
571
|
-
isSubTable: __props.
|
|
572
|
-
onClick: handleCustomBtnClick
|
|
573
|
-
|
|
583
|
+
isSubTable: __props.titleMode == "label",
|
|
584
|
+
onClick: handleCustomBtnClick,
|
|
585
|
+
hiddenFormData: hiddenFormData.value
|
|
586
|
+
}, null, 8, ["custom-btns", "localConfig", "readonly", "isSubTable", "hiddenFormData"])
|
|
574
587
|
], 64)) : createCommentVNode("", true),
|
|
575
588
|
localConfig.value.queryConfig.mode == "dynamic" ? (openBlock(), createBlock(DynamicQuery, {
|
|
576
589
|
key: 1,
|
|
577
590
|
readonly: __props.readonly,
|
|
578
|
-
isSubTable: __props.
|
|
591
|
+
isSubTable: __props.titleMode == "label",
|
|
579
592
|
localConfig: localConfig.value,
|
|
580
593
|
"fields-data": fieldsData.value,
|
|
581
594
|
onSearch: handleFilterSearch,
|
|
582
|
-
onClick: handleCustomBtnClick
|
|
583
|
-
|
|
595
|
+
onClick: handleCustomBtnClick,
|
|
596
|
+
hiddenFormData: hiddenFormData.value
|
|
597
|
+
}, null, 8, ["readonly", "isSubTable", "localConfig", "fields-data", "hiddenFormData"])) : createCommentVNode("", true),
|
|
584
598
|
createElementVNode("div", _hoisted_1, [
|
|
585
599
|
createVNode(unref(VxeTable), {
|
|
586
600
|
ref_key: "tableRef",
|
|
@@ -616,7 +630,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
616
630
|
"table-data": displayData.value,
|
|
617
631
|
readonly: __props.readonly,
|
|
618
632
|
isDialog: __props.isDialog,
|
|
619
|
-
hiddenFormData: hiddenFormData.value
|
|
633
|
+
hiddenFormData: hiddenFormData.value,
|
|
634
|
+
btnRollbackEvent: __props.btnRollbackEvent
|
|
620
635
|
}, createSlots({ _: 2 }, [
|
|
621
636
|
renderList(fieldsData.value, (field) => {
|
|
622
637
|
return {
|
|
@@ -626,7 +641,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
626
641
|
])
|
|
627
642
|
};
|
|
628
643
|
})
|
|
629
|
-
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData"])
|
|
644
|
+
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "localConfig", "table-ref", "table-data", "readonly", "isDialog", "hiddenFormData", "btnRollbackEvent"])
|
|
630
645
|
];
|
|
631
646
|
}),
|
|
632
647
|
_: 3
|
|
@@ -645,7 +660,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
645
660
|
};
|
|
646
661
|
}
|
|
647
662
|
});
|
|
648
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
663
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c129bed"]]);
|
|
649
664
|
export {
|
|
650
665
|
_Table as default
|
|
651
666
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { getCurrentInstance, computed, createElementBlock, openBlock, createBlock, createCommentVNode, unref, Fragment, renderList, withCtx, renderSlot, toDisplayString,
|
|
4
|
+
import { getCurrentInstance, computed, createElementBlock, openBlock, createBlock, createCommentVNode, unref, Fragment, renderList, withCtx, renderSlot, toDisplayString, createTextVNode, createVNode } from "vue";
|
|
5
5
|
import "../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/components.mjs";
|
|
6
6
|
import { CopyDocument as copy_document_default } from "../../../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.2_vue@3.5.13_typescript@5.7.3_/node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
7
7
|
import { checkFilterMatch } from "../../utils/parseFilterConfig.mjs";
|
|
@@ -103,6 +103,10 @@ const _sfc_main = {
|
|
|
103
103
|
hiddenFormData: {
|
|
104
104
|
type: Object,
|
|
105
105
|
default: {}
|
|
106
|
+
},
|
|
107
|
+
btnRollbackEvent: {
|
|
108
|
+
type: Object,
|
|
109
|
+
default: {}
|
|
106
110
|
}
|
|
107
111
|
},
|
|
108
112
|
setup(__props) {
|
|
@@ -269,7 +273,7 @@ const _sfc_main = {
|
|
|
269
273
|
);
|
|
270
274
|
return Math.max(maxVisibleBtns, 1) * btnWidth + padding;
|
|
271
275
|
});
|
|
272
|
-
const {
|
|
276
|
+
const { handleEvent } = useEventFlow({
|
|
273
277
|
fields: props.fieldsData,
|
|
274
278
|
instance,
|
|
275
279
|
localConfig: props.localConfig,
|
|
@@ -277,13 +281,17 @@ const _sfc_main = {
|
|
|
277
281
|
table: props.tableRef
|
|
278
282
|
}
|
|
279
283
|
});
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
item,
|
|
284
|
+
async function handleButtonClick(row, btn, eventConfig) {
|
|
285
|
+
await handleEvent(
|
|
283
286
|
{ ...row, ...removeEmptyValues(props.hiddenFormData) },
|
|
284
|
-
|
|
287
|
+
btn,
|
|
288
|
+
eventConfig == null ? void 0 : eventConfig.find((item) => item.name == "Click")
|
|
285
289
|
);
|
|
286
|
-
|
|
290
|
+
const handleFunc = props.btnRollbackEvent[btn.id];
|
|
291
|
+
if (handleFunc && typeof handleFunc == "function") {
|
|
292
|
+
handleFunc();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
287
295
|
return (_ctx, _cache) => {
|
|
288
296
|
const _component_el_link = ElLink;
|
|
289
297
|
const _component_el_icon = ElIcon;
|
|
@@ -333,15 +341,16 @@ const _sfc_main = {
|
|
|
333
341
|
field
|
|
334
342
|
}, () => [
|
|
335
343
|
field.prefix ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(field.prefix), 1)) : createCommentVNode("", true),
|
|
336
|
-
field.isLink ? (openBlock(), createBlock(_component_el_link,
|
|
344
|
+
field.isLink ? (openBlock(), createBlock(_component_el_link, {
|
|
337
345
|
key: 1,
|
|
338
|
-
type: "primary"
|
|
339
|
-
|
|
346
|
+
type: "primary",
|
|
347
|
+
onClick: ($event) => handleButtonClick(row, field, field.linkConfig)
|
|
348
|
+
}, {
|
|
340
349
|
default: withCtx(() => [
|
|
341
350
|
createTextVNode(toDisplayString(formatCellValue(row, field)), 1)
|
|
342
351
|
]),
|
|
343
352
|
_: 2
|
|
344
|
-
},
|
|
353
|
+
}, 1032, ["onClick"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
345
354
|
createTextVNode(toDisplayString(formatCellValue(row, field)), 1)
|
|
346
355
|
], 64)),
|
|
347
356
|
field.suffix ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(field.suffix), 1)) : createCommentVNode("", true),
|
|
@@ -369,17 +378,18 @@ const _sfc_main = {
|
|
|
369
378
|
}, {
|
|
370
379
|
default: withCtx(({ row }) => [
|
|
371
380
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getVisibleOptBtns(row), (btn) => {
|
|
372
|
-
return openBlock(), createBlock(_component_el_button,
|
|
381
|
+
return openBlock(), createBlock(_component_el_button, {
|
|
373
382
|
key: btn.id,
|
|
374
383
|
type: "primary",
|
|
375
384
|
link: "",
|
|
376
|
-
disabled: isBtnDisabled(row, btn)
|
|
377
|
-
|
|
385
|
+
disabled: isBtnDisabled(row, btn),
|
|
386
|
+
onClick: ($event) => handleButtonClick(row, btn, btn.eventConfig)
|
|
387
|
+
}, {
|
|
378
388
|
default: withCtx(() => [
|
|
379
389
|
createTextVNode(toDisplayString(btn.label), 1)
|
|
380
390
|
]),
|
|
381
391
|
_: 2
|
|
382
|
-
},
|
|
392
|
+
}, 1032, ["disabled", "onClick"]);
|
|
383
393
|
}), 128))
|
|
384
394
|
]),
|
|
385
395
|
_: 1
|
|
@@ -388,7 +398,7 @@ const _sfc_main = {
|
|
|
388
398
|
};
|
|
389
399
|
}
|
|
390
400
|
};
|
|
391
|
-
const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
401
|
+
const TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-77ad8323"]]);
|
|
392
402
|
export {
|
|
393
403
|
TableColumn as default
|
|
394
404
|
};
|