fast-element-plus 2.0.15 → 2.0.17
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/CHANGELOG.md +28 -0
- package/dist/component.d.ts +6570 -2
- package/dist/component.mjs.map +1 -1
- package/dist/components/avatar/src/avatar.d.ts +19 -7
- package/dist/components/avatar/src/avatar.mjs +5 -0
- package/dist/components/avatar/src/avatar.mjs.map +1 -1
- package/dist/components/button/src/button.d.ts +4 -4
- package/dist/components/button/src/button.mjs +3 -4
- package/dist/components/button/src/button.mjs.map +1 -1
- package/dist/components/carNumber/src/carNumber.mjs +7 -9
- package/dist/components/carNumber/src/carNumber.mjs.map +1 -1
- package/dist/components/contextMenu/index.d.ts +1 -1
- package/dist/components/contextMenu/index.mjs.map +1 -1
- package/dist/components/contextMenu/src/contextMenu.d.ts +2 -2
- package/dist/components/contextMenu/src/contextMenu.mjs +10 -9
- package/dist/components/contextMenu/src/contextMenu.mjs.map +1 -1
- package/dist/components/dialog/src/dialog.d.ts +7 -4
- package/dist/components/dialog/src/dialog.mjs +10 -11
- package/dist/components/dialog/src/dialog.mjs.map +1 -1
- package/dist/components/drawer/src/drawer.d.ts +2 -2
- package/dist/components/drawer/src/drawer.mjs +18 -18
- package/dist/components/drawer/src/drawer.mjs.map +1 -1
- package/dist/components/form/src/form.d.ts +34 -16
- package/dist/components/form/src/form.mjs +8 -9
- package/dist/components/form/src/form.mjs.map +1 -1
- package/dist/components/form/src/formItem.d.ts +4 -4
- package/dist/components/form/src/formItem.mjs +18 -17
- package/dist/components/form/src/formItem.mjs.map +1 -1
- package/dist/components/form/utils/form.d.ts +3 -3
- package/dist/components/form/utils/form.mjs +6 -10
- package/dist/components/form/utils/form.mjs.map +1 -1
- package/dist/components/icon/src/icon.mjs.map +1 -1
- package/dist/components/iconSelector/src/iconSelector.d.ts +2 -2
- package/dist/components/iconSelector/src/iconSelector.mjs +4 -5
- package/dist/components/iconSelector/src/iconSelector.mjs.map +1 -1
- package/dist/components/image/src/image.d.ts +1 -1
- package/dist/components/image/src/image.mjs +3 -3
- package/dist/components/image/src/image.mjs.map +1 -1
- package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +4 -4
- package/dist/components/inputDialogPage/src/inputDialogPage.mjs +11 -15
- package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
- package/dist/components/layoutGrid/index.d.ts +1 -1
- package/dist/components/layoutGrid/index.mjs.map +1 -1
- package/dist/components/layoutGrid/src/layoutGrid.d.ts +23 -11
- package/dist/components/layoutGrid/src/layoutGrid.mjs +44 -45
- package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
- package/dist/components/layoutGrid/src/layoutGrid.type.d.ts +1 -1
- package/dist/components/layoutGrid/src/layoutGridItem.mjs +13 -14
- package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.mjs.map +1 -1
- package/dist/components/select/src/select.d.ts +29 -14
- package/dist/components/select/src/select.mjs +47 -45
- package/dist/components/select/src/select.mjs.map +1 -1
- package/dist/components/select/src/selectOption.mjs +4 -5
- package/dist/components/select/src/selectOption.mjs.map +1 -1
- package/dist/components/selectPage/src/selectPage.d.ts +29 -14
- package/dist/components/selectPage/src/selectPage.mjs +45 -52
- package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
- package/dist/components/selectV2/src/selectV2.d.ts +51 -31
- package/dist/components/selectV2/src/selectV2.mjs +66 -64
- package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/table/index.mjs +1 -3
- package/dist/components/table/index.mjs.map +1 -1
- package/dist/components/table/src/table.d.ts +72 -38
- package/dist/components/table/src/table.mjs +98 -104
- package/dist/components/table/src/table.mjs.map +1 -1
- package/dist/components/table/src/table.type.d.ts +2 -2
- package/dist/components/table/src/table.type.mjs.map +1 -1
- package/dist/components/table/src/tableColumn.d.ts +7 -7
- package/dist/components/table/src/tableColumn.mjs +25 -45
- package/dist/components/table/src/tableColumn.mjs.map +1 -1
- package/dist/components/table/src/tableColumnSettingDialog.mjs +32 -22
- package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
- package/dist/components/table/src/tablePagination.mjs +2 -3
- package/dist/components/table/src/tablePagination.mjs.map +1 -1
- package/dist/components/table/src/tableSearchForm.d.ts +4 -4
- package/dist/components/table/src/tableSearchForm.mjs +35 -44
- package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
- package/dist/components/table/src/tableSearchFormItem.d.ts +1 -7
- package/dist/components/table/src/tableSearchFormItem.mjs +3 -6
- package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
- package/dist/components/table/src/useTable.d.ts +4 -4
- package/dist/components/table/src/useTable.mjs +19 -20
- package/dist/components/table/src/useTable.mjs.map +1 -1
- package/dist/components/table/utils/table.mjs +6 -8
- package/dist/components/table/utils/table.mjs.map +1 -1
- package/dist/components/tree/index.d.ts +1 -1
- package/dist/components/tree/index.mjs.map +1 -1
- package/dist/components/tree/src/tree.d.ts +9 -9
- package/dist/components/tree/src/tree.mjs +29 -27
- package/dist/components/tree/src/tree.mjs.map +1 -1
- package/dist/components/treeSelect/src/treeSelect.d.ts +38 -35
- package/dist/components/treeSelect/src/treeSelect.mjs +47 -45
- package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
- package/dist/components/upload/src/upload.d.ts +1 -1
- package/dist/components/upload/src/upload.mjs +5 -6
- package/dist/components/upload/src/upload.mjs.map +1 -1
- package/dist/components/upload/src/useUpload.mjs +8 -10
- package/dist/components/upload/src/useUpload.mjs.map +1 -1
- package/dist/components/upload/utils/upload.d.ts +1 -1
- package/dist/components/upload/utils/upload.mjs +1 -1
- package/dist/components/upload/utils/upload.mjs.map +1 -1
- package/dist/components/uploadImage/src/uploadImage.d.ts +8 -5
- package/dist/components/uploadImage/src/uploadImage.mjs +18 -13
- package/dist/components/uploadImage/src/uploadImage.mjs.map +1 -1
- package/dist/components/uploadImages/src/uploadImages.d.ts +8 -5
- package/dist/components/uploadImages/src/uploadImages.mjs +16 -11
- package/dist/components/uploadImages/src/uploadImages.mjs.map +1 -1
- package/dist/directives/click-copy/index.d.ts +1 -1
- package/dist/directives/click-copy/index.mjs +5 -9
- package/dist/directives/click-copy/index.mjs.map +1 -1
- package/dist/directives/click-debounce/index.d.ts +1 -1
- package/dist/directives/click-draggable/index.d.ts +1 -1
- package/dist/directives/click-icon-copy/index.d.ts +1 -1
- package/dist/directives/click-icon-copy/index.mjs.map +1 -1
- package/dist/directives/click-longpress/index.d.ts +1 -1
- package/dist/directives/click-throttle/index.d.ts +1 -1
- package/dist/element-plus.mjs +5 -6
- package/dist/element-plus.mjs.map +1 -1
- package/dist/hooks/use-screenFull/index.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.global.min.js +4 -4
- package/dist/index.global.min.js.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/dist/utils/async/index.mjs +6 -4
- package/dist/utils/async/index.mjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/object/index.d.ts +8 -0
- package/dist/utils/object/index.mjs +113 -0
- package/dist/utils/object/index.mjs.map +1 -0
- package/dist/utils/string/index.mjs +19 -11
- package/dist/utils/string/index.mjs.map +1 -1
- package/dist/utils/vue/emits.mjs.map +1 -1
- package/dist/utils/vue/install.mjs.map +1 -1
- package/dist/utils/vue/render.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +5 -10
- package/dist/components/table/src/page.type.mjs +0 -45
- package/dist/components/table/src/page.type.mjs.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addCssUnit } from "../../../utils/dom/index.mjs";
|
|
2
|
+
import { isEqual } from "../../../utils/object/index.mjs";
|
|
2
3
|
import { useEmits } from "../../../utils/vue/emits.mjs";
|
|
3
4
|
import { useExpose } from "../../../utils/vue/expose.mjs";
|
|
4
5
|
import { definePropType, useProps } from "../../../utils/vue/props.mjs";
|
|
@@ -6,11 +7,9 @@ import { useRender } from "../../../utils/vue/render.mjs";
|
|
|
6
7
|
import { makeSlots } from "../../../utils/vue/slots.mjs";
|
|
7
8
|
import { withDefineType } from "../../../utils/vue/with.mjs";
|
|
8
9
|
import { FaSelectOption } from "../../select/index.mjs";
|
|
9
|
-
import { Fragment, computed, createTextVNode, createVNode, defineComponent, mergeProps,
|
|
10
|
+
import { Fragment, computed, createTextVNode, createVNode, defineComponent, mergeProps, reactive, shallowRef, useModel, watch } from "vue";
|
|
10
11
|
import { Search } from "@element-plus/icons-vue";
|
|
11
12
|
import { ElButton, ElInput, ElOption, ElPagination, ElSelect, selectEmits, selectProps, useGlobalSize } from "element-plus";
|
|
12
|
-
import { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from "lodash-unified";
|
|
13
|
-
import { useVModel } from "@vueuse/core";
|
|
14
13
|
//#region src/components/selectPage/src/selectPage.tsx
|
|
15
14
|
/** FaSelectPage 的运行时 Props 定义。 */
|
|
16
15
|
const faSelectPageProps = {
|
|
@@ -91,13 +90,13 @@ const faSelectPageProps = {
|
|
|
91
90
|
const faSelectPageEmits = {
|
|
92
91
|
...selectEmits,
|
|
93
92
|
/** @description v-model 回调 */
|
|
94
|
-
"update:modelValue": (value) =>
|
|
93
|
+
"update:modelValue": (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean" || typeof value === "object" && value !== null || value == null,
|
|
95
94
|
/** @description 选中数据改变 */
|
|
96
95
|
change: (_data, _value) => true,
|
|
97
96
|
/** @description v-model:label 回调 */
|
|
98
|
-
"update:label": (value) =>
|
|
97
|
+
"update:label": (value) => typeof value === "string" || Array.isArray(value) || value === null,
|
|
99
98
|
/** @description 数据改变 */
|
|
100
|
-
|
|
99
|
+
dataChange: (data) => Array.isArray(data)
|
|
101
100
|
};
|
|
102
101
|
var selectPage_default = defineComponent({
|
|
103
102
|
name: "FaSelectPage",
|
|
@@ -105,8 +104,9 @@ var selectPage_default = defineComponent({
|
|
|
105
104
|
emits: faSelectPageEmits,
|
|
106
105
|
slots: makeSlots(),
|
|
107
106
|
setup(props, { slots, emit, expose }) {
|
|
108
|
-
const selectedLabel =
|
|
109
|
-
const
|
|
107
|
+
const selectedLabel = useModel(props, "label");
|
|
108
|
+
const globalSize = useGlobalSize();
|
|
109
|
+
const selectRef = shallowRef(null);
|
|
110
110
|
const state = reactive({
|
|
111
111
|
value: withDefineType(),
|
|
112
112
|
loading: false,
|
|
@@ -125,7 +125,6 @@ var selectPage_default = defineComponent({
|
|
|
125
125
|
searchValue: void 0,
|
|
126
126
|
defaultSelectorData: withDefineType()
|
|
127
127
|
});
|
|
128
|
-
const selectRef = ref();
|
|
129
128
|
let requestVersion = 0;
|
|
130
129
|
const handleData = (data) => {
|
|
131
130
|
return data.map((item) => {
|
|
@@ -161,7 +160,7 @@ var selectPage_default = defineComponent({
|
|
|
161
160
|
state.echo = false;
|
|
162
161
|
state.totalRows = resData.totalRows ?? 0;
|
|
163
162
|
state.selectorData = handleData(resData.rows ?? []);
|
|
164
|
-
emit("
|
|
163
|
+
emit("dataChange", state.selectorData);
|
|
165
164
|
} catch (error) {
|
|
166
165
|
if (currentRequestVersion !== requestVersion) return;
|
|
167
166
|
state.pageIndex = 1;
|
|
@@ -194,15 +193,37 @@ var selectPage_default = defineComponent({
|
|
|
194
193
|
}
|
|
195
194
|
emit("visible-change", visible);
|
|
196
195
|
};
|
|
196
|
+
const flattenOptions = (data) => data.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);
|
|
197
|
+
const handleChange = (value) => {
|
|
198
|
+
const selectorData = flattenOptions([
|
|
199
|
+
...state.selectedList,
|
|
200
|
+
...state.defaultSelectorData ? [state.defaultSelectorData] : [],
|
|
201
|
+
...state.selectorData
|
|
202
|
+
]);
|
|
203
|
+
if (props.multiple) {
|
|
204
|
+
const valueList = Array.isArray(value) ? value : [];
|
|
205
|
+
if (valueList.length === 0) {
|
|
206
|
+
emit("change", null, null);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
emit("change", valueList.map((item) => selectorData.find((option) => option.value !== void 0 && isEqual(option.value, item))).filter((item) => item !== void 0), value);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (value == null || Array.isArray(value)) {
|
|
213
|
+
emit("change", null, null);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
emit("change", selectorData.find((item) => item.value !== void 0 && isEqual(item.value, value)) ?? null, value);
|
|
217
|
+
};
|
|
197
218
|
watch(() => props.modelValue, (newValue) => {
|
|
198
|
-
if (state.echo &&
|
|
199
|
-
const hasLabel =
|
|
219
|
+
if (state.echo && newValue != null) {
|
|
220
|
+
const hasLabel = props.label != null;
|
|
200
221
|
if (props.multiple) {
|
|
201
222
|
if (!Array.isArray(newValue)) {
|
|
202
223
|
console.error("[Fast:FaSelectPage]", "当启用 multiple 时,传入的 modelValue 必须是 Array。");
|
|
203
224
|
return;
|
|
204
225
|
}
|
|
205
|
-
if (hasLabel && !isArray(props.label)) {
|
|
226
|
+
if (hasLabel && !Array.isArray(props.label)) {
|
|
206
227
|
console.error("[Fast:FaSelectPage]", "当启用 multiple 时,传入的 modelValue:label 必须是 Array。");
|
|
207
228
|
return;
|
|
208
229
|
}
|
|
@@ -219,7 +240,7 @@ var selectPage_default = defineComponent({
|
|
|
219
240
|
console.error("[Fast:FaSelectPage]", "当禁用 multiple 时,传入的 modelValue 不能是 Array。");
|
|
220
241
|
return;
|
|
221
242
|
}
|
|
222
|
-
if (hasLabel && isArray(props.label)) {
|
|
243
|
+
if (hasLabel && Array.isArray(props.label)) {
|
|
223
244
|
console.error("[Fast:FaSelectPage]", "当禁用 multiple 时,传入的 modelValue:label 不能是 Array。");
|
|
224
245
|
return;
|
|
225
246
|
}
|
|
@@ -231,28 +252,6 @@ var selectPage_default = defineComponent({
|
|
|
231
252
|
}
|
|
232
253
|
state.value = newValue;
|
|
233
254
|
}, { immediate: true });
|
|
234
|
-
const flattenOptions = (data) => data.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);
|
|
235
|
-
const handleChange = (value) => {
|
|
236
|
-
const selectorData = flattenOptions([
|
|
237
|
-
...state.selectedList,
|
|
238
|
-
...state.defaultSelectorData ? [state.defaultSelectorData] : [],
|
|
239
|
-
...state.selectorData
|
|
240
|
-
]);
|
|
241
|
-
if (props.multiple) {
|
|
242
|
-
const valueList = Array.isArray(value) ? value : [];
|
|
243
|
-
if (valueList.length === 0) {
|
|
244
|
-
emit("change", null, null);
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
emit("change", valueList.map((item) => selectorData.find((option) => option.value !== void 0 && isEqual(option.value, item))).filter((item) => item !== void 0), value);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
if (isNil(value) || Array.isArray(value)) {
|
|
251
|
-
emit("change", null, null);
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
emit("change", selectorData.find((item) => item.value !== void 0 && isEqual(item.value, value)) ?? null, value);
|
|
255
|
-
};
|
|
256
255
|
watch([() => state.value, () => state.selectorData], ([value]) => {
|
|
257
256
|
const selectorData = flattenOptions([
|
|
258
257
|
...state.selectedList,
|
|
@@ -271,7 +270,7 @@ var selectPage_default = defineComponent({
|
|
|
271
270
|
});
|
|
272
271
|
return;
|
|
273
272
|
}
|
|
274
|
-
if (
|
|
273
|
+
if (value == null || Array.isArray(value)) {
|
|
275
274
|
state.selectedList = [];
|
|
276
275
|
selectedLabel.value = null;
|
|
277
276
|
return;
|
|
@@ -284,13 +283,11 @@ var selectPage_default = defineComponent({
|
|
|
284
283
|
flush: "sync",
|
|
285
284
|
immediate: true
|
|
286
285
|
});
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
});
|
|
286
|
+
watch(() => props.initParam, (newValue, oldValue) => {
|
|
287
|
+
if (!isEqual(newValue, oldValue)) {
|
|
288
|
+
state.nextRefresh = true;
|
|
289
|
+
if (state.value != null) handleModelValueUpdate(props.multiple ? [] : void 0);
|
|
290
|
+
}
|
|
294
291
|
});
|
|
295
292
|
const elSelectProps = useProps(props, selectProps, [
|
|
296
293
|
"modelValue",
|
|
@@ -304,9 +301,9 @@ var selectPage_default = defineComponent({
|
|
|
304
301
|
"visible-change"
|
|
305
302
|
]);
|
|
306
303
|
const elPopperClass = computed(() => [
|
|
307
|
-
`fa-select-page-dropdown fa-select-page-dropdown-${
|
|
304
|
+
`fa-select-page-dropdown fa-select-page-dropdown-${globalSize.value}`,
|
|
308
305
|
props.popperClass,
|
|
309
|
-
props.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${
|
|
306
|
+
props.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${globalSize.value}`
|
|
310
307
|
]);
|
|
311
308
|
useRender(() => createVNode(ElSelect, mergeProps(elSelectProps.value, elSelectEmits.value, {
|
|
312
309
|
"ref": selectRef,
|
|
@@ -337,15 +334,11 @@ var selectPage_default = defineComponent({
|
|
|
337
334
|
"modelValue": state.searchValue,
|
|
338
335
|
"modelModifiers": { "trim": true },
|
|
339
336
|
"onUpdate:modelValue": ($event) => state.searchValue = $event,
|
|
340
|
-
"onKeyup": (event) =>
|
|
341
|
-
if (event.key === "Enter") loadData(1);
|
|
342
|
-
}
|
|
337
|
+
"onKeyup": (event) => event.key === "Enter" && loadData(1)
|
|
343
338
|
}, { append: () => createVNode(ElButton, {
|
|
344
339
|
"loading": state.loading,
|
|
345
340
|
"icon": Search,
|
|
346
|
-
"onClick": () =>
|
|
347
|
-
loadData(1);
|
|
348
|
-
}
|
|
341
|
+
"onClick": () => loadData(1)
|
|
349
342
|
}, null) }),
|
|
350
343
|
slots.header?.()
|
|
351
344
|
])],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/selectPage/src/selectPage.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { Fragment, computed, defineComponent, onMounted, reactive, ref, watch } from \"vue\";\nimport { Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElInput, ElOption, ElPagination, ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { isArray, isBoolean, isEqual, isNil, isNull, isNumber, isObject, isString } from \"lodash-unified\";\nimport { addCssUnit, definePropType, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { FaSelectOption } from \"../../select\";\nimport type { VNode } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** FaSelectPage 的运行时 Props 定义。 */\nexport const faSelectPageProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: (): Partial<SelectComponentProps> => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>>(Function),\n\t\trequired: true as const,\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n};\n\n/** FaSelectPage 的运行时 Emits 定义。 */\nexport const faSelectPageEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue): boolean =>\n\t\tisString(value) || isNumber(value) || isBoolean(value) || isObject(value) || isArray(value) || isNil(value),\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue): boolean => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null): boolean => isString(value) || isArray(value) || isNull(value),\n\t/** @description 数据改变 */\n\tdataChangeCallBack: (data: ElSelectorOutput[]): boolean => isArray(data),\n};\n\n/** FaSelectPage 的插槽参数。 */\nexport interface FaSelectPageSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaSelectPage\",\n\tprops: faSelectPageProps,\n\temits: faSelectPageEmits,\n\tslots: makeSlots<FaSelectPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 选中的数据 */\n\t\t\tselectedList: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t\tpageIndex: 1,\n\t\t\tpageSize: 15,\n\t\t\ttotalRows: 0,\n\t\t\tsearchValue: undefined,\n\t\t\tdefaultSelectorData: withDefineType<ElSelectorOutput>(),\n\t\t});\n\n\t\tconst selectRef = ref<InstanceType<typeof ElSelect>>();\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item): ElSelectorOutput => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (pageIndex?: number): Promise<void> => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tstate.loading = true;\n\t\t\tstate.pageIndex = pageIndex ?? state.pageIndex;\n\t\t\tconst params: PagedInput = {\n\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\tpageIndex: state.pageIndex,\n\t\t\t\tpageSize: state.pageSize,\n\t\t\t\tsearchValue: state.searchValue,\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.totalRows = resData.totalRows ?? 0;\n\t\t\t\tstate.selectorData = handleData(resData.rows ?? []);\n\t\t\t\temit(\"dataChangeCallBack\", state.selectorData);\n\t\t\t} catch (error) {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\tstate.pageIndex = 1;\n\t\t\t\tstate.totalRows = 0;\n\t\t\t\tstate.selectorData = [];\n\t\t\t\tthrow error;\n\t\t\t} finally {\n\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t}\n\t\t};\n\n\t\tconst pageIndexModel = computed({\n\t\t\tget: () => state.pageIndex,\n\t\t\tset: (pageIndex: number) => {\n\t\t\t\tvoid loadData(pageIndex);\n\t\t\t},\n\t\t});\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue): void => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean): Promise<void> => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\tawait loadData();\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && !isNil(newValue)) {\n\t\t\t\t\tconst hasLabel = !isNil(props.label);\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectedList = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.defaultSelectorData = {\n\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue): void => {\n\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t...state.selectedList,\n\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t...state.selectorData,\n\t\t\t]);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t\t...state.selectedList,\n\t\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t\t...state.selectorData,\n\t\t\t\t]);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.selectedList = value\n\t\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t\t.filter((item): item is ElSelectorOutput => item !== undefined);\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = state.selectedList.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isNil(value) || Array.isArray(value)) {\n\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\t\tstate.selectedList = data ? [data] : [];\n\t\t\t\tselectedLabel.value = data?.label ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\tonMounted(() => {\n\t\t\twatch(\n\t\t\t\t() => props.initParam,\n\t\t\t\t(newValue, oldValue) => {\n\t\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\t\tif (!isNil(state.value)) {\n\t\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t`fa-select-page-dropdown fa-select-page-dropdown-${_globalSize.value}`,\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${_globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select-page\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: (): VNode[] =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\t\t\t\t\t)),\n\t\t\t\t\theader: (): VNode[] => [\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t{state.defaultSelectorData?.value !== undefined && (\n\t\t\t\t\t\t\t\t<ElOption\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__default-selector\"\n\t\t\t\t\t\t\t\t\tvalue={state.defaultSelectorData.value}\n\t\t\t\t\t\t\t\t\tlabel={state.defaultSelectorData.label ?? \"\"}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span>{state.defaultSelectorData.label}</span>\n\t\t\t\t\t\t\t\t\t<span>Default</span>\n\t\t\t\t\t\t\t\t</ElOption>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t<ElInput\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__search-input\"\n\t\t\t\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"请输入关键字搜索\"\n\t\t\t\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\t\t\t\tonKeyup={(event: KeyboardEvent) => {\n\t\t\t\t\t\t\t\t\t\tif (event.key === \"Enter\") {\n\t\t\t\t\t\t\t\t\t\t\tvoid loadData(1);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\tappend: () => (\n\t\t\t\t\t\t\t\t\t\t\t<ElButton\n\t\t\t\t\t\t\t\t\t\t\t\tloading={state.loading}\n\t\t\t\t\t\t\t\t\t\t\t\ticon={Search}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvoid loadData(1);\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t</ElInput>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{slots.header?.()}\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t],\n\t\t\t\t\tfooter: () => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<ElPagination\n\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__pagination\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tvModel:currentPage={pageIndexModel.value}\n\t\t\t\t\t\t\t\tpageSize={state.pageSize}\n\t\t\t\t\t\t\t\ttotal={state.totalRows}\n\t\t\t\t\t\t\t\tlayout=\"prev, pager, next, total\"\n\t\t\t\t\t\t\t\tpagerCount={5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{slots.footer?.()}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t),\n\t\t\t\t\t...(slots.prefix && { prefix: (): VNode[] => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: (): VNode[] => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: (): VNode[] => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: (): VNode[] => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(props.multiple\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tlabel: ({ label: _label, value }: { label: string; value: string | number | boolean | object }): VNode[] => {\n\t\t\t\t\t\t\t\t\tconst selectedData = state.selectedList.find((f) => f.value === value);\n\t\t\t\t\t\t\t\t\tif (slots.label) {\n\t\t\t\t\t\t\t\t\t\treturn slots.label({ label: selectedData?.label ?? _label, value: selectedData?.value ?? value });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn selectedData ? [<span class=\"el-select__tags-text\">{selectedData.label}</span>] : [];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: slots.label && {\n\t\t\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }): VNode[] =>\n\t\t\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.value?.selectedLabel),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 选中的数据 */\n\t\t\tselectedList: computed(() => state.selectedList),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearS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,aAAa,MAAM,MAAM,EAAE,UAAU,KAAK;IACrE,IAAI,MAAM,OACT,OAAO,MAAM,MAAM;KAAE,OAAO,cAAc,SAAS;KAAQ,OAAO,cAAc,SAAS;IAAM,CAAC;IAEjG,OAAO,eAAe,CAAA,YAAA,QAAA,EAAA,SAAA,uBAAA,GAAA,CAAqC,aAAa,KAAK,CAAA,CAAA,IAAY,CAAA;GAC1F,EACD,IACC,MAAM,SAAS,EACf,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGN;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,MAAM,eAAe,UAAU,OAAO,IAAI;;GAE1C,eAAe,eAAe,UAAU,OAAO,aAAa;;GAE5D,SAAS,eAAe,MAAM,OAAO;;GAErC,cAAc,eAAe,MAAM,YAAY;;GAE/C,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"selectPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/selectPage/src/selectPage.tsx"],"sourcesContent":["import { Fragment, computed, defineComponent, reactive, shallowRef, useModel, watch } from \"vue\";\nimport { Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElInput, ElOption, ElPagination, ElSelect, selectEmits, selectProps, useGlobalSize } from \"element-plus\";\nimport { addCssUnit, definePropType, isEqual, makeSlots, useEmits, useExpose, useProps, useRender, withDefineType } from \"../../../utils\";\nimport { FaSelectOption } from \"../../select\";\nimport type { ComponentObjectPropsOptions } from \"vue\";\nimport type { ElSelectorModelValue, ElSelectorOutput, ElSelectorValue } from \"../../select\";\nimport type { SelectComponentProps } from \"../../select/src/select\";\nimport type { PagedInput, PagedResult } from \"../../table\";\n\n/** FaSelectPage 的运行时 Props 定义。 */\nexport const faSelectPageProps = {\n\t...selectProps,\n\t/** @description whether Select is disabled 重载使其支持 ElForm*/\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: undefined,\n\t},\n\t/** @description displayed text while loading data from server, default is 'Loading' */\n\tloadingText: {\n\t\ttype: String,\n\t\tdefault: \"加载中...\",\n\t},\n\t/** @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data' */\n\tnoMatchText: {\n\t\ttype: String,\n\t\tdefault: \"暂无匹配的数据\",\n\t},\n\t/** @description displayed text when there is no options, you can also use slot `empty`, default is 'No data' */\n\tnoDataText: {\n\t\ttype: String,\n\t\tdefault: \"暂无数据\",\n\t},\n\t/** @description whether to collapse tags to a text when multiple selecting */\n\tcollapseTags: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true */\n\tcollapseTagsTooltip: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: {\n\t\ttype: definePropType<ElSelectorModelValue>([String, Number, Boolean, Object, Array]),\n\t\tdefault: undefined,\n\t},\n\t/** @description v-model:label绑定值 */\n\tlabel: definePropType<string | string[] | null>([String, Array]),\n\t/** @description 宽度 */\n\twidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"100%\",\n\t},\n\t/** @description 更多细节,只有使用slot的时候有用 */\n\tmoreDetail: Boolean,\n\t/** @description 配置选项 */\n\tprops: {\n\t\ttype: definePropType<SelectComponentProps>(Object),\n\t\tdefault: () => ({\n\t\t\tlabel: \"label\",\n\t\t\thide: \"hide\",\n\t\t\tdisabled: \"disabled\",\n\t\t\tchildren: \"children\",\n\t\t}),\n\t},\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult<ElSelectorOutput>>>(Function),\n\t\trequired: true,\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput | null>([String, Number, Object]),\n} satisfies ComponentObjectPropsOptions;\n\n/** FaSelectPage 的运行时 Emits 定义。 */\nexport const faSelectPageEmits = {\n\t...selectEmits,\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: ElSelectorModelValue) =>\n\t\ttypeof value === \"string\" ||\n\t\ttypeof value === \"number\" ||\n\t\ttypeof value === \"boolean\" ||\n\t\t(typeof value === \"object\" && value !== null) ||\n\t\tvalue == null,\n\t/** @description 选中数据改变 */\n\tchange: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => true,\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | string[] | null) => typeof value === \"string\" || Array.isArray(value) || value === null,\n\t/** @description 数据改变 */\n\tdataChange: (data: ElSelectorOutput[]) => Array.isArray(data),\n};\n\n/** FaSelectPage 的插槽参数。 */\nexport interface FaSelectPageSlots extends Record<string, unknown> {\n\t/** @description FaSelectOption 默认内容插槽 */\n\tdefault: ElSelectorOutput;\n\t/** @description 下拉列表顶部的内容 */\n\theader: never;\n\t/** @description 下拉列表底部的内容 */\n\tfooter: never;\n\t/** @description Select 组件头部内容 */\n\tprefix: never;\n\t/** @description 无选项时的列表 */\n\tempty: never;\n\t/** @description select 组件自定义标签内容 */\n\ttag: never;\n\t/** @description select 组件自定义 loading内容 */\n\tloading: never;\n\t/** @description select 组件自定义标签内容 */\n\tlabel: { label: string; value: string | number | boolean | object };\n}\n\nexport default defineComponent({\n\tname: \"FaSelectPage\",\n\tprops: faSelectPageProps,\n\temits: faSelectPageEmits,\n\tslots: makeSlots<FaSelectPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst selectedLabel = useModel(props, \"label\");\n\n\t\tconst globalSize = useGlobalSize();\n\t\tconst selectRef = shallowRef<InstanceType<typeof ElSelect> | null>(null);\n\n\t\tconst state = reactive({\n\t\t\tvalue: withDefineType<ElSelectorModelValue>(),\n\t\t\tloading: false,\n\t\t\tselectorData: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 选中的数据 */\n\t\t\tselectedList: withDefineType<ElSelectorOutput[]>([]),\n\t\t\t/** 首次出现 */\n\t\t\tdebut: true,\n\t\t\t/** 回显 */\n\t\t\techo: true,\n\t\t\t/** 下次刷新 */\n\t\t\tnextRefresh: false,\n\t\t\tpageIndex: 1,\n\t\t\tpageSize: 15,\n\t\t\ttotalRows: 0,\n\t\t\tsearchValue: undefined,\n\t\t\tdefaultSelectorData: withDefineType<ElSelectorOutput | undefined>(),\n\t\t});\n\n\t\tlet requestVersion = 0;\n\n\t\tconst handleData = (data: ElSelectorOutput[]): ElSelectorOutput[] => {\n\t\t\treturn data\n\t\t\t\t.map((item) => {\n\t\t\t\t\tconst value: unknown = item[props.valueKey];\n\t\t\t\t\tconst label: unknown = typeof props.props.label === \"function\" ? props.props.label(item) : item[props.props.label ?? \"label\"];\n\t\t\t\t\tconst hide: unknown = typeof props.props.hide === \"function\" ? props.props.hide(item) : item[props.props.hide ?? \"hide\"];\n\t\t\t\t\tconst disabled: unknown =\n\t\t\t\t\t\ttypeof props.props.disabled === \"function\" ? props.props.disabled(item) : item[props.props.disabled ?? \"disabled\"];\n\t\t\t\t\tconst children: unknown = item[props.props.children ?? \"children\"];\n\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"object\")\n\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...item,\n\t\t\t\t\t\tchildren: Array.isArray(children) ? handleData(children as ElSelectorOutput[]) : [],\n\t\t\t\t\t\tdisabled: typeof disabled === \"boolean\" ? disabled : undefined,\n\t\t\t\t\t\thide: typeof hide === \"boolean\" ? hide : undefined,\n\t\t\t\t\t\tlabel: typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((item) => item.hide !== true);\n\t\t};\n\n\t\tconst loadData = async (pageIndex?: number) => {\n\t\t\tconst currentRequestVersion = ++requestVersion;\n\t\t\tstate.loading = true;\n\t\t\tstate.pageIndex = pageIndex ?? state.pageIndex;\n\t\t\tconst params: PagedInput = {\n\t\t\t\t...(typeof props.initParam === \"object\" && props.initParam !== null ? props.initParam : {}),\n\t\t\t\tpageIndex: state.pageIndex,\n\t\t\t\tpageSize: state.pageSize,\n\t\t\t\tsearchValue: state.searchValue,\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tconst resData = await props.requestApi(params);\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\t// 这里不允许回显了\n\t\t\t\tstate.echo = false;\n\t\t\t\tstate.totalRows = resData.totalRows ?? 0;\n\t\t\t\tstate.selectorData = handleData(resData.rows ?? []);\n\t\t\t\temit(\"dataChange\", state.selectorData);\n\t\t\t} catch (error) {\n\t\t\t\tif (currentRequestVersion !== requestVersion) return;\n\t\t\t\tstate.pageIndex = 1;\n\t\t\t\tstate.totalRows = 0;\n\t\t\t\tstate.selectorData = [];\n\t\t\t\tthrow error;\n\t\t\t} finally {\n\t\t\t\tif (currentRequestVersion === requestVersion) state.loading = false;\n\t\t\t}\n\t\t};\n\n\t\tconst pageIndexModel = computed({\n\t\t\tget: () => state.pageIndex,\n\t\t\tset: (pageIndex: number) => {\n\t\t\t\tloadData(pageIndex);\n\t\t\t},\n\t\t});\n\n\t\tconst handleModelValueUpdate = (value: ElSelectorModelValue) => {\n\t\t\tstate.value = value;\n\t\t\temit(\"update:modelValue\", value);\n\t\t};\n\n\t\tconst handleVisibleChange = async (visible: boolean) => {\n\t\t\tif (visible) {\n\t\t\t\tif (state.debut) {\n\t\t\t\t\t// 首次出现\n\t\t\t\t\tstate.debut = false;\n\t\t\t\t\tawait loadData();\n\t\t\t\t} else {\n\t\t\t\t\t// 判断再次出现是否需要刷新数据\n\t\t\t\t\tif (state.nextRefresh) {\n\t\t\t\t\t\tstate.nextRefresh = false;\n\t\t\t\t\t\tawait loadData();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// eslint-disable-next-line vue/custom-event-name-casing -- Element Plus 的公开事件名为 visible-change,需要保持原始名称透传。\n\t\t\temit(\"visible-change\", visible);\n\t\t};\n\n\t\tconst flattenOptions = (data: ElSelectorOutput[]): ElSelectorOutput[] =>\n\t\t\tdata.flatMap((item) => [item, ...flattenOptions(item.children ?? [])]);\n\n\t\tconst handleChange = (value?: ElSelectorModelValue) => {\n\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t...state.selectedList,\n\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t...state.selectorData,\n\t\t\t]);\n\t\t\tif (props.multiple) {\n\t\t\t\tconst valueList = Array.isArray(value) ? value : [];\n\t\t\t\tif (valueList.length === 0) {\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst dataList = valueList\n\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t.filter((item) => item !== undefined);\n\t\t\t\temit(\"change\", dataList, value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\temit(\"change\", null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\temit(\"change\", data ?? null, value);\n\t\t};\n\n\t\twatch(\n\t\t\t() => props.modelValue,\n\t\t\t(newValue) => {\n\t\t\t\tif (state.echo && newValue != null) {\n\t\t\t\t\tconst hasLabel = props.label != null;\n\t\t\t\t\t// 判断是否为多选\n\t\t\t\t\tif (props.multiple) {\n\t\t\t\t\t\tif (!Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && !Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当启用 multiple 时,传入的 modelValue:label 必须是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.selectedList = newValue\n\t\t\t\t\t\t\t// 最大选项截取\n\t\t\t\t\t\t\t.slice(0, props.multipleLimit > 0 ? props.multipleLimit : newValue.length)\n\t\t\t\t\t\t\t.map((item, index) => {\n\t\t\t\t\t\t\t\tconst value: unknown = item;\n\t\t\t\t\t\t\t\tconst label: unknown = Array.isArray(props.label) ? props.label[index] : undefined;\n\t\t\t\t\t\t\t\tconst selectorValue: ElSelectorValue | undefined =\n\t\t\t\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t\t\t\t(typeof value === \"string\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"number\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"boolean\" ||\n\t\t\t\t\t\t\t\t\t\ttypeof value === \"object\")\n\t\t\t\t\t\t\t\t\t\t? value\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tvalue: selectorValue,\n\t\t\t\t\t\t\t\t\tlabel: hasLabel && typeof label === \"string\" ? label : undefined,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (hasLabel && Array.isArray(props.label)) {\n\t\t\t\t\t\t\tconsole.error(\"[Fast:FaSelectPage]\", \"当禁用 multiple 时,传入的 modelValue:label 不能是 Array。\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstate.defaultSelectorData = {\n\t\t\t\t\t\t\tvalue: newValue,\n\t\t\t\t\t\t\tlabel: typeof props.label === \"string\" ? props.label : undefined,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstate.value = newValue;\n\t\t\t},\n\t\t\t{\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t[() => state.value, () => state.selectorData],\n\t\t\t([value]) => {\n\t\t\t\tconst selectorData = flattenOptions([\n\t\t\t\t\t...state.selectedList,\n\t\t\t\t\t...(state.defaultSelectorData ? [state.defaultSelectorData] : []),\n\t\t\t\t\t...state.selectorData,\n\t\t\t\t]);\n\n\t\t\t\tif (props.multiple) {\n\t\t\t\t\tif (!Array.isArray(value)) {\n\t\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.selectedList = value\n\t\t\t\t\t\t.map((item) => selectorData.find((option) => option.value !== undefined && isEqual(option.value, item)))\n\t\t\t\t\t\t.filter((item) => item !== undefined);\n\t\t\t\t\tselectedLabel.value = value.map((item, index) => {\n\t\t\t\t\t\tconst data = state.selectedList.find((option) => option.value !== undefined && isEqual(option.value, item));\n\n\t\t\t\t\t\treturn data?.label ?? (Array.isArray(props.label) ? (props.label[index] ?? \"\") : \"\");\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (value == null || Array.isArray(value)) {\n\t\t\t\t\tstate.selectedList = [];\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = selectorData.find((item) => item.value !== undefined && isEqual(item.value, value));\n\t\t\t\tstate.selectedList = data ? [data] : [];\n\t\t\t\tselectedLabel.value = data?.label ?? (typeof props.label === \"string\" ? props.label : null);\n\t\t\t},\n\t\t\t{\n\t\t\t\tdeep: true,\n\t\t\t\tflush: \"sync\",\n\t\t\t\timmediate: true,\n\t\t\t}\n\t\t);\n\n\t\twatch(\n\t\t\t() => props.initParam,\n\t\t\t(newValue, oldValue) => {\n\t\t\t\tif (!isEqual(newValue, oldValue)) {\n\t\t\t\t\tstate.nextRefresh = true;\n\t\t\t\t\tif (state.value != null) {\n\t\t\t\t\t\thandleModelValueUpdate(props.multiple ? [] : undefined);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tconst elSelectProps = useProps(props, selectProps, [\"modelValue\", \"popperClass\", \"loading\", \"props\"]);\n\t\tconst elSelectEmits = useEmits(selectEmits, emit, [\"update:modelValue\", \"change\", \"visible-change\"]);\n\t\tconst elPopperClass = computed(() => [\n\t\t\t`fa-select-page-dropdown fa-select-page-dropdown-${globalSize.value}`,\n\t\t\tprops.popperClass,\n\t\t\tprops.moreDetail && `fa-select-dropdown__more-detail fa-select-dropdown__more-detail-${globalSize.value}`,\n\t\t]);\n\n\t\tuseRender(() => (\n\t\t\t<ElSelect\n\t\t\t\t{...elSelectProps.value}\n\t\t\t\t{...elSelectEmits.value}\n\t\t\t\tref={selectRef}\n\t\t\t\tclass=\"fa-select-page\"\n\t\t\t\tpopperClass={elPopperClass.value}\n\t\t\t\tstyle={{ width: addCssUnit(props.width) }}\n\t\t\t\tmodelValue={state.value}\n\t\t\t\tonUpdate:modelValue={handleModelValueUpdate}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tloading={state.loading}\n\t\t\t\tonVisible-change={handleVisibleChange}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tstate.selectorData.map((item) => (\n\t\t\t\t\t\t\t<FaSelectOption vSlots={{ default: slots.default }} data={item} moreDetail={props.moreDetail} />\n\t\t\t\t\t\t)),\n\t\t\t\t\theader: () => [\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t{state.defaultSelectorData?.value !== undefined && (\n\t\t\t\t\t\t\t\t<ElOption\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__default-selector\"\n\t\t\t\t\t\t\t\t\tvalue={state.defaultSelectorData.value}\n\t\t\t\t\t\t\t\t\tlabel={state.defaultSelectorData.label ?? \"\"}\n\t\t\t\t\t\t\t\t\tdisabled={true}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span>{state.defaultSelectorData.label}</span>\n\t\t\t\t\t\t\t\t\t<span>Default</span>\n\t\t\t\t\t\t\t\t</ElOption>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t<ElInput\n\t\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__search-input\"\n\t\t\t\t\t\t\t\t\tclearable={Boolean(state.searchValue)}\n\t\t\t\t\t\t\t\t\tplaceholder=\"请输入关键字搜索\"\n\t\t\t\t\t\t\t\t\tvModel_trim={state.searchValue}\n\t\t\t\t\t\t\t\t\tonKeyup={(event: KeyboardEvent) => event.key === \"Enter\" && loadData(1)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{\n\t\t\t\t\t\t\t\t\t\tappend: () => <ElButton loading={state.loading} icon={Search} onClick={() => loadData(1)} />,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t</ElInput>\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t{slots.header?.()}\n\t\t\t\t\t\t</Fragment>,\n\t\t\t\t\t],\n\t\t\t\t\tfooter: () => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<ElPagination\n\t\t\t\t\t\t\t\tclass=\"fa-select-page-dropdown__pagination\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tvModel:currentPage={pageIndexModel.value}\n\t\t\t\t\t\t\t\tpageSize={state.pageSize}\n\t\t\t\t\t\t\t\ttotal={state.totalRows}\n\t\t\t\t\t\t\t\tlayout=\"prev, pager, next, total\"\n\t\t\t\t\t\t\t\tpagerCount={5}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{slots.footer?.()}\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t),\n\t\t\t\t\t...(slots.prefix && { prefix: () => slots.prefix?.() ?? [] }),\n\t\t\t\t\t...(slots.empty && { empty: () => slots.empty?.() ?? [] }),\n\t\t\t\t\t...(slots.tag && { tag: () => slots.tag?.() ?? [] }),\n\t\t\t\t\t...(slots.loading && { loading: () => slots.loading?.() ?? [] }),\n\t\t\t\t\t...(props.multiple\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tlabel: ({ label: _label, value }: { label: string; value: string | number | boolean | object }) => {\n\t\t\t\t\t\t\t\t\tconst selectedData = state.selectedList.find((f) => f.value === value);\n\t\t\t\t\t\t\t\t\tif (slots.label) {\n\t\t\t\t\t\t\t\t\t\treturn slots.label({ label: selectedData?.label ?? _label, value: selectedData?.value ?? value });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn selectedData ? [<span class=\"el-select__tags-text\">{selectedData.label}</span>] : [];\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: slots.label && {\n\t\t\t\t\t\t\t\tlabel: ({ label, value }: { label: string; value: string | number | boolean | object }) =>\n\t\t\t\t\t\t\t\t\tslots.label?.({ label, value }) ?? [],\n\t\t\t\t\t\t\t}),\n\t\t\t\t}}\n\t\t\t</ElSelect>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 使选择器的输入框获取焦点 */\n\t\t\tfocus: computed(() => selectRef.value?.focus),\n\t\t\t/** @description 使选择器的输入框失去焦点,并隐藏下拉框 */\n\t\t\tblur: computed(() => selectRef.value?.blur),\n\t\t\t/** @description 获取当前选中的标签 */\n\t\t\tselectedLabel: computed(() => selectRef.value?.selectedLabel),\n\t\t\t/** @description 加载状态 */\n\t\t\tloading: computed(() => state.loading),\n\t\t\t/** @description 选中的数据 */\n\t\t\tselectedList: computed(() => state.selectedList),\n\t\t\t/** @description 刷新 */\n\t\t\trefresh: loadData,\n\t\t\t/** @description 设置选择 */\n\t\t\tsetSelection: (value: Exclude<ElSelectorModelValue, null | undefined>) => handleModelValueUpdate(value),\n\t\t\t/** @description 清除选择 */\n\t\t\tclearSelection: () => handleModelValueUpdate(props.multiple ? [] : undefined),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAa,oBAAoB;CAChC,GAAG;;CAEH,UAAU;EACT,MAAM;EACN,SAAS,KAAA;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM;EACN,SAAS;CACV;;CAEA,cAAc;EACb,MAAM;EACN,SAAS;CACV;;CAEA,qBAAqB;EACpB,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;EACX,MAAM,eAAqC;GAAC;GAAQ;GAAQ;GAAS;GAAQ;EAAK,CAAC;EACnF,SAAS,KAAA;CACV;;CAEA,OAAO,eAAyC,CAAC,QAAQ,KAAK,CAAC;;CAE/D,OAAO;EACN,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,YAAY;;CAEZ,OAAO;EACN,MAAM,eAAqC,MAAM;EACjD,gBAAgB;GACf,OAAO;GACP,MAAM;GACN,UAAU;GACV,UAAU;EACX;CACD;;CAEA,YAAY;EACX,MAAM,eAAgF,QAAQ;EAC9F,UAAU;CACX;;CAEA,WAAW,eAAoD;EAAC;EAAQ;EAAQ;CAAM,CAAC;AACxF;;AAGA,MAAa,oBAAoB;CAChC,GAAG;;CAEH,sBAAsB,UACrB,OAAO,UAAU,YACjB,OAAO,UAAU,YACjB,OAAO,UAAU,aAChB,OAAO,UAAU,YAAY,UAAU,QACxC,SAAS;;C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ClD,GAAI,MAAM,WAAW,EAAE,eAAe,MAAM,UAAU,KAAK,CAAA,EAAG;GAC9D,GAAI,MAAM,WACP,EACA,QAAQ,EAAE,OAAO,QAAQ,YAA0E;IAClG,MAAM,eAAe,MAAM,aAAa,MAAM,MAAM,EAAE,UAAU,KAAK;IACrE,IAAI,MAAM,OACT,OAAO,MAAM,MAAM;KAAE,OAAO,cAAc,SAAS;KAAQ,OAAO,cAAc,SAAS;IAAM,CAAC;IAEjG,OAAO,eAAe,CAAA,YAAA,QAAA,EAAA,SAAA,uBAAA,GAAA,CAAqC,aAAa,KAAK,CAAA,CAAA,IAAY,CAAA;GAC1F,EACD,IACC,MAAM,SAAS,EACf,QAAQ,EAAE,OAAO,YAChB,MAAM,QAAQ;IAAE;IAAO;GAAM,CAAC,KAAK,CAAA,EACrC;EAAE,CAAA,CAGN;EAED,OAAO,UAAU,QAAQ;;GAExB,OAAO,eAAe,UAAU,OAAO,KAAK;;GAE5C,MAAM,eAAe,UAAU,OAAO,IAAI;;GAE1C,eAAe,eAAe,UAAU,OAAO,aAAa;;GAE5D,SAAS,eAAe,MAAM,OAAO;;GAErC,cAAc,eAAe,MAAM,YAAY;;GAE/C,SAAS;;GAET,eAAe,UAA2D,uBAAuB,KAAK;;GAEtG,sBAAsB,uBAAuB,MAAM,WAAW,CAAA,IAAK,KAAA,CAAS;EAC7E,CAAC;CACF;AACD,CAAC"}
|
|
@@ -58,7 +58,7 @@ export declare const SelectV2Props: {
|
|
|
58
58
|
/** @description collapse-tags tooltip configuration */
|
|
59
59
|
tagTooltip: {
|
|
60
60
|
type: PropType<import("element-plus/es/components/select-v2/src/defaults.mjs").TagTooltipProps>;
|
|
61
|
-
default: () =>
|
|
61
|
+
default: () => {};
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* @description The max tags number to be shown. To use this, `collapse-tags` must be true
|
|
@@ -193,7 +193,7 @@ export declare const SelectV2Props: {
|
|
|
193
193
|
*/
|
|
194
194
|
popperOptions: {
|
|
195
195
|
type: PropType<Partial<Options>>;
|
|
196
|
-
default: () =>
|
|
196
|
+
default: () => {};
|
|
197
197
|
};
|
|
198
198
|
/**
|
|
199
199
|
* @description whether search data from server
|
|
@@ -218,7 +218,12 @@ export declare const SelectV2Props: {
|
|
|
218
218
|
*/
|
|
219
219
|
props: {
|
|
220
220
|
type: PropType<Props>;
|
|
221
|
-
default: () =>
|
|
221
|
+
default: () => {
|
|
222
|
+
label: string;
|
|
223
|
+
value: string;
|
|
224
|
+
disabled: string;
|
|
225
|
+
options: string;
|
|
226
|
+
};
|
|
222
227
|
};
|
|
223
228
|
/**
|
|
224
229
|
* @description unique identity key name for value, required when value is an object
|
|
@@ -313,14 +318,14 @@ export declare const SelectV2Props: {
|
|
|
313
318
|
};
|
|
314
319
|
/** 底层虚拟化选择器的运行时 Emits 定义。 */
|
|
315
320
|
export declare const selectV2Emits: {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
"update:modelValue": (_value: ElSelectorModelValue) => boolean;
|
|
322
|
+
change: (_value: ElSelectorModelValue) => boolean;
|
|
323
|
+
"end-reached": (_direction: ScrollbarDirection) => boolean;
|
|
324
|
+
"remove-tag": (_value: ElSelectorValue) => boolean;
|
|
325
|
+
"visible-change": (_visible: boolean) => boolean;
|
|
326
|
+
focus: (_event: FocusEvent) => boolean;
|
|
327
|
+
blur: (_event: FocusEvent) => boolean;
|
|
328
|
+
clear: () => boolean;
|
|
324
329
|
};
|
|
325
330
|
/** FaSelectV2 的运行时 Props 定义。 */
|
|
326
331
|
export declare const faSelectV2Props: {
|
|
@@ -378,7 +383,7 @@ export declare const faSelectV2Props: {
|
|
|
378
383
|
/** @description 下拉框数据 */
|
|
379
384
|
data: {
|
|
380
385
|
type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
|
|
381
|
-
default: () =>
|
|
386
|
+
default: () => never[];
|
|
382
387
|
};
|
|
383
388
|
/** 分页返回 */
|
|
384
389
|
pageResult: BooleanConstructor;
|
|
@@ -427,7 +432,7 @@ export declare const faSelectV2Props: {
|
|
|
427
432
|
/** @description collapse-tags tooltip configuration */
|
|
428
433
|
tagTooltip: {
|
|
429
434
|
type: PropType<import("element-plus/es/components/select-v2/src/defaults.mjs").TagTooltipProps>;
|
|
430
|
-
default: () =>
|
|
435
|
+
default: () => {};
|
|
431
436
|
};
|
|
432
437
|
/**
|
|
433
438
|
* @description The max tags number to be shown. To use this, `collapse-tags` must be true
|
|
@@ -540,7 +545,7 @@ export declare const faSelectV2Props: {
|
|
|
540
545
|
*/
|
|
541
546
|
popperOptions: {
|
|
542
547
|
type: PropType<Partial<Options>>;
|
|
543
|
-
default: () =>
|
|
548
|
+
default: () => {};
|
|
544
549
|
};
|
|
545
550
|
/**
|
|
546
551
|
* @description whether search data from server
|
|
@@ -565,7 +570,12 @@ export declare const faSelectV2Props: {
|
|
|
565
570
|
*/
|
|
566
571
|
props: {
|
|
567
572
|
type: PropType<Props>;
|
|
568
|
-
default: () =>
|
|
573
|
+
default: () => {
|
|
574
|
+
label: string;
|
|
575
|
+
value: string;
|
|
576
|
+
disabled: string;
|
|
577
|
+
options: string;
|
|
578
|
+
};
|
|
569
579
|
};
|
|
570
580
|
/**
|
|
571
581
|
* @description unique identity key name for value, required when value is an object
|
|
@@ -661,13 +671,13 @@ export declare const faSelectV2Props: {
|
|
|
661
671
|
/** FaSelectV2 的运行时 Emits 定义。 */
|
|
662
672
|
export declare const faSelectV2Emits: {
|
|
663
673
|
/** @description v-model 回调 */
|
|
664
|
-
"update:modelValue": (value: ElSelectorModelValue) => boolean;
|
|
674
|
+
"update:modelValue": (value: ElSelectorModelValue) => value is string | number | boolean | object | ElSelectorValue[] | null | undefined;
|
|
665
675
|
/** @description 选中数据改变 */
|
|
666
676
|
change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
|
|
667
677
|
/** @description v-model:label 回调 */
|
|
668
678
|
"update:label": (value: string | string[] | null) => boolean;
|
|
669
679
|
/** @description 数据改变 */
|
|
670
|
-
|
|
680
|
+
dataChange: (data: ElSelectorOutput[]) => boolean;
|
|
671
681
|
"end-reached": (_direction: ScrollbarDirection) => boolean;
|
|
672
682
|
"remove-tag": (_value: ElSelectorValue) => boolean;
|
|
673
683
|
"visible-change": (_visible: boolean) => boolean;
|
|
@@ -756,7 +766,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
756
766
|
/** @description 下拉框数据 */
|
|
757
767
|
data: {
|
|
758
768
|
type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
|
|
759
|
-
default: () =>
|
|
769
|
+
default: () => never[];
|
|
760
770
|
};
|
|
761
771
|
/** 分页返回 */
|
|
762
772
|
pageResult: BooleanConstructor;
|
|
@@ -805,7 +815,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
805
815
|
/** @description collapse-tags tooltip configuration */
|
|
806
816
|
tagTooltip: {
|
|
807
817
|
type: PropType<import("element-plus/es/components/select-v2/src/defaults.mjs").TagTooltipProps>;
|
|
808
|
-
default: () =>
|
|
818
|
+
default: () => {};
|
|
809
819
|
};
|
|
810
820
|
/**
|
|
811
821
|
* @description The max tags number to be shown. To use this, `collapse-tags` must be true
|
|
@@ -918,7 +928,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
918
928
|
*/
|
|
919
929
|
popperOptions: {
|
|
920
930
|
type: PropType<Partial<Options>>;
|
|
921
|
-
default: () =>
|
|
931
|
+
default: () => {};
|
|
922
932
|
};
|
|
923
933
|
/**
|
|
924
934
|
* @description whether search data from server
|
|
@@ -943,7 +953,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
943
953
|
*/
|
|
944
954
|
props: {
|
|
945
955
|
type: PropType<Props>;
|
|
946
|
-
default: () =>
|
|
956
|
+
default: () => {
|
|
957
|
+
label: string;
|
|
958
|
+
value: string;
|
|
959
|
+
disabled: string;
|
|
960
|
+
options: string;
|
|
961
|
+
};
|
|
947
962
|
};
|
|
948
963
|
/**
|
|
949
964
|
* @description unique identity key name for value, required when value is an object
|
|
@@ -1054,13 +1069,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1054
1069
|
clearSelection: () => void;
|
|
1055
1070
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1056
1071
|
/** @description v-model 回调 */
|
|
1057
|
-
"update:modelValue": (value: ElSelectorModelValue) => boolean;
|
|
1072
|
+
"update:modelValue": (value: ElSelectorModelValue) => value is string | number | boolean | object | ElSelectorValue[] | null | undefined;
|
|
1058
1073
|
/** @description 选中数据改变 */
|
|
1059
1074
|
change: (_data: ElSelectorOutput | ElSelectorOutput[] | null, _value?: ElSelectorModelValue) => boolean;
|
|
1060
1075
|
/** @description v-model:label 回调 */
|
|
1061
1076
|
"update:label": (value: string | string[] | null) => boolean;
|
|
1062
1077
|
/** @description 数据改变 */
|
|
1063
|
-
|
|
1078
|
+
dataChange: (data: ElSelectorOutput[]) => boolean;
|
|
1064
1079
|
"end-reached": (_direction: ScrollbarDirection) => boolean;
|
|
1065
1080
|
"remove-tag": (_value: ElSelectorValue) => boolean;
|
|
1066
1081
|
"visible-change": (_visible: boolean) => boolean;
|
|
@@ -1122,7 +1137,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1122
1137
|
/** @description 下拉框数据 */
|
|
1123
1138
|
data: {
|
|
1124
1139
|
type: PropType<ElSelectorOutput<ElSelectorValue, any>[]>;
|
|
1125
|
-
default: () =>
|
|
1140
|
+
default: () => never[];
|
|
1126
1141
|
};
|
|
1127
1142
|
/** 分页返回 */
|
|
1128
1143
|
pageResult: BooleanConstructor;
|
|
@@ -1171,7 +1186,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1171
1186
|
/** @description collapse-tags tooltip configuration */
|
|
1172
1187
|
tagTooltip: {
|
|
1173
1188
|
type: PropType<import("element-plus/es/components/select-v2/src/defaults.mjs").TagTooltipProps>;
|
|
1174
|
-
default: () =>
|
|
1189
|
+
default: () => {};
|
|
1175
1190
|
};
|
|
1176
1191
|
/**
|
|
1177
1192
|
* @description The max tags number to be shown. To use this, `collapse-tags` must be true
|
|
@@ -1284,7 +1299,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1284
1299
|
*/
|
|
1285
1300
|
popperOptions: {
|
|
1286
1301
|
type: PropType<Partial<Options>>;
|
|
1287
|
-
default: () =>
|
|
1302
|
+
default: () => {};
|
|
1288
1303
|
};
|
|
1289
1304
|
/**
|
|
1290
1305
|
* @description whether search data from server
|
|
@@ -1309,7 +1324,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1309
1324
|
*/
|
|
1310
1325
|
props: {
|
|
1311
1326
|
type: PropType<Props>;
|
|
1312
|
-
default: () =>
|
|
1327
|
+
default: () => {
|
|
1328
|
+
label: string;
|
|
1329
|
+
value: string;
|
|
1330
|
+
disabled: string;
|
|
1331
|
+
options: string;
|
|
1332
|
+
};
|
|
1313
1333
|
};
|
|
1314
1334
|
/**
|
|
1315
1335
|
* @description unique identity key name for value, required when value is an object
|
|
@@ -1402,22 +1422,22 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1402
1422
|
default: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1403
1423
|
};
|
|
1404
1424
|
}>> & Readonly<{
|
|
1405
|
-
onBlur?: ((_event: FocusEvent) => any) | undefined;
|
|
1406
|
-
onFocus?: ((_event: FocusEvent) => any) | undefined;
|
|
1407
1425
|
onClear?: (() => any) | undefined;
|
|
1408
1426
|
onChange?: ((_data: ElSelectorOutput<ElSelectorValue, any> | ElSelectorOutput<ElSelectorValue, any>[] | null, _value?: ElSelectorModelValue) => any) | undefined;
|
|
1409
1427
|
"onUpdate:modelValue"?: ((value: ElSelectorModelValue) => any) | undefined;
|
|
1428
|
+
onFocus?: ((_event: FocusEvent) => any) | undefined;
|
|
1429
|
+
onBlur?: ((_event: FocusEvent) => any) | undefined;
|
|
1410
1430
|
"onEnd-reached"?: ((_direction: ScrollbarDirection) => any) | undefined;
|
|
1411
1431
|
"onVisible-change"?: ((_visible: boolean) => any) | undefined;
|
|
1412
1432
|
"onUpdate:label"?: ((value: string | string[] | null) => any) | undefined;
|
|
1413
|
-
|
|
1433
|
+
onDataChange?: ((data: ElSelectorOutput<ElSelectorValue, any>[]) => any) | undefined;
|
|
1414
1434
|
"onRemove-tag"?: ((_value: ElSelectorValue) => any) | undefined;
|
|
1415
1435
|
}>, {
|
|
1416
1436
|
data: ElSelectorOutput<ElSelectorValue, any>[];
|
|
1437
|
+
loading: boolean;
|
|
1417
1438
|
props: Props;
|
|
1418
1439
|
offset: number;
|
|
1419
1440
|
placement: Placement;
|
|
1420
|
-
loading: boolean;
|
|
1421
1441
|
disabled: boolean;
|
|
1422
1442
|
modelValue: ElSelectorModelValue;
|
|
1423
1443
|
autocomplete: "none" | "both" | "inline" | "list";
|