@fecp/vue 1.1.9 → 1.2.0
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/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.mjs +1 -1
- package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/cascader/src/cascader.vue2.mjs +1 -1
- package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.mjs +6 -6
- package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/src/hooks/use-form-common-props.mjs +1 -1
- package/es/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/src/input.vue2.mjs +1 -1
- package/es/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/index.mjs +1 -1
- package/es/packages/vue/src/components/details/footer/Footer.vue.mjs +19 -11
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +403 -0
- package/es/packages/vue/src/components/dialog/index.mjs +68 -0
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +50 -19
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +10 -4
- package/es/packages/vue/src/components/forms/subForm/SubForm.vue.mjs +6 -1
- package/es/packages/vue/src/components/forms/subTable/SubTable.vue.mjs +2 -3
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +81 -8
- package/es/packages/vue/src/components/table/Pagination.vue.mjs +3 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +59 -18
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +32 -17
- package/es/packages/vue/src/components/table/TableFilter.vue.mjs +8 -5
- package/es/packages/vue/src/components/table/index.mjs +2 -2
- package/es/packages/vue/src/composables/usePageEvents.mjs +14 -6
- package/es/packages/vue/src/utils/common.mjs +5 -0
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +46 -3
- package/es/packages/vue/src/utils/eventFlow/eventFlowHandler.mjs +58 -26
- package/es/packages/vue/src/utils/eventFlowParser.mjs +9 -6
- package/es/packages/vue/src/utils/formulajs/calculate.mjs +1 -1
- package/es/vue.css +293 -208
- package/lib/node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/cascader/src/cascader.vue2.js +29 -29
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/index.js +1 -1
- package/lib/packages/vue/src/components/details/footer/Footer.vue.js +19 -11
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +403 -0
- package/lib/packages/vue/src/components/dialog/index.js +68 -0
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +50 -19
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +10 -4
- package/lib/packages/vue/src/components/forms/subForm/SubForm.vue.js +6 -1
- package/lib/packages/vue/src/components/forms/subTable/SubTable.vue.js +0 -1
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +80 -7
- package/lib/packages/vue/src/components/table/Pagination.vue.js +3 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +59 -18
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +31 -16
- package/lib/packages/vue/src/components/table/TableFilter.vue.js +8 -5
- package/lib/packages/vue/src/composables/usePageEvents.js +14 -6
- package/lib/packages/vue/src/utils/common.js +5 -0
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +54 -11
- package/lib/packages/vue/src/utils/eventFlow/eventFlowHandler.js +58 -26
- package/lib/packages/vue/src/utils/eventFlowParser.js +9 -6
- package/lib/packages/vue/src/utils/formulajs/calculate.js +1 -1
- package/lib/vue.css +293 -208
- package/package.json +1 -1
|
@@ -47,6 +47,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
47
47
|
formRef: {
|
|
48
48
|
type: Object,
|
|
49
49
|
default: null
|
|
50
|
+
},
|
|
51
|
+
formMode: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
emits: ["update:modelValue", "change"],
|
|
@@ -105,8 +109,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
105
109
|
}, null, 8, ["config"])) : __props.config.fieldType == "subForm" ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.SubForm), {
|
|
106
110
|
key: 2,
|
|
107
111
|
config: __props.config,
|
|
108
|
-
localConfig: __props.localConfig
|
|
109
|
-
|
|
112
|
+
localConfig: __props.localConfig,
|
|
113
|
+
formMode: __props.formMode
|
|
114
|
+
}, null, 8, ["config", "localConfig", "formMode"])) : __props.config.fieldType == "subTable" ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.SubTable), {
|
|
110
115
|
key: 3,
|
|
111
116
|
config: __props.config,
|
|
112
117
|
localConfig: __props.localConfig
|
|
@@ -124,10 +129,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
124
129
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => compValue.value = $event)
|
|
125
130
|
}, componentProps.value, {
|
|
126
131
|
config: __props.config,
|
|
132
|
+
formMode: __props.formMode,
|
|
127
133
|
onChange: _cache[1] || (_cache[1] = (value) => {
|
|
128
134
|
handleChange(__props.config, value);
|
|
129
135
|
})
|
|
130
|
-
}), null, 16, ["modelValue", "config"])) : vue.createCommentVNode("", true)
|
|
136
|
+
}), null, 16, ["modelValue", "config", "formMode"])) : vue.createCommentVNode("", true)
|
|
131
137
|
]),
|
|
132
138
|
_: 2
|
|
133
139
|
}, [
|
|
@@ -157,5 +163,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
157
163
|
};
|
|
158
164
|
}
|
|
159
165
|
});
|
|
160
|
-
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
166
|
+
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-1f0d0846"]]);
|
|
161
167
|
exports.default = _FormItem;
|
|
@@ -20,6 +20,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
20
20
|
localConfig: {
|
|
21
21
|
type: Object,
|
|
22
22
|
required: true
|
|
23
|
+
},
|
|
24
|
+
formMode: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
23
27
|
}
|
|
24
28
|
// subFormId: {
|
|
25
29
|
// type: String,
|
|
@@ -80,9 +84,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
80
84
|
isSubForm: "",
|
|
81
85
|
onLoaded: subFormLoaded,
|
|
82
86
|
canPageEvent: __props.config.triggerSubFormPageEvent,
|
|
87
|
+
initFormMode: __props.formMode,
|
|
83
88
|
modelValue: vue.unref(formData),
|
|
84
89
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(formData) ? formData.value = $event : null)
|
|
85
|
-
}, null, 8, ["templateKey", "canPageEvent", "modelValue"])
|
|
90
|
+
}, null, 8, ["templateKey", "canPageEvent", "initFormMode", "modelValue"])
|
|
86
91
|
], 64);
|
|
87
92
|
};
|
|
88
93
|
}
|
|
@@ -4,6 +4,13 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
;/* empty css */
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const vue = require("vue");
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
const index$2 = require("../../dialog/index.js");
|
|
11
|
+
;/* empty css */
|
|
12
|
+
;/* empty css */
|
|
13
|
+
const eventFlowHandler = require("../../../utils/eventFlow/eventFlowHandler.js");
|
|
7
14
|
;/* empty css */
|
|
8
15
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
9
16
|
const index = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/input/index.js");
|
|
@@ -60,6 +67,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
60
67
|
type: String,
|
|
61
68
|
default: ""
|
|
62
69
|
},
|
|
70
|
+
suffixButtonName: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ""
|
|
73
|
+
},
|
|
74
|
+
suffixButtonConfig: {
|
|
75
|
+
type: Array,
|
|
76
|
+
default: []
|
|
77
|
+
},
|
|
78
|
+
suffixDialogId: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: ""
|
|
81
|
+
},
|
|
63
82
|
label: {
|
|
64
83
|
type: String,
|
|
65
84
|
default: ""
|
|
@@ -67,6 +86,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
67
86
|
dataMasking: {
|
|
68
87
|
type: String,
|
|
69
88
|
default: ""
|
|
89
|
+
},
|
|
90
|
+
formMode: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: ""
|
|
70
93
|
}
|
|
71
94
|
},
|
|
72
95
|
emits: ["update:modelValue", "change"],
|
|
@@ -86,18 +109,56 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
86
109
|
if (!props.dataMasking || !props.modelValue) return "";
|
|
87
110
|
return "****";
|
|
88
111
|
});
|
|
112
|
+
const instance = vue.getCurrentInstance();
|
|
113
|
+
const formData = vue.inject("formData", null);
|
|
114
|
+
const localConfig = vue.inject("localConfig", null);
|
|
115
|
+
const fieldsData = vue.inject("fieldsData", null);
|
|
116
|
+
const hiddenFields = vue.inject("hiddenFields", null);
|
|
117
|
+
const formCtx = vue.inject("formCtx", null);
|
|
118
|
+
const fieldsList = [
|
|
119
|
+
...(fieldsData == null ? void 0 : fieldsData.value) || [],
|
|
120
|
+
...(hiddenFields == null ? void 0 : hiddenFields.value) || []
|
|
121
|
+
];
|
|
122
|
+
const { getEventHandlers: createEventHandlers } = eventFlowHandler.useEventFlow({
|
|
123
|
+
fields: fieldsList,
|
|
124
|
+
instance,
|
|
125
|
+
localConfig: localConfig == null ? void 0 : localConfig.value,
|
|
126
|
+
components: {
|
|
127
|
+
form: formCtx
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
const getEventHandlers = (row, item, eventConfig) => createEventHandlers(item, row, eventConfig);
|
|
131
|
+
function openSuffixDialog() {
|
|
132
|
+
const dialogsConfig = localConfig.value.dialogs || [];
|
|
133
|
+
const dialog = dialogsConfig.find((item) => item.id == props.suffixDialogId);
|
|
134
|
+
if (dialog) {
|
|
135
|
+
index$2.openDialog(
|
|
136
|
+
props.config.fieldName,
|
|
137
|
+
dialog,
|
|
138
|
+
instance,
|
|
139
|
+
formCtx,
|
|
140
|
+
fieldsList,
|
|
141
|
+
formData.value
|
|
142
|
+
).then((result) => {
|
|
143
|
+
console.log("确定", result);
|
|
144
|
+
}).catch(() => {
|
|
145
|
+
console.log("取消");
|
|
146
|
+
});
|
|
147
|
+
} else {
|
|
148
|
+
console.error(`对话框配置不存在:${props.suffixDialogId}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
89
151
|
return (_ctx, _cache) => {
|
|
90
152
|
const _component_el_button = index$1.ElButton;
|
|
91
153
|
const _component_el_input = index.ElInput;
|
|
92
154
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
93
|
-
vue.createTextVNode(vue.toDisplayString(__props.suffix) + " ", 1),
|
|
94
155
|
vue.createVNode(_component_el_input, vue.mergeProps({
|
|
95
156
|
modelValue: inputValue.value,
|
|
96
157
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
97
158
|
}, vue.toHandlers(__props.config.eventHandlers), {
|
|
98
159
|
placeholder: __props.placeholder,
|
|
99
160
|
disabled: __props.disabled,
|
|
100
|
-
readonly: __props.readonly,
|
|
161
|
+
readonly: __props.suffixButton == "dialog" ? true : __props.readonly,
|
|
101
162
|
maxlength: __props.maxLength,
|
|
102
163
|
"show-word-limit": __props.showWordCount,
|
|
103
164
|
onChange: handleChange,
|
|
@@ -117,15 +178,27 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
117
178
|
]),
|
|
118
179
|
key: "1"
|
|
119
180
|
} : void 0,
|
|
120
|
-
__props.suffixButton ? {
|
|
181
|
+
__props.formMode != "query" && __props.suffixButton && __props.suffixButton != "none" ? {
|
|
121
182
|
name: "append",
|
|
122
183
|
fn: vue.withCtx(() => [
|
|
123
|
-
vue.
|
|
184
|
+
__props.suffixButton == "dialog" ? (vue.openBlock(), vue.createBlock(_component_el_button, {
|
|
185
|
+
key: 0,
|
|
186
|
+
class: "suffixButton",
|
|
187
|
+
onClick: openSuffixDialog
|
|
188
|
+
}, {
|
|
189
|
+
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
190
|
+
vue.createTextVNode("选择")
|
|
191
|
+
])),
|
|
192
|
+
_: 1
|
|
193
|
+
})) : __props.suffixButton == "custom" ? (vue.openBlock(), vue.createBlock(_component_el_button, vue.mergeProps({
|
|
194
|
+
key: 1,
|
|
195
|
+
class: "suffixButton"
|
|
196
|
+
}, vue.toHandlers(getEventHandlers(vue.unref(formData), {}, __props.suffixButtonConfig))), {
|
|
124
197
|
default: vue.withCtx(() => [
|
|
125
|
-
vue.createTextVNode(vue.toDisplayString(__props.
|
|
198
|
+
vue.createTextVNode(vue.toDisplayString(__props.suffixButtonName), 1)
|
|
126
199
|
]),
|
|
127
200
|
_: 1
|
|
128
|
-
})
|
|
201
|
+
}, 16)) : vue.createCommentVNode("", true)
|
|
129
202
|
]),
|
|
130
203
|
key: "2"
|
|
131
204
|
} : void 0
|
|
@@ -135,5 +208,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
135
208
|
};
|
|
136
209
|
}
|
|
137
210
|
});
|
|
138
|
-
const _Text = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
211
|
+
const _Text = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6f1ce0e3"]]);
|
|
139
212
|
exports.default = _Text;
|
|
@@ -94,7 +94,8 @@ const _sfc_main = {
|
|
|
94
94
|
"current-page": __props.pagination.pageNo,
|
|
95
95
|
layout: getLayout(__props.config.layout),
|
|
96
96
|
total: __props.pagination.pageTotal,
|
|
97
|
-
size: __props.config.size === "default" ? "" : __props.config.size
|
|
97
|
+
size: __props.config.size === "default" ? "" : __props.config.size,
|
|
98
|
+
style: { "width": "100%" }
|
|
98
99
|
}, {
|
|
99
100
|
default: vue.withCtx(() => [
|
|
100
101
|
getLayout(__props.config.layout).includes("slot") ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(__props.pagination.pageNo) + "/" + vue.toDisplayString(Math.ceil(__props.pagination.pageTotal / __props.pagination.pageSize)) + " 页 ", 1)) : vue.createCommentVNode("", true)
|
|
@@ -105,5 +106,5 @@ const _sfc_main = {
|
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
};
|
|
108
|
-
const Pagination = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
109
|
+
const Pagination = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-1ac70114"]]);
|
|
109
110
|
exports.default = Pagination;
|
|
@@ -15,16 +15,22 @@ const CustomButtons = require("./CustomButtons.vue.js");
|
|
|
15
15
|
const TableColumn = require("./TableColumn.vue.js");
|
|
16
16
|
const TableFilter = require("./TableFilter.vue.js");
|
|
17
17
|
const getInstance = require("../../utils/getInstance.js");
|
|
18
|
-
|
|
18
|
+
const common = require("../../utils/common.js");
|
|
19
19
|
;/* empty css */
|
|
20
|
-
;/* empty css */
|
|
21
20
|
;/* empty css */
|
|
21
|
+
;/* empty css */
|
|
22
|
+
require("./index.js");
|
|
23
|
+
require("../forms/form/index.js");
|
|
24
|
+
require("../../utils/formulajs/functionCore.js");
|
|
22
25
|
const eventFlowHandler = require("../../utils/eventFlow/eventFlowHandler.js");
|
|
23
|
-
const getJsonAsyncUtil = require("../../utils/getJsonAsyncUtil.js");
|
|
24
26
|
;/* empty css */
|
|
25
27
|
;/* empty css */
|
|
26
|
-
;/* empty css
|
|
28
|
+
;/* empty css */
|
|
27
29
|
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
30
|
+
;/* empty css */
|
|
31
|
+
;/* empty css */
|
|
32
|
+
const getJsonAsyncUtil = require("../../utils/getJsonAsyncUtil.js");
|
|
33
|
+
;/* empty css */
|
|
28
34
|
const index = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/container/index.js");
|
|
29
35
|
const index$1 = require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/table/index.js");
|
|
30
36
|
const index$2 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/message/index.js");
|
|
@@ -65,6 +71,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
65
71
|
type: Boolean,
|
|
66
72
|
default: false
|
|
67
73
|
},
|
|
74
|
+
isDialog: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
77
|
+
},
|
|
68
78
|
hasPagination: {
|
|
69
79
|
type: Boolean,
|
|
70
80
|
default: false
|
|
@@ -76,6 +86,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
76
86
|
readonly: {
|
|
77
87
|
type: Boolean,
|
|
78
88
|
default: false
|
|
89
|
+
},
|
|
90
|
+
selectMode: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: "",
|
|
93
|
+
validator: (value) => ["", "none", "single", "multiple"].includes(value)
|
|
79
94
|
}
|
|
80
95
|
},
|
|
81
96
|
emits: [
|
|
@@ -109,7 +124,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
109
124
|
});
|
|
110
125
|
const isPagination = vue.computed(() => {
|
|
111
126
|
var _a;
|
|
112
|
-
if (props.isSubTable) {
|
|
127
|
+
if (props.isSubTable || props.isDialog) {
|
|
113
128
|
return props.hasPagination;
|
|
114
129
|
} else {
|
|
115
130
|
return (_a = localConfig.value.paginationConfig) == null ? void 0 : _a.enabled;
|
|
@@ -266,8 +281,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
266
281
|
};
|
|
267
282
|
const { handleEvent } = eventFlowHandler.useEventFlow({
|
|
268
283
|
fields: localConfig.value.fieldsData,
|
|
269
|
-
|
|
270
|
-
|
|
284
|
+
instance,
|
|
285
|
+
localConfig: localConfig.value,
|
|
271
286
|
components: {
|
|
272
287
|
table: instance == null ? void 0 : instance.proxy
|
|
273
288
|
}
|
|
@@ -383,6 +398,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
383
398
|
$table.openExport();
|
|
384
399
|
}
|
|
385
400
|
};
|
|
401
|
+
const rowConfig = vue.computed(() => {
|
|
402
|
+
return {
|
|
403
|
+
keyField: localConfig.value.pkFieldName || ""
|
|
404
|
+
};
|
|
405
|
+
});
|
|
406
|
+
const radioConfig = vue.reactive({
|
|
407
|
+
strict: true,
|
|
408
|
+
trigger: "row",
|
|
409
|
+
highlight: true
|
|
410
|
+
});
|
|
411
|
+
const checkboxConfig = vue.reactive({
|
|
412
|
+
showHeader: true,
|
|
413
|
+
strict: true,
|
|
414
|
+
trigger: "row",
|
|
415
|
+
highlight: true,
|
|
416
|
+
showReserveStatus: true,
|
|
417
|
+
isShiftKey: true,
|
|
418
|
+
range: true,
|
|
419
|
+
reserve: true
|
|
420
|
+
});
|
|
386
421
|
const handlePersonalize = () => {
|
|
387
422
|
if (tableRef.value) {
|
|
388
423
|
tableRef.value.openCustom();
|
|
@@ -437,9 +472,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
437
472
|
});
|
|
438
473
|
vue.watch(
|
|
439
474
|
() => props.initSearchData,
|
|
440
|
-
(
|
|
441
|
-
if (props.canLoadBySearchData && dataSourceManager.value) {
|
|
442
|
-
dataSourceManager.value.updateInitSearchData(
|
|
475
|
+
(newVal, oldVal) => {
|
|
476
|
+
if (props.canLoadBySearchData && dataSourceManager.value && !common.isEqual(newVal, oldVal)) {
|
|
477
|
+
dataSourceManager.value.updateInitSearchData(newVal);
|
|
443
478
|
refresh();
|
|
444
479
|
}
|
|
445
480
|
},
|
|
@@ -457,7 +492,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
457
492
|
switchMode,
|
|
458
493
|
getSelection,
|
|
459
494
|
clearSelection,
|
|
460
|
-
exportData: handleExport
|
|
495
|
+
exportData: handleExport,
|
|
496
|
+
localConfig
|
|
461
497
|
});
|
|
462
498
|
return (_ctx, _cache) => {
|
|
463
499
|
const _component_el_container = index.ElContainer;
|
|
@@ -500,6 +536,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
500
536
|
height: tableHeight.value,
|
|
501
537
|
"empty-text": "暂无数据",
|
|
502
538
|
"export-config": vue.unref(exportConfig),
|
|
539
|
+
"row-config": rowConfig.value,
|
|
540
|
+
"radio-config": vue.unref(radioConfig),
|
|
541
|
+
"checkbox-config": vue.unref(checkboxConfig),
|
|
503
542
|
onSortChange: handleSortChange,
|
|
504
543
|
onCheckboxChange: handleCheckboxChange,
|
|
505
544
|
onCheckboxAll: handleCheckboxAll,
|
|
@@ -511,16 +550,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
511
550
|
vue.createVNode(TableColumn.default, {
|
|
512
551
|
"fields-data": localConfig.value.fieldsData,
|
|
513
552
|
"show-index": localConfig.value.showIndex,
|
|
514
|
-
"select-mode": localConfig.value.selectMode,
|
|
553
|
+
"select-mode": __props.selectMode || localConfig.value.selectMode,
|
|
515
554
|
"is-opt-btns": localConfig.value.isOptBtns,
|
|
516
555
|
"opt-btns": localConfig.value.optBtns,
|
|
517
556
|
"mode-key": currentMode.value,
|
|
518
557
|
modes: localConfig.value.mode,
|
|
519
558
|
"data-source-options": dataSourceOptions.value,
|
|
520
559
|
"dictionary-options": dictionaryOptions.value,
|
|
521
|
-
|
|
560
|
+
localConfig: localConfig.value,
|
|
522
561
|
"table-ref": (_a = vue.unref(instance)) == null ? void 0 : _a.proxy,
|
|
523
|
-
"table-data": displayData.value
|
|
562
|
+
"table-data": displayData.value,
|
|
563
|
+
readonly: __props.readonly,
|
|
564
|
+
isDialog: __props.isDialog
|
|
524
565
|
}, vue.createSlots({ _: 2 }, [
|
|
525
566
|
vue.renderList(localConfig.value.fieldsData, (field) => {
|
|
526
567
|
return {
|
|
@@ -530,11 +571,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
530
571
|
])
|
|
531
572
|
};
|
|
532
573
|
})
|
|
533
|
-
]), 1032, ["fields-data", "show-index", "select-mode", "is-opt-btns", "opt-btns", "mode-key", "modes", "data-source-options", "dictionary-options", "
|
|
574
|
+
]), 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"])
|
|
534
575
|
];
|
|
535
576
|
}),
|
|
536
577
|
_: 3
|
|
537
|
-
}, 8, ["data", "auto-resize", "height", "export-config"])
|
|
578
|
+
}, 8, ["data", "auto-resize", "height", "export-config", "row-config", "radio-config", "checkbox-config"])
|
|
538
579
|
]),
|
|
539
580
|
isPagination.value ? (vue.openBlock(), vue.createBlock(Pagination.default, {
|
|
540
581
|
key: 2,
|
|
@@ -549,5 +590,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
549
590
|
};
|
|
550
591
|
}
|
|
551
592
|
});
|
|
552
|
-
const
|
|
553
|
-
exports.default =
|
|
593
|
+
const _Table = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6ce36f88"]]);
|
|
594
|
+
exports.default = _Table;
|
|
@@ -10,14 +10,18 @@ const parseFilterConfig = require("../../utils/parseFilterConfig.js");
|
|
|
10
10
|
;/* empty css */
|
|
11
11
|
;/* empty css */
|
|
12
12
|
;/* empty css */
|
|
13
|
-
;/* empty css
|
|
14
|
-
;/* empty css */
|
|
13
|
+
;/* empty css */
|
|
15
14
|
;/* empty css */
|
|
15
|
+
require("./index.js");
|
|
16
|
+
require("../forms/form/index.js");
|
|
17
|
+
require("../../utils/formulajs/functionCore.js");
|
|
16
18
|
const eventFlowHandler = require("../../utils/eventFlow/eventFlowHandler.js");
|
|
17
|
-
|
|
19
|
+
;/* empty css */
|
|
20
|
+
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
21
|
+
;/* empty css */
|
|
22
|
+
;/* empty css */
|
|
18
23
|
const decimal = require("../../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js");
|
|
19
24
|
;/* empty css */
|
|
20
|
-
const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
21
25
|
const index = require("../../../../../node_modules/.pnpm/vxe-table@4.17.47_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-table/es/column/index.js");
|
|
22
26
|
const index$1 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/link/index.js");
|
|
23
27
|
const index$2 = require("../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/icon/index.js");
|
|
@@ -74,10 +78,10 @@ const _sfc_main = {
|
|
|
74
78
|
type: Object,
|
|
75
79
|
default: () => ({})
|
|
76
80
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
localConfig: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => {
|
|
84
|
+
}
|
|
81
85
|
},
|
|
82
86
|
// 表格组件引用(用于表格刷新等操作)
|
|
83
87
|
tableRef: {
|
|
@@ -88,10 +92,19 @@ const _sfc_main = {
|
|
|
88
92
|
tableData: {
|
|
89
93
|
type: Array,
|
|
90
94
|
default: () => []
|
|
95
|
+
},
|
|
96
|
+
readonly: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
isDialog: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
91
103
|
}
|
|
92
104
|
},
|
|
93
105
|
setup(__props) {
|
|
94
106
|
const props = __props;
|
|
107
|
+
const instance = vue.getCurrentInstance();
|
|
95
108
|
const visibleFields = vue.computed(() => {
|
|
96
109
|
let fields = props.fieldsData.filter((field) => field.isShow);
|
|
97
110
|
if (props.modeKey && props.modes.length) {
|
|
@@ -249,8 +262,8 @@ const _sfc_main = {
|
|
|
249
262
|
});
|
|
250
263
|
const { getEventHandlers: createEventHandlers } = eventFlowHandler.useEventFlow({
|
|
251
264
|
fields: props.fieldsData,
|
|
252
|
-
|
|
253
|
-
|
|
265
|
+
instance,
|
|
266
|
+
localConfig: props.localConfig,
|
|
254
267
|
components: {
|
|
255
268
|
table: props.tableRef
|
|
256
269
|
}
|
|
@@ -261,16 +274,18 @@ const _sfc_main = {
|
|
|
261
274
|
const _component_el_icon = index$2.ElIcon;
|
|
262
275
|
const _component_el_button = index$4.ElButton;
|
|
263
276
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
264
|
-
__props.selectMode === "multiple" ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
277
|
+
!__props.readonly && __props.selectMode === "multiple" ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
265
278
|
key: 0,
|
|
266
279
|
type: "checkbox",
|
|
267
280
|
width: 50,
|
|
268
|
-
fixed: "left"
|
|
281
|
+
fixed: "left",
|
|
282
|
+
align: "center"
|
|
269
283
|
})) : vue.createCommentVNode("", true),
|
|
270
|
-
__props.selectMode === "single" ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
284
|
+
!__props.readonly && __props.selectMode === "single" ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
271
285
|
key: 1,
|
|
272
286
|
type: "radio",
|
|
273
287
|
width: 50,
|
|
288
|
+
align: "center",
|
|
274
289
|
fixed: "left"
|
|
275
290
|
})) : vue.createCommentVNode("", true),
|
|
276
291
|
__props.showIndex ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
@@ -303,7 +318,7 @@ const _sfc_main = {
|
|
|
303
318
|
field
|
|
304
319
|
}, () => [
|
|
305
320
|
field.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, vue.toDisplayString(field.prefix), 1)) : vue.createCommentVNode("", true),
|
|
306
|
-
field.isLink ? (vue.openBlock(), vue.createBlock(_component_el_link, vue.mergeProps({
|
|
321
|
+
field.isLink && !__props.isDialog ? (vue.openBlock(), vue.createBlock(_component_el_link, vue.mergeProps({
|
|
307
322
|
key: 1,
|
|
308
323
|
type: "primary"
|
|
309
324
|
}, vue.toHandlers(getEventHandlers(row, field, field.linkConfig))), {
|
|
@@ -330,7 +345,7 @@ const _sfc_main = {
|
|
|
330
345
|
_: 2
|
|
331
346
|
}, 1032, ["field", "title", "width", "min-width", "fixed", "align", "header-align", "sortable", "show-overflow"]);
|
|
332
347
|
}), 128)),
|
|
333
|
-
shouldShowOptColumn.value ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
348
|
+
!__props.readonly && shouldShowOptColumn.value ? (vue.openBlock(), vue.createBlock(vue.unref(index.VxeColumn), {
|
|
334
349
|
key: 3,
|
|
335
350
|
title: "操作",
|
|
336
351
|
width: optColumnWidth.value,
|
|
@@ -358,5 +373,5 @@ const _sfc_main = {
|
|
|
358
373
|
};
|
|
359
374
|
}
|
|
360
375
|
};
|
|
361
|
-
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
376
|
+
const TableColumn = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-4405f869"]]);
|
|
362
377
|
exports.default = TableColumn;
|
|
@@ -45,7 +45,7 @@ const _sfc_main = {
|
|
|
45
45
|
emits: ["search", "reset"],
|
|
46
46
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
47
47
|
vue.useCssVars((_ctx) => ({
|
|
48
|
-
"
|
|
48
|
+
"f2b12ff4": `${config.value.collapseRows * 90}px`
|
|
49
49
|
}));
|
|
50
50
|
const props = __props;
|
|
51
51
|
const emit = __emit;
|
|
@@ -79,12 +79,15 @@ const _sfc_main = {
|
|
|
79
79
|
return fieldCount > maxVisibleFields;
|
|
80
80
|
});
|
|
81
81
|
const isSingleLine = vue.computed(() => {
|
|
82
|
+
const totalRows = Math.ceil(
|
|
83
|
+
completeFilterFields.value.length / config.value.columnCount
|
|
84
|
+
);
|
|
85
|
+
if (totalRows === 1) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
82
88
|
if (isCollapsed.value) {
|
|
83
89
|
return config.value.collapseRows === 1;
|
|
84
90
|
} else {
|
|
85
|
-
const totalRows = Math.ceil(
|
|
86
|
-
completeFilterFields.value.length / config.value.columnCount
|
|
87
|
-
);
|
|
88
91
|
return totalRows === 1;
|
|
89
92
|
}
|
|
90
93
|
});
|
|
@@ -302,5 +305,5 @@ const _sfc_main = {
|
|
|
302
305
|
};
|
|
303
306
|
}
|
|
304
307
|
};
|
|
305
|
-
const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
308
|
+
const TableFilter = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-ae5195b7"]]);
|
|
306
309
|
exports.default = TableFilter;
|
|
@@ -5,11 +5,16 @@ const vue = require("vue");
|
|
|
5
5
|
;/* empty css */
|
|
6
6
|
;/* empty css */
|
|
7
7
|
;/* empty css */
|
|
8
|
-
;/* empty css */
|
|
9
8
|
;/* empty css */
|
|
10
|
-
;/* empty css */
|
|
11
9
|
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
require("../components/table/index.js");
|
|
12
|
+
require("../components/forms/form/index.js");
|
|
13
|
+
require("../utils/formulajs/functionCore.js");
|
|
12
14
|
const eventFlowHandler = require("../utils/eventFlow/eventFlowHandler.js");
|
|
15
|
+
;/* empty css */
|
|
16
|
+
;/* empty css */
|
|
17
|
+
;/* empty css */
|
|
13
18
|
function usePageEvents(getOptions) {
|
|
14
19
|
if (typeof getOptions !== "function") {
|
|
15
20
|
const staticOptions = getOptions;
|
|
@@ -17,7 +22,7 @@ function usePageEvents(getOptions) {
|
|
|
17
22
|
}
|
|
18
23
|
const executeEvent = async (eventName) => {
|
|
19
24
|
const options = getOptions();
|
|
20
|
-
const { pageEventConfig,
|
|
25
|
+
const { pageEventConfig, instance, formData, localConfig, components, fields, initSearchData } = options;
|
|
21
26
|
if (!pageEventConfig || !Array.isArray(pageEventConfig) || pageEventConfig.length === 0) {
|
|
22
27
|
console.log(`页面事件 ${eventName} 未配置或配置未加载完成,跳过执行`);
|
|
23
28
|
return;
|
|
@@ -29,9 +34,12 @@ function usePageEvents(getOptions) {
|
|
|
29
34
|
}
|
|
30
35
|
const { getEventHandlers: createEventHandlers } = eventFlowHandler.useEventFlow({
|
|
31
36
|
fields: fields || [],
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
components: components || {}
|
|
37
|
+
instance,
|
|
38
|
+
localConfig: localConfig || {},
|
|
39
|
+
components: components || {},
|
|
40
|
+
metadata: {
|
|
41
|
+
initSearchData
|
|
42
|
+
}
|
|
35
43
|
});
|
|
36
44
|
const handler = createEventHandlers(
|
|
37
45
|
{},
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const cloneDeep$1 = require("../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js");
|
|
4
|
+
const isEqual$1 = require("../../../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js");
|
|
4
5
|
function cloneDeep(data) {
|
|
5
6
|
return cloneDeep$1.default(data);
|
|
6
7
|
}
|
|
8
|
+
function isEqual(data1, data2) {
|
|
9
|
+
return isEqual$1.default(data1, data2);
|
|
10
|
+
}
|
|
7
11
|
function removeEmptyValues(data) {
|
|
8
12
|
if (typeof data !== "object" || data === null) {
|
|
9
13
|
return data;
|
|
@@ -25,4 +29,5 @@ function removeEmptyValues(data) {
|
|
|
25
29
|
return result;
|
|
26
30
|
}
|
|
27
31
|
exports.cloneDeep = cloneDeep;
|
|
32
|
+
exports.isEqual = isEqual;
|
|
28
33
|
exports.removeEmptyValues = removeEmptyValues;
|