@hbdlzy/ui-core 0.1.6 → 0.1.7
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/README.md +4 -0
- package/components.manifest.json +16 -1
- package/dist/components/BaseTable/BaseTable.types.d.ts +17 -2
- package/dist/components/BaseTable/BaseTable.vue.d.ts +4 -4
- package/dist/components/BaseTable/index.d.ts +1 -1
- package/dist/components/OutlinedTreeSelect/OutlinedTreeSelect.vue.d.ts +1 -1
- package/dist/components/SvgIcon/SvgIcon.types.d.ts +6 -0
- package/dist/components/SvgIcon/SvgIcon.vue.d.ts +32 -0
- package/dist/components/SvgIcon/index.d.ts +3 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.js +788 -133
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/BaseTable/BaseTable.types.ts +19 -2
- package/src/components/BaseTable/BaseTable.vue +1089 -105
- package/src/components/BaseTable/README.md +88 -5
- package/src/components/BaseTable/index.ts +5 -0
- package/src/components/SvgIcon/README.md +53 -0
- package/src/components/SvgIcon/SvgIcon.types.ts +6 -0
- package/src/components/SvgIcon/SvgIcon.vue +68 -0
- package/src/components/SvgIcon/index.ts +5 -0
- package/src/index.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as echarts from "echarts";
|
|
2
2
|
export { echarts };
|
|
3
|
-
import { defineComponent, useSlots, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, renderSlot, toDisplayString, ref, reactive, watch, onMounted, resolveComponent, resolveDirective, createVNode, withDirectives, createBlock, withCtx, Fragment, renderList, createSlots, createTextVNode, mergeProps, withModifiers,
|
|
3
|
+
import { defineComponent, useSlots, computed, openBlock, createElementBlock, normalizeStyle, createElementVNode, createCommentVNode, renderSlot, toDisplayString, normalizeClass, ref, reactive, watch, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, createVNode, withDirectives, createBlock, withCtx, Fragment, renderList, createSlots, createTextVNode, mergeProps, unref, withModifiers, Teleport, withKeys, shallowRef, nextTick, onUnmounted, useAttrs, normalizeProps, guardReactiveProps } from "vue";
|
|
4
4
|
import { ElMessage } from "element-plus";
|
|
5
5
|
import ExcelJS from "exceljs";
|
|
6
6
|
import { saveAs } from "file-saver";
|
|
@@ -179,12 +179,12 @@ var _export_sfc = (sfc, props) => {
|
|
|
179
179
|
}
|
|
180
180
|
return target;
|
|
181
181
|
};
|
|
182
|
-
const _hoisted_1$
|
|
182
|
+
const _hoisted_1$9 = {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "base-card__header"
|
|
185
185
|
};
|
|
186
|
-
const _hoisted_2$
|
|
187
|
-
const _hoisted_3$
|
|
186
|
+
const _hoisted_2$9 = { class: "base-card__header-left" };
|
|
187
|
+
const _hoisted_3$4 = {
|
|
188
188
|
key: 0,
|
|
189
189
|
class: "base-card__title-wrap"
|
|
190
190
|
};
|
|
@@ -211,7 +211,7 @@ const _hoisted_10$1 = {
|
|
|
211
211
|
class: "base-card__tip"
|
|
212
212
|
};
|
|
213
213
|
const _hoisted_11$1 = { class: "base-card__content" };
|
|
214
|
-
const _sfc_main$
|
|
214
|
+
const _sfc_main$b = defineComponent({
|
|
215
215
|
...{
|
|
216
216
|
name: "BaseCard"
|
|
217
217
|
},
|
|
@@ -307,9 +307,9 @@ const _sfc_main$a = defineComponent({
|
|
|
307
307
|
class: "base-card",
|
|
308
308
|
style: normalizeStyle(cardStyles.value)
|
|
309
309
|
}, [
|
|
310
|
-
shouldRenderHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
311
|
-
createElementVNode("div", _hoisted_2$
|
|
312
|
-
hasTitleBlock.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
310
|
+
shouldRenderHeader.value ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
311
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
312
|
+
hasTitleBlock.value ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
|
|
313
313
|
__props.showTitleMarker ? (openBlock(), createElementBlock("span", _hoisted_4$2)) : createCommentVNode("", true),
|
|
314
314
|
_ctx.$slots["title-label"] ? renderSlot(_ctx.$slots, "title-label", { key: 1 }, void 0, true) : (openBlock(), createElementBlock("h4", _hoisted_5$2, toDisplayString(__props.title), 1))
|
|
315
315
|
])) : createCommentVNode("", true),
|
|
@@ -339,34 +339,137 @@ const _sfc_main$a = defineComponent({
|
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
-
var BaseCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
342
|
+
var BaseCard = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-6bfddf1c"]]);
|
|
343
|
+
var SvgIcon_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
344
|
+
const _hoisted_1$8 = ["aria-hidden", "aria-label"];
|
|
345
|
+
const _hoisted_2$8 = ["aria-hidden", "aria-label"];
|
|
346
|
+
const _hoisted_3$3 = ["href", "xlink:href"];
|
|
347
|
+
const _sfc_main$a = defineComponent({
|
|
348
|
+
...{
|
|
349
|
+
name: "SvgIcon"
|
|
350
|
+
},
|
|
351
|
+
__name: "SvgIcon",
|
|
352
|
+
props: {
|
|
353
|
+
iconClass: {},
|
|
354
|
+
className: { default: "" },
|
|
355
|
+
prefix: { default: "icon" },
|
|
356
|
+
ariaLabel: { default: "" }
|
|
357
|
+
},
|
|
358
|
+
setup(__props) {
|
|
359
|
+
const props = __props;
|
|
360
|
+
const normalizedIconClass = computed(() => props.iconClass.trim());
|
|
361
|
+
const normalizedPrefix = computed(() => props.prefix.trim() || "icon");
|
|
362
|
+
const isExternal = computed(() => /^(https?:|mailto:|tel:|data:|blob:)/.test(normalizedIconClass.value));
|
|
363
|
+
const iconName = computed(() => `#${normalizedPrefix.value}-${normalizedIconClass.value}`);
|
|
364
|
+
const ariaHidden = computed(() => props.ariaLabel ? void 0 : "true");
|
|
365
|
+
const externalIconStyle = computed(() => ({
|
|
366
|
+
mask: `url(${normalizedIconClass.value}) no-repeat 50% 50%`,
|
|
367
|
+
WebkitMask: `url(${normalizedIconClass.value}) no-repeat 50% 50%`
|
|
368
|
+
}));
|
|
369
|
+
return (_ctx, _cache) => {
|
|
370
|
+
return isExternal.value ? (openBlock(), createElementBlock("span", {
|
|
371
|
+
key: 0,
|
|
372
|
+
class: normalizeClass(["svg-external-icon svg-icon", __props.className]),
|
|
373
|
+
style: normalizeStyle(externalIconStyle.value),
|
|
374
|
+
"aria-hidden": ariaHidden.value,
|
|
375
|
+
"aria-label": __props.ariaLabel,
|
|
376
|
+
role: "img"
|
|
377
|
+
}, null, 14, _hoisted_1$8)) : (openBlock(), createElementBlock("svg", {
|
|
378
|
+
key: 1,
|
|
379
|
+
class: normalizeClass(["svg-icon", __props.className]),
|
|
380
|
+
"aria-hidden": ariaHidden.value,
|
|
381
|
+
"aria-label": __props.ariaLabel,
|
|
382
|
+
role: "img"
|
|
383
|
+
}, [
|
|
384
|
+
createElementVNode("use", {
|
|
385
|
+
href: iconName.value,
|
|
386
|
+
"xlink:href": iconName.value
|
|
387
|
+
}, null, 8, _hoisted_3$3)
|
|
388
|
+
], 10, _hoisted_2$8));
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
var SvgIcon = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-318312b1"]]);
|
|
343
393
|
var BaseTable_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
344
394
|
const _hoisted_1$7 = { class: "base-table" };
|
|
345
395
|
const _hoisted_2$7 = {
|
|
396
|
+
class: "base-table__svg-sprite",
|
|
397
|
+
"aria-hidden": "true",
|
|
398
|
+
focusable: "false"
|
|
399
|
+
};
|
|
400
|
+
const _hoisted_3$2 = ["id"];
|
|
401
|
+
const _hoisted_4$1 = ["id"];
|
|
402
|
+
const _hoisted_5$1 = ["id"];
|
|
403
|
+
const _hoisted_6 = ["id"];
|
|
404
|
+
const _hoisted_7 = ["id"];
|
|
405
|
+
const _hoisted_8 = ["id"];
|
|
406
|
+
const _hoisted_9 = ["id"];
|
|
407
|
+
const _hoisted_10 = {
|
|
346
408
|
key: 0,
|
|
347
409
|
class: "base-table__toolbar"
|
|
348
410
|
};
|
|
349
|
-
const
|
|
350
|
-
const
|
|
411
|
+
const _hoisted_11 = { class: "base-table__toolbar-left" };
|
|
412
|
+
const _hoisted_12 = {
|
|
351
413
|
key: 0,
|
|
352
414
|
class: "base-table__toolbar-right"
|
|
353
415
|
};
|
|
354
|
-
const
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
416
|
+
const _hoisted_13 = { class: "base-table__header-main" };
|
|
417
|
+
const _hoisted_14 = { class: "base-table__header-label" };
|
|
418
|
+
const _hoisted_15 = {
|
|
419
|
+
key: 0,
|
|
420
|
+
class: "base-table__header-actions"
|
|
421
|
+
};
|
|
422
|
+
const _hoisted_16 = ["onClick"];
|
|
423
|
+
const _hoisted_17 = {
|
|
424
|
+
key: 0,
|
|
425
|
+
class: "base-table__header-select"
|
|
426
|
+
};
|
|
427
|
+
const _hoisted_18 = ["onClick"];
|
|
428
|
+
const _hoisted_19 = {
|
|
429
|
+
key: 0,
|
|
430
|
+
class: "base-table__header-select-tags"
|
|
431
|
+
};
|
|
432
|
+
const _hoisted_20 = {
|
|
433
|
+
key: 0,
|
|
434
|
+
class: "base-table__header-select-tag base-table__header-select-tag--count"
|
|
435
|
+
};
|
|
436
|
+
const _hoisted_21 = {
|
|
437
|
+
key: 0,
|
|
438
|
+
class: "base-table__header-select-options"
|
|
439
|
+
};
|
|
440
|
+
const _hoisted_22 = ["onClick"];
|
|
441
|
+
const _hoisted_23 = ["disabled", "onClick"];
|
|
442
|
+
const _hoisted_24 = { class: "base-table__header-select-option-label" };
|
|
443
|
+
const _hoisted_25 = {
|
|
444
|
+
key: 1,
|
|
445
|
+
class: "base-table__header-cascader"
|
|
446
|
+
};
|
|
447
|
+
const _hoisted_26 = ["onClick"];
|
|
448
|
+
const _hoisted_27 = {
|
|
449
|
+
key: 0,
|
|
450
|
+
class: "base-table__header-cascader-panel"
|
|
451
|
+
};
|
|
452
|
+
const _hoisted_28 = ["disabled", "onClick"];
|
|
453
|
+
const _hoisted_29 = { class: "base-table__header-cascader-label" };
|
|
454
|
+
const _hoisted_30 = {
|
|
455
|
+
key: 0,
|
|
456
|
+
class: "base-table__header-cascader-arrow",
|
|
457
|
+
"aria-hidden": "true"
|
|
458
|
+
};
|
|
459
|
+
const _hoisted_31 = ["value", "placeholder", "onInput", "onKeyup"];
|
|
460
|
+
const _hoisted_32 = { class: "base-table__header-search-footer" };
|
|
461
|
+
const _hoisted_33 = {
|
|
359
462
|
key: 0,
|
|
360
463
|
class: "base-table__actions"
|
|
361
464
|
};
|
|
362
|
-
const
|
|
465
|
+
const _hoisted_34 = {
|
|
363
466
|
key: 2,
|
|
364
467
|
class: "base-table__tags"
|
|
365
468
|
};
|
|
366
|
-
const
|
|
367
|
-
const
|
|
368
|
-
const
|
|
369
|
-
const
|
|
469
|
+
const _hoisted_35 = { key: 1 };
|
|
470
|
+
const _hoisted_36 = ["innerHTML"];
|
|
471
|
+
const _hoisted_37 = ["onClick"];
|
|
472
|
+
const _hoisted_38 = {
|
|
370
473
|
key: 6,
|
|
371
474
|
class: "base-table__text"
|
|
372
475
|
};
|
|
@@ -416,6 +519,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
416
519
|
emits: ["selection-change", "sort-change", "row-action", "cell-click", "cell-input", "page-change", "size-change", "update:pagination", "loaded", "request-error"],
|
|
417
520
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
418
521
|
var _a, _b;
|
|
522
|
+
let baseTableIconSeed = 0;
|
|
419
523
|
const props = __props;
|
|
420
524
|
const emit = __emit;
|
|
421
525
|
const slots = useSlots();
|
|
@@ -425,7 +529,13 @@ const _sfc_main$9 = defineComponent({
|
|
|
425
529
|
const rows = ref(normalizeRows(props.data));
|
|
426
530
|
const selectionRows = ref([]);
|
|
427
531
|
const headerSearchValues = reactive({});
|
|
428
|
-
const
|
|
532
|
+
const headerSearchVisible = reactive({});
|
|
533
|
+
const headerSearchSelectOpen = reactive({});
|
|
534
|
+
const headerSearchCascaderActivePaths = reactive({});
|
|
535
|
+
const headerSearchTriggerRects = reactive({});
|
|
536
|
+
const headerSearchTriggerRefs = ref({});
|
|
537
|
+
const baseTableIconPrefix = `base-table-icon-${++baseTableIconSeed}`;
|
|
538
|
+
let headerSearchPositionFrame = 0;
|
|
429
539
|
const sortState = reactive({
|
|
430
540
|
prop: (_a = props.defaultSort) == null ? void 0 : _a.prop,
|
|
431
541
|
order: ((_b = props.defaultSort) == null ? void 0 : _b.order) || null
|
|
@@ -483,6 +593,8 @@ const _sfc_main$9 = defineComponent({
|
|
|
483
593
|
{ deep: true }
|
|
484
594
|
);
|
|
485
595
|
onMounted(() => {
|
|
596
|
+
window.addEventListener("scroll", scheduleHeaderSearchPositionUpdate, true);
|
|
597
|
+
window.addEventListener("resize", scheduleHeaderSearchPositionUpdate);
|
|
486
598
|
if (props.request && props.autoLoad) {
|
|
487
599
|
void load();
|
|
488
600
|
return;
|
|
@@ -491,6 +603,14 @@ const _sfc_main$9 = defineComponent({
|
|
|
491
603
|
setData(props.data || []);
|
|
492
604
|
}
|
|
493
605
|
});
|
|
606
|
+
onBeforeUnmount(() => {
|
|
607
|
+
window.removeEventListener("scroll", scheduleHeaderSearchPositionUpdate, true);
|
|
608
|
+
window.removeEventListener("resize", scheduleHeaderSearchPositionUpdate);
|
|
609
|
+
if (headerSearchPositionFrame) {
|
|
610
|
+
window.cancelAnimationFrame(headerSearchPositionFrame);
|
|
611
|
+
headerSearchPositionFrame = 0;
|
|
612
|
+
}
|
|
613
|
+
});
|
|
494
614
|
function syncPagination(value) {
|
|
495
615
|
const nextPageSizes = value == null ? void 0 : value.pageSizes;
|
|
496
616
|
paginationState.currentPage = Number((value == null ? void 0 : value.currentPage) || paginationState.currentPage || 1);
|
|
@@ -630,8 +750,11 @@ const _sfc_main$9 = defineComponent({
|
|
|
630
750
|
value
|
|
631
751
|
});
|
|
632
752
|
}
|
|
753
|
+
function resolveHeaderContentAlign(column) {
|
|
754
|
+
return column.headerAlign || column.align || "left";
|
|
755
|
+
}
|
|
633
756
|
function shouldRenderBuiltInHeader(column) {
|
|
634
|
-
return hasHeaderSearch(column);
|
|
757
|
+
return hasHeaderSearch(column) || isHeaderSortable(column);
|
|
635
758
|
}
|
|
636
759
|
function hasHeaderSearch(column) {
|
|
637
760
|
return Boolean(getHeaderSearchConfig(column));
|
|
@@ -648,36 +771,154 @@ const _sfc_main$9 = defineComponent({
|
|
|
648
771
|
function getHeaderSearchStateKey(column) {
|
|
649
772
|
return resolveHeaderSearchParamKey(column) || getColumnProp(column) || getColumnKey(column);
|
|
650
773
|
}
|
|
651
|
-
function
|
|
774
|
+
function resolveHeaderSearchParamKey(column) {
|
|
775
|
+
const config = getHeaderSearchConfig(column);
|
|
776
|
+
const legacyParamKey = column.otherProps;
|
|
777
|
+
return (config == null ? void 0 : config.paramKey) || legacyParamKey || getColumnProp(column) || "";
|
|
778
|
+
}
|
|
779
|
+
function setHeaderSearchTriggerRef(instance, column) {
|
|
652
780
|
const stateKey = getHeaderSearchStateKey(column);
|
|
653
|
-
if (!instance) {
|
|
654
|
-
delete
|
|
781
|
+
if (!(instance instanceof HTMLElement)) {
|
|
782
|
+
delete headerSearchTriggerRefs.value[stateKey];
|
|
655
783
|
return;
|
|
656
784
|
}
|
|
657
|
-
|
|
785
|
+
headerSearchTriggerRefs.value[stateKey] = instance;
|
|
658
786
|
}
|
|
659
|
-
function
|
|
787
|
+
function bindHeaderSearchTrigger(column) {
|
|
660
788
|
return (instance) => {
|
|
661
|
-
|
|
789
|
+
setHeaderSearchTriggerRef(instance, column);
|
|
662
790
|
};
|
|
663
791
|
}
|
|
664
|
-
function
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
792
|
+
function isHeaderSearchVisible(column) {
|
|
793
|
+
return Boolean(headerSearchVisible[getHeaderSearchStateKey(column)]);
|
|
794
|
+
}
|
|
795
|
+
function toggleHeaderSearch(column) {
|
|
796
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
797
|
+
const nextVisible = !headerSearchVisible[stateKey];
|
|
798
|
+
if (nextVisible) {
|
|
799
|
+
closeAllHeaderSearch();
|
|
800
|
+
updateHeaderSearchTriggerRect(column);
|
|
801
|
+
syncHeaderSearchCascaderActivePath(column);
|
|
802
|
+
}
|
|
803
|
+
headerSearchVisible[stateKey] = nextVisible;
|
|
804
|
+
headerSearchSelectOpen[stateKey] = false;
|
|
805
|
+
}
|
|
806
|
+
function closeAllHeaderSearch() {
|
|
807
|
+
Object.keys(headerSearchVisible).forEach((key) => {
|
|
808
|
+
headerSearchVisible[key] = false;
|
|
809
|
+
headerSearchSelectOpen[key] = false;
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
function updateHeaderSearchTriggerRect(column) {
|
|
813
|
+
var _a2;
|
|
814
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
815
|
+
const rect = (_a2 = headerSearchTriggerRefs.value[stateKey]) == null ? void 0 : _a2.getBoundingClientRect();
|
|
816
|
+
if (rect) {
|
|
817
|
+
headerSearchTriggerRects[stateKey] = rect;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
function updateVisibleHeaderSearchPosition() {
|
|
821
|
+
props.columns.forEach((column) => {
|
|
822
|
+
if (hasHeaderSearch(column) && isHeaderSearchVisible(column)) {
|
|
823
|
+
updateHeaderSearchTriggerRect(column);
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
function scheduleHeaderSearchPositionUpdate() {
|
|
828
|
+
if (headerSearchPositionFrame) {
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
headerSearchPositionFrame = window.requestAnimationFrame(() => {
|
|
832
|
+
headerSearchPositionFrame = 0;
|
|
833
|
+
updateVisibleHeaderSearchPosition();
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
function getHeaderSearchPanelStyle(column) {
|
|
837
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
838
|
+
const triggerRect = headerSearchTriggerRects[stateKey];
|
|
839
|
+
const width = toCssValue(getHeaderSearchWidth(column)) || "280px";
|
|
840
|
+
if (!triggerRect) {
|
|
841
|
+
return {
|
|
842
|
+
width
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
const panelWidth = Number.parseFloat(String(getHeaderSearchWidth(column))) || 280;
|
|
846
|
+
const maxLeft = Math.max(8, window.innerWidth - panelWidth - 8);
|
|
847
|
+
const left = Math.min(maxLeft, Math.max(8, triggerRect.right - panelWidth));
|
|
848
|
+
const top = triggerRect.bottom + 8;
|
|
849
|
+
return {
|
|
850
|
+
width,
|
|
851
|
+
left: `${left}px`,
|
|
852
|
+
top: `${top}px`
|
|
853
|
+
};
|
|
668
854
|
}
|
|
669
855
|
function getHeaderSearchValue(column) {
|
|
670
|
-
|
|
856
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
857
|
+
const value = headerSearchValues[stateKey];
|
|
858
|
+
if (value !== void 0) {
|
|
859
|
+
return value;
|
|
860
|
+
}
|
|
861
|
+
return getHeaderSearchEmptyValue(column);
|
|
862
|
+
}
|
|
863
|
+
function getHeaderSearchInputValue(column) {
|
|
864
|
+
const value = getHeaderSearchValue(column);
|
|
865
|
+
return Array.isArray(value) ? value.join(" ") : String(value);
|
|
671
866
|
}
|
|
672
867
|
function hasHeaderSearchValue(column) {
|
|
673
|
-
return
|
|
868
|
+
return isHeaderSearchValueFilled(getHeaderSearchValue(column));
|
|
674
869
|
}
|
|
675
870
|
function updateHeaderSearchValue(column, value) {
|
|
676
|
-
headerSearchValues[getHeaderSearchStateKey(column)] = normalizeHeaderSearchValue(value);
|
|
871
|
+
headerSearchValues[getHeaderSearchStateKey(column)] = normalizeHeaderSearchValue(column, value);
|
|
872
|
+
}
|
|
873
|
+
function handleHeaderSearchInput(column, event) {
|
|
874
|
+
var _a2;
|
|
875
|
+
updateHeaderSearchValue(column, ((_a2 = event.target) == null ? void 0 : _a2.value) || "");
|
|
876
|
+
}
|
|
877
|
+
function isHeaderSearchSelect(column) {
|
|
878
|
+
var _a2;
|
|
879
|
+
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.type) === "select";
|
|
880
|
+
}
|
|
881
|
+
function isHeaderSearchCascader(column) {
|
|
882
|
+
var _a2;
|
|
883
|
+
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.type) === "cascader";
|
|
884
|
+
}
|
|
885
|
+
function isHeaderSearchChoice(column) {
|
|
886
|
+
return isHeaderSearchSelect(column) || isHeaderSearchCascader(column);
|
|
887
|
+
}
|
|
888
|
+
function isHeaderSearchMultiple(column) {
|
|
889
|
+
var _a2;
|
|
890
|
+
return isHeaderSearchSelect(column) && ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.multiple) === true;
|
|
891
|
+
}
|
|
892
|
+
function getHeaderSearchIconName(column) {
|
|
893
|
+
const iconName = isHeaderSearchChoice(column) ? "select" : "search";
|
|
894
|
+
return hasHeaderSearchValue(column) ? `${iconName}-y` : iconName;
|
|
895
|
+
}
|
|
896
|
+
function isHeaderSortable(column) {
|
|
897
|
+
return Boolean(resolveColumnSortable(column));
|
|
898
|
+
}
|
|
899
|
+
function isHeaderSortActive(column) {
|
|
900
|
+
return String(sortState.prop || "") === String(getColumnProp(column) || "") && Boolean(sortState.order);
|
|
901
|
+
}
|
|
902
|
+
function getHeaderSortIconName(column) {
|
|
903
|
+
if (!isHeaderSortActive(column)) {
|
|
904
|
+
return "sort-none";
|
|
905
|
+
}
|
|
906
|
+
return sortState.order === "ascending" ? "sort-up" : "sort-down";
|
|
907
|
+
}
|
|
908
|
+
function isHeaderSearchSelectOpen(column) {
|
|
909
|
+
return Boolean(headerSearchSelectOpen[getHeaderSearchStateKey(column)]);
|
|
910
|
+
}
|
|
911
|
+
function toggleHeaderSearchSelect(column) {
|
|
912
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
913
|
+
const nextOpen = !headerSearchSelectOpen[stateKey];
|
|
914
|
+
if (nextOpen) {
|
|
915
|
+
syncHeaderSearchCascaderActivePath(column);
|
|
916
|
+
}
|
|
917
|
+
headerSearchSelectOpen[stateKey] = nextOpen;
|
|
677
918
|
}
|
|
678
919
|
function getHeaderSearchPlaceholder(column) {
|
|
679
920
|
var _a2;
|
|
680
|
-
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.placeholder) || "\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9";
|
|
921
|
+
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.placeholder) || (isHeaderSearchChoice(column) ? "\u8BF7\u9009\u62E9" : "\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9");
|
|
681
922
|
}
|
|
682
923
|
function getHeaderSearchWidth(column) {
|
|
683
924
|
var _a2;
|
|
@@ -691,6 +932,156 @@ const _sfc_main$9 = defineComponent({
|
|
|
691
932
|
var _a2;
|
|
692
933
|
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.resetText) || "\u91CD\u7F6E";
|
|
693
934
|
}
|
|
935
|
+
function getHeaderSearchOptions(column) {
|
|
936
|
+
var _a2;
|
|
937
|
+
return ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.options) || column.options || [];
|
|
938
|
+
}
|
|
939
|
+
function getHeaderSearchOptionValue(option, column) {
|
|
940
|
+
var _a2;
|
|
941
|
+
const valueKey = ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.optionValueKey) || column.optionValueKey || "value";
|
|
942
|
+
return normalizeHeaderSearchPrimitiveValue(option[valueKey]);
|
|
943
|
+
}
|
|
944
|
+
function getHeaderSearchOptionLabel(option, column) {
|
|
945
|
+
var _a2;
|
|
946
|
+
const labelKey = ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.optionLabelKey) || column.optionLabelKey || "label";
|
|
947
|
+
const label = option[labelKey];
|
|
948
|
+
return label === void 0 || label === null ? "" : String(label);
|
|
949
|
+
}
|
|
950
|
+
function isHeaderSearchOptionDisabled(option, column) {
|
|
951
|
+
var _a2;
|
|
952
|
+
const disabledKey = ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.optionDisabledKey) || "disabled";
|
|
953
|
+
return Boolean(option[disabledKey]);
|
|
954
|
+
}
|
|
955
|
+
function getHeaderSearchOptionChildren(option, column) {
|
|
956
|
+
var _a2;
|
|
957
|
+
const childrenKey = ((_a2 = getHeaderSearchConfig(column)) == null ? void 0 : _a2.optionChildrenKey) || "children";
|
|
958
|
+
const children = option[childrenKey];
|
|
959
|
+
return Array.isArray(children) ? children : [];
|
|
960
|
+
}
|
|
961
|
+
function hasHeaderSearchOptionChildren(option, column) {
|
|
962
|
+
return getHeaderSearchOptionChildren(option, column).length > 0;
|
|
963
|
+
}
|
|
964
|
+
function getHeaderSearchSelectLabel(column) {
|
|
965
|
+
const selectedLabels = getHeaderSearchSelectedLabels(column);
|
|
966
|
+
if (!selectedLabels.length) {
|
|
967
|
+
return getHeaderSearchPlaceholder(column);
|
|
968
|
+
}
|
|
969
|
+
return selectedLabels.join("\u3001");
|
|
970
|
+
}
|
|
971
|
+
function getHeaderSearchSelectedLabels(column) {
|
|
972
|
+
const selectedValues = toComparableValues(getHeaderSearchValue(column));
|
|
973
|
+
return selectedValues.map((selectedValue) => {
|
|
974
|
+
const matchedOption = getHeaderSearchOptions(column).find((option) => {
|
|
975
|
+
return String(getHeaderSearchOptionValue(option, column)) === selectedValue;
|
|
976
|
+
});
|
|
977
|
+
return matchedOption ? getHeaderSearchOptionLabel(matchedOption, column) : selectedValue;
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
function isHeaderSearchOptionSelected(option, column) {
|
|
981
|
+
const optionValue = String(getHeaderSearchOptionValue(option, column));
|
|
982
|
+
return toComparableValues(getHeaderSearchValue(column)).includes(optionValue);
|
|
983
|
+
}
|
|
984
|
+
function handleHeaderSearchSelectEmpty(column) {
|
|
985
|
+
updateHeaderSearchValue(column, getHeaderSearchEmptyValue(column));
|
|
986
|
+
headerSearchSelectOpen[getHeaderSearchStateKey(column)] = false;
|
|
987
|
+
}
|
|
988
|
+
function handleHeaderSearchSelectValue(column, optionValue) {
|
|
989
|
+
if (!isHeaderSearchMultiple(column)) {
|
|
990
|
+
updateHeaderSearchValue(column, optionValue);
|
|
991
|
+
headerSearchSelectOpen[getHeaderSearchStateKey(column)] = false;
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
const currentValues = Array.isArray(getHeaderSearchValue(column)) ? [...getHeaderSearchValue(column)] : [];
|
|
995
|
+
const comparableValue = String(optionValue);
|
|
996
|
+
const matchedIndex = currentValues.findIndex((item) => String(item) === comparableValue);
|
|
997
|
+
if (matchedIndex >= 0) {
|
|
998
|
+
currentValues.splice(matchedIndex, 1);
|
|
999
|
+
} else {
|
|
1000
|
+
currentValues.push(optionValue);
|
|
1001
|
+
}
|
|
1002
|
+
updateHeaderSearchValue(column, currentValues);
|
|
1003
|
+
}
|
|
1004
|
+
function getHeaderSearchCascaderValue(column) {
|
|
1005
|
+
return normalizeHeaderSearchPathValue(getHeaderSearchValue(column));
|
|
1006
|
+
}
|
|
1007
|
+
function syncHeaderSearchCascaderActivePath(column) {
|
|
1008
|
+
if (!isHeaderSearchCascader(column)) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
1011
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
1012
|
+
headerSearchCascaderActivePaths[stateKey] = getHeaderSearchCascaderValue(column);
|
|
1013
|
+
}
|
|
1014
|
+
function getHeaderSearchCascaderActivePath(column) {
|
|
1015
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
1016
|
+
const activePath = headerSearchCascaderActivePaths[stateKey];
|
|
1017
|
+
if (activePath) {
|
|
1018
|
+
return activePath;
|
|
1019
|
+
}
|
|
1020
|
+
return getHeaderSearchCascaderValue(column);
|
|
1021
|
+
}
|
|
1022
|
+
function getHeaderSearchCascaderColumns(column) {
|
|
1023
|
+
const columns = [];
|
|
1024
|
+
let levelOptions = getHeaderSearchOptions(column);
|
|
1025
|
+
const activePath = getHeaderSearchCascaderActivePath(column);
|
|
1026
|
+
let levelIndex = 0;
|
|
1027
|
+
while (levelOptions.length) {
|
|
1028
|
+
columns.push(levelOptions);
|
|
1029
|
+
const activeValue = activePath[levelIndex];
|
|
1030
|
+
const activeOption = levelOptions.find((option) => {
|
|
1031
|
+
return String(getHeaderSearchOptionValue(option, column)) === String(activeValue);
|
|
1032
|
+
});
|
|
1033
|
+
if (!activeOption) {
|
|
1034
|
+
break;
|
|
1035
|
+
}
|
|
1036
|
+
levelOptions = getHeaderSearchOptionChildren(activeOption, column);
|
|
1037
|
+
levelIndex += 1;
|
|
1038
|
+
}
|
|
1039
|
+
return columns;
|
|
1040
|
+
}
|
|
1041
|
+
function getHeaderSearchCascaderLabel(column) {
|
|
1042
|
+
const path = getHeaderSearchCascaderValue(column);
|
|
1043
|
+
if (!path.length) {
|
|
1044
|
+
return getHeaderSearchPlaceholder(column);
|
|
1045
|
+
}
|
|
1046
|
+
return getHeaderSearchCascaderPathLabels(column, path).join(" / ");
|
|
1047
|
+
}
|
|
1048
|
+
function getHeaderSearchCascaderPathLabels(column, path = getHeaderSearchCascaderValue(column)) {
|
|
1049
|
+
const labels = [];
|
|
1050
|
+
let levelOptions = getHeaderSearchOptions(column);
|
|
1051
|
+
path.forEach((value) => {
|
|
1052
|
+
const matchedOption = levelOptions.find((option) => {
|
|
1053
|
+
return String(getHeaderSearchOptionValue(option, column)) === String(value);
|
|
1054
|
+
});
|
|
1055
|
+
if (!matchedOption) {
|
|
1056
|
+
labels.push(String(value));
|
|
1057
|
+
levelOptions = [];
|
|
1058
|
+
return;
|
|
1059
|
+
}
|
|
1060
|
+
labels.push(getHeaderSearchOptionLabel(matchedOption, column));
|
|
1061
|
+
levelOptions = getHeaderSearchOptionChildren(matchedOption, column);
|
|
1062
|
+
});
|
|
1063
|
+
return labels;
|
|
1064
|
+
}
|
|
1065
|
+
function isHeaderSearchCascaderOptionActive(column, option, levelIndex) {
|
|
1066
|
+
const activePath = getHeaderSearchCascaderActivePath(column);
|
|
1067
|
+
return String(activePath[levelIndex]) === String(getHeaderSearchOptionValue(option, column));
|
|
1068
|
+
}
|
|
1069
|
+
function isHeaderSearchCascaderOptionSelected(column, option, levelIndex) {
|
|
1070
|
+
const selectedPath = getHeaderSearchCascaderValue(column);
|
|
1071
|
+
return String(selectedPath[levelIndex]) === String(getHeaderSearchOptionValue(option, column));
|
|
1072
|
+
}
|
|
1073
|
+
function handleHeaderSearchCascaderOption(column, option, levelIndex) {
|
|
1074
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
1075
|
+
const optionValue = getHeaderSearchOptionValue(option, column);
|
|
1076
|
+
const nextPath = [
|
|
1077
|
+
...getHeaderSearchCascaderActivePath(column).slice(0, levelIndex),
|
|
1078
|
+
optionValue
|
|
1079
|
+
];
|
|
1080
|
+
headerSearchCascaderActivePaths[stateKey] = nextPath;
|
|
1081
|
+
if (!hasHeaderSearchOptionChildren(option, column)) {
|
|
1082
|
+
updateHeaderSearchValue(column, nextPath);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
694
1085
|
async function handleHeaderSearch(column) {
|
|
695
1086
|
closeHeaderSearch(column);
|
|
696
1087
|
paginationState.currentPage = 1;
|
|
@@ -702,7 +1093,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
702
1093
|
applyLocalRows();
|
|
703
1094
|
}
|
|
704
1095
|
async function handleHeaderSearchReset(column) {
|
|
705
|
-
updateHeaderSearchValue(column,
|
|
1096
|
+
updateHeaderSearchValue(column, getHeaderSearchEmptyValue(column));
|
|
706
1097
|
closeHeaderSearch(column);
|
|
707
1098
|
paginationState.currentPage = 1;
|
|
708
1099
|
emitPagination();
|
|
@@ -713,8 +1104,9 @@ const _sfc_main$9 = defineComponent({
|
|
|
713
1104
|
applyLocalRows();
|
|
714
1105
|
}
|
|
715
1106
|
function closeHeaderSearch(column) {
|
|
716
|
-
|
|
717
|
-
|
|
1107
|
+
const stateKey = getHeaderSearchStateKey(column);
|
|
1108
|
+
headerSearchVisible[stateKey] = false;
|
|
1109
|
+
headerSearchSelectOpen[stateKey] = false;
|
|
718
1110
|
}
|
|
719
1111
|
function buildHeaderSearchParams() {
|
|
720
1112
|
return props.columns.reduce((result, column) => {
|
|
@@ -722,11 +1114,11 @@ const _sfc_main$9 = defineComponent({
|
|
|
722
1114
|
return result;
|
|
723
1115
|
}
|
|
724
1116
|
const paramKey = resolveHeaderSearchParamKey(column);
|
|
725
|
-
const value = getHeaderSearchValue(column)
|
|
726
|
-
if (!paramKey || !value) {
|
|
1117
|
+
const value = getHeaderSearchValue(column);
|
|
1118
|
+
if (!paramKey || !isHeaderSearchValueFilled(value)) {
|
|
727
1119
|
return result;
|
|
728
1120
|
}
|
|
729
|
-
result[paramKey] = value;
|
|
1121
|
+
result[paramKey] = normalizeHeaderSearchRequestValue(column, value);
|
|
730
1122
|
return result;
|
|
731
1123
|
}, {});
|
|
732
1124
|
}
|
|
@@ -739,27 +1131,107 @@ const _sfc_main$9 = defineComponent({
|
|
|
739
1131
|
function filterLocalRows(data) {
|
|
740
1132
|
const activeColumns = props.columns.filter((column) => hasHeaderSearch(column) && hasHeaderSearchValue(column)).map((column) => ({
|
|
741
1133
|
column,
|
|
742
|
-
|
|
1134
|
+
value: getHeaderSearchValue(column)
|
|
743
1135
|
}));
|
|
744
1136
|
if (!activeColumns.length) {
|
|
745
1137
|
return normalizeRows(data);
|
|
746
1138
|
}
|
|
747
1139
|
return normalizeRows(data).filter((row) => {
|
|
748
|
-
return activeColumns.every(({ column,
|
|
1140
|
+
return activeColumns.every(({ column, value: searchValue }) => {
|
|
749
1141
|
const columnProp = getColumnProp(column);
|
|
750
1142
|
if (!columnProp) {
|
|
751
1143
|
return true;
|
|
752
1144
|
}
|
|
753
1145
|
const value = getCellValue2(row, column);
|
|
754
|
-
|
|
1146
|
+
if (isHeaderSearchSelect(column)) {
|
|
1147
|
+
return matchesHeaderSearchSelectValue(value, searchValue);
|
|
1148
|
+
}
|
|
1149
|
+
if (isHeaderSearchCascader(column)) {
|
|
1150
|
+
return matchesHeaderSearchCascaderValue(value, searchValue);
|
|
1151
|
+
}
|
|
1152
|
+
return toSearchableText(value).includes(toHeaderSearchKeyword(searchValue));
|
|
755
1153
|
});
|
|
756
1154
|
});
|
|
757
1155
|
}
|
|
758
|
-
function
|
|
1156
|
+
function getHeaderSearchEmptyValue(column) {
|
|
1157
|
+
return isHeaderSearchMultiple(column) || isHeaderSearchCascader(column) ? [] : "";
|
|
1158
|
+
}
|
|
1159
|
+
function normalizeHeaderSearchValue(column, value) {
|
|
1160
|
+
if (isHeaderSearchCascader(column)) {
|
|
1161
|
+
return normalizeHeaderSearchPathValue(value);
|
|
1162
|
+
}
|
|
1163
|
+
if (!isHeaderSearchSelect(column)) {
|
|
1164
|
+
if (value === void 0 || value === null) {
|
|
1165
|
+
return "";
|
|
1166
|
+
}
|
|
1167
|
+
return String(value);
|
|
1168
|
+
}
|
|
1169
|
+
if (isHeaderSearchMultiple(column)) {
|
|
1170
|
+
const values = Array.isArray(value) ? value : [value];
|
|
1171
|
+
return values.filter((item) => isHeaderSearchValueFilled(item)).map((item) => normalizeHeaderSearchPrimitiveValue(item));
|
|
1172
|
+
}
|
|
1173
|
+
if (Array.isArray(value)) {
|
|
1174
|
+
const firstFilledValue = value.find((item) => isHeaderSearchValueFilled(item));
|
|
1175
|
+
return firstFilledValue === void 0 ? "" : normalizeHeaderSearchPrimitiveValue(firstFilledValue);
|
|
1176
|
+
}
|
|
759
1177
|
if (value === void 0 || value === null) {
|
|
760
1178
|
return "";
|
|
761
1179
|
}
|
|
762
|
-
return
|
|
1180
|
+
return normalizeHeaderSearchPrimitiveValue(value);
|
|
1181
|
+
}
|
|
1182
|
+
function normalizeHeaderSearchPrimitiveValue(value) {
|
|
1183
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
1184
|
+
return value;
|
|
1185
|
+
}
|
|
1186
|
+
return String(value != null ? value : "");
|
|
1187
|
+
}
|
|
1188
|
+
function normalizeHeaderSearchPathValue(value) {
|
|
1189
|
+
const values = Array.isArray(value) ? value : [value];
|
|
1190
|
+
return values.filter((item) => !Array.isArray(item) && isHeaderSearchValueFilled(item)).map((item) => normalizeHeaderSearchPrimitiveValue(item));
|
|
1191
|
+
}
|
|
1192
|
+
function normalizeHeaderSearchRequestValue(column, value) {
|
|
1193
|
+
if (Array.isArray(value)) {
|
|
1194
|
+
return [...value];
|
|
1195
|
+
}
|
|
1196
|
+
if (isHeaderSearchSelect(column)) {
|
|
1197
|
+
return value;
|
|
1198
|
+
}
|
|
1199
|
+
return String(value).trim();
|
|
1200
|
+
}
|
|
1201
|
+
function isHeaderSearchValueFilled(value) {
|
|
1202
|
+
if (Array.isArray(value)) {
|
|
1203
|
+
return value.some((item) => isHeaderSearchValueFilled(item));
|
|
1204
|
+
}
|
|
1205
|
+
return value !== void 0 && value !== null && String(value).trim() !== "";
|
|
1206
|
+
}
|
|
1207
|
+
function toHeaderSearchKeyword(value) {
|
|
1208
|
+
if (Array.isArray(value)) {
|
|
1209
|
+
return value.map((item) => String(item).trim()).join(" ").toLowerCase();
|
|
1210
|
+
}
|
|
1211
|
+
return String(value).trim().toLowerCase();
|
|
1212
|
+
}
|
|
1213
|
+
function matchesHeaderSearchSelectValue(rowValue, searchValue) {
|
|
1214
|
+
const selectedValues = toComparableValues(searchValue);
|
|
1215
|
+
if (!selectedValues.length) {
|
|
1216
|
+
return true;
|
|
1217
|
+
}
|
|
1218
|
+
const rowValues = toComparableValues(rowValue);
|
|
1219
|
+
return rowValues.some((item) => selectedValues.includes(item));
|
|
1220
|
+
}
|
|
1221
|
+
function matchesHeaderSearchCascaderValue(rowValue, searchValue) {
|
|
1222
|
+
const selectedPath = normalizeHeaderSearchPathValue(searchValue);
|
|
1223
|
+
if (!selectedPath.length) {
|
|
1224
|
+
return true;
|
|
1225
|
+
}
|
|
1226
|
+
const rowPath = normalizeHeaderSearchPathValue(rowValue);
|
|
1227
|
+
if (!rowPath.length) {
|
|
1228
|
+
return false;
|
|
1229
|
+
}
|
|
1230
|
+
return selectedPath.every((item, index) => String(rowPath[index]) === String(item));
|
|
1231
|
+
}
|
|
1232
|
+
function toComparableValues(value) {
|
|
1233
|
+
const values = Array.isArray(value) ? value : [value];
|
|
1234
|
+
return values.filter((item) => isHeaderSearchValueFilled(item)).map((item) => String(item));
|
|
763
1235
|
}
|
|
764
1236
|
function toSearchableText(value) {
|
|
765
1237
|
if (value === void 0 || value === null) {
|
|
@@ -989,7 +1461,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
989
1461
|
async function setHeaderSearchValue(key, value, shouldReload = true) {
|
|
990
1462
|
const matchedColumn = findHeaderSearchColumn(key);
|
|
991
1463
|
const stateKey = matchedColumn ? getHeaderSearchStateKey(matchedColumn) : key;
|
|
992
|
-
headerSearchValues[stateKey] = normalizeHeaderSearchValue(value);
|
|
1464
|
+
headerSearchValues[stateKey] = matchedColumn ? normalizeHeaderSearchValue(matchedColumn, value) : value;
|
|
993
1465
|
if (!shouldReload) {
|
|
994
1466
|
return;
|
|
995
1467
|
}
|
|
@@ -1017,9 +1489,11 @@ const _sfc_main$9 = defineComponent({
|
|
|
1017
1489
|
Object.keys(headerSearchValues).forEach((stateKey) => {
|
|
1018
1490
|
delete headerSearchValues[stateKey];
|
|
1019
1491
|
});
|
|
1020
|
-
Object.keys(
|
|
1021
|
-
|
|
1022
|
-
|
|
1492
|
+
Object.keys(headerSearchVisible).forEach((stateKey) => {
|
|
1493
|
+
headerSearchVisible[stateKey] = false;
|
|
1494
|
+
});
|
|
1495
|
+
Object.keys(headerSearchSelectOpen).forEach((stateKey) => {
|
|
1496
|
+
headerSearchSelectOpen[stateKey] = false;
|
|
1023
1497
|
});
|
|
1024
1498
|
}
|
|
1025
1499
|
paginationState.currentPage = 1;
|
|
@@ -1050,20 +1524,109 @@ const _sfc_main$9 = defineComponent({
|
|
|
1050
1524
|
const _component_el_pagination = resolveComponent("el-pagination");
|
|
1051
1525
|
const _component_el_empty = resolveComponent("el-empty");
|
|
1052
1526
|
const _component_el_table_column = resolveComponent("el-table-column");
|
|
1053
|
-
const _component_el_input = resolveComponent("el-input");
|
|
1054
1527
|
const _component_el_button = resolveComponent("el-button");
|
|
1055
|
-
const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
|
|
1056
|
-
const _component_el_dropdown = resolveComponent("el-dropdown");
|
|
1057
1528
|
const _component_el_image = resolveComponent("el-image");
|
|
1058
1529
|
const _component_el_tag = resolveComponent("el-tag");
|
|
1530
|
+
const _component_el_input = resolveComponent("el-input");
|
|
1059
1531
|
const _component_el_table = resolveComponent("el-table");
|
|
1060
1532
|
const _directive_loading = resolveDirective("loading");
|
|
1061
1533
|
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1062
|
-
|
|
1063
|
-
createElementVNode("
|
|
1534
|
+
(openBlock(), createElementBlock("svg", _hoisted_2$7, [
|
|
1535
|
+
createElementVNode("symbol", {
|
|
1536
|
+
id: `${baseTableIconPrefix}-search`,
|
|
1537
|
+
viewBox: "0 0 17.814 14.035"
|
|
1538
|
+
}, [..._cache[2] || (_cache[2] = [
|
|
1539
|
+
createElementVNode("path", {
|
|
1540
|
+
fill: "currentColor",
|
|
1541
|
+
d: "M172.218,201.2a5.254,5.254,0,1,0-1.057.786l2.85,3.721a.659.659,0,0,0,1.047-.8l-2.841-3.709Zm-7.7-3.8a4.056,4.056,0,1,1,4.055,4.044,4.054,4.054,0,0,1-4.055-4.044Zm-2.554-3.968h-3.954a.657.657,0,1,1,0-1.313h3.952a.657.657,0,1,1,0,1.313Zm-.159,8.751h-3.8a.656.656,0,1,1,0-1.312h3.793a.656.656,0,1,1,0,1.312Zm-.78-3.958h-3.016a.659.659,0,1,1,0-1.319h3.015a.659.659,0,1,1,0,1.319Zm4.246,7.929h-7.261a.659.659,0,0,1,0-1.319h7.261a.659.659,0,1,1,0,1.319Z",
|
|
1542
|
+
transform: "translate(-157.354 -192.113)"
|
|
1543
|
+
}, null, -1)
|
|
1544
|
+
])], 8, _hoisted_3$2),
|
|
1545
|
+
createElementVNode("symbol", {
|
|
1546
|
+
id: `${baseTableIconPrefix}-search-y`,
|
|
1547
|
+
viewBox: "0 0 17.814 14.035"
|
|
1548
|
+
}, [..._cache[3] || (_cache[3] = [
|
|
1549
|
+
createElementVNode("path", {
|
|
1550
|
+
fill: "#0938f7",
|
|
1551
|
+
d: "M172.218,201.2a5.254,5.254,0,1,0-1.057.786l2.85,3.721a.659.659,0,0,0,1.047-.8l-2.841-3.709Zm-7.7-3.8a4.056,4.056,0,1,1,4.055,4.044,4.054,4.054,0,0,1-4.055-4.044Zm-2.554-3.968h-3.954a.657.657,0,1,1,0-1.313h3.952a.657.657,0,1,1,0,1.313Zm-.159,8.751h-3.8a.656.656,0,1,1,0-1.312h3.793a.656.656,0,1,1,0,1.312Zm-.78-3.958h-3.016a.659.659,0,1,1,0-1.319h3.015a.659.659,0,1,1,0,1.319Zm4.246,7.929h-7.261a.659.659,0,0,1,0-1.319h7.261a.659.659,0,1,1,0,1.319Z",
|
|
1552
|
+
transform: "translate(-157.354 -192.113)"
|
|
1553
|
+
}, null, -1)
|
|
1554
|
+
])], 8, _hoisted_4$1),
|
|
1555
|
+
createElementVNode("symbol", {
|
|
1556
|
+
id: `${baseTableIconPrefix}-select`,
|
|
1557
|
+
viewBox: "0 0 16.04 12.653"
|
|
1558
|
+
}, [..._cache[4] || (_cache[4] = [
|
|
1559
|
+
createElementVNode("path", {
|
|
1560
|
+
fill: "currentColor",
|
|
1561
|
+
d: "M0,12.653V11.248H11.792v1.406ZM9.328,4.429H16.04l-3.356,3.8ZM0,7.029V5.624H7.823V7.029ZM0,1.406V0H14.5V1.406Z"
|
|
1562
|
+
}, null, -1)
|
|
1563
|
+
])], 8, _hoisted_5$1),
|
|
1564
|
+
createElementVNode("symbol", {
|
|
1565
|
+
id: `${baseTableIconPrefix}-select-y`,
|
|
1566
|
+
viewBox: "0 0 16.04 12.653"
|
|
1567
|
+
}, [..._cache[5] || (_cache[5] = [
|
|
1568
|
+
createElementVNode("path", {
|
|
1569
|
+
fill: "#0938f7",
|
|
1570
|
+
d: "M0,12.653V11.248H11.792v1.406ZM9.328,4.429H16.04l-3.356,3.8ZM0,7.029V5.624H7.823V7.029ZM0,1.406V0H14.5V1.406Z"
|
|
1571
|
+
}, null, -1)
|
|
1572
|
+
])], 8, _hoisted_6),
|
|
1573
|
+
createElementVNode("symbol", {
|
|
1574
|
+
id: `${baseTableIconPrefix}-sort-none`,
|
|
1575
|
+
viewBox: "0 0 15.351 16.031"
|
|
1576
|
+
}, [..._cache[6] || (_cache[6] = [
|
|
1577
|
+
createElementVNode("g", { transform: "translate(-1299.19 -185.182)" }, [
|
|
1578
|
+
createElementVNode("path", {
|
|
1579
|
+
fill: "currentColor",
|
|
1580
|
+
d: "M100.721,140.352l-3.679,3.679-3.679-3.679h2.944v-8.831h1.472v8.831h2.944Z",
|
|
1581
|
+
transform: "translate(1213.82 57.182)"
|
|
1582
|
+
}),
|
|
1583
|
+
createElementVNode("path", {
|
|
1584
|
+
fill: "currentColor",
|
|
1585
|
+
d: "M92.692,131.679H89.749v8.831H88.277v-8.831H85.333L89.013,128l3.679,3.679Z",
|
|
1586
|
+
transform: "translate(1213.856 57.182)"
|
|
1587
|
+
})
|
|
1588
|
+
], -1)
|
|
1589
|
+
])], 8, _hoisted_7),
|
|
1590
|
+
createElementVNode("symbol", {
|
|
1591
|
+
id: `${baseTableIconPrefix}-sort-up`,
|
|
1592
|
+
viewBox: "0 0 15.351 16.031"
|
|
1593
|
+
}, [..._cache[7] || (_cache[7] = [
|
|
1594
|
+
createElementVNode("g", { transform: "translate(-1299.19 -185.182)" }, [
|
|
1595
|
+
createElementVNode("path", {
|
|
1596
|
+
fill: "#8c8c8c",
|
|
1597
|
+
d: "M100.721,140.352l-3.679,3.679-3.679-3.679h2.944v-8.831h1.472v8.831h2.944Z",
|
|
1598
|
+
transform: "translate(1213.82 57.182)"
|
|
1599
|
+
}),
|
|
1600
|
+
createElementVNode("path", {
|
|
1601
|
+
fill: "#0938f7",
|
|
1602
|
+
d: "M92.692,131.679H89.749v8.831H88.277v-8.831H85.333L89.013,128l3.679,3.679Z",
|
|
1603
|
+
transform: "translate(1213.856 57.182)"
|
|
1604
|
+
})
|
|
1605
|
+
], -1)
|
|
1606
|
+
])], 8, _hoisted_8),
|
|
1607
|
+
createElementVNode("symbol", {
|
|
1608
|
+
id: `${baseTableIconPrefix}-sort-down`,
|
|
1609
|
+
viewBox: "0 0 15.351 16.031"
|
|
1610
|
+
}, [..._cache[8] || (_cache[8] = [
|
|
1611
|
+
createElementVNode("g", { transform: "translate(-1299.19 -185.182)" }, [
|
|
1612
|
+
createElementVNode("path", {
|
|
1613
|
+
fill: "#0938f7",
|
|
1614
|
+
d: "M100.721,140.352l-3.679,3.679-3.679-3.679h2.944v-8.831h1.472v8.831h2.944Z",
|
|
1615
|
+
transform: "translate(1213.82 57.182)"
|
|
1616
|
+
}),
|
|
1617
|
+
createElementVNode("path", {
|
|
1618
|
+
fill: "#8c8c8c",
|
|
1619
|
+
d: "M92.692,131.679H89.749v8.831H88.277v-8.831H85.333L89.013,128l3.679,3.679Z",
|
|
1620
|
+
transform: "translate(1213.856 57.182)"
|
|
1621
|
+
})
|
|
1622
|
+
], -1)
|
|
1623
|
+
])], 8, _hoisted_9)
|
|
1624
|
+
])),
|
|
1625
|
+
shouldRenderToolbar.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
1626
|
+
createElementVNode("div", _hoisted_11, [
|
|
1064
1627
|
renderSlot(_ctx.$slots, "toolbar", {}, void 0, true)
|
|
1065
1628
|
]),
|
|
1066
|
-
__props.showPagination ? (openBlock(), createElementBlock("div",
|
|
1629
|
+
__props.showPagination ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
1067
1630
|
createVNode(_component_el_pagination, {
|
|
1068
1631
|
small: "",
|
|
1069
1632
|
background: "",
|
|
@@ -1135,7 +1698,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
1135
1698
|
columnIndex: scope.$index,
|
|
1136
1699
|
value: getCellValue2(scope.row, column)
|
|
1137
1700
|
}, void 0, true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1138
|
-
isActionColumn(column) ? (openBlock(), createElementBlock("div",
|
|
1701
|
+
isActionColumn(column) ? (openBlock(), createElementBlock("div", _hoisted_33, [
|
|
1139
1702
|
(openBlock(true), createElementBlock(Fragment, null, renderList(getVisibleActions(column, scope.row), (action) => {
|
|
1140
1703
|
return openBlock(), createBlock(_component_el_button, {
|
|
1141
1704
|
key: `${action.type}-${action.label}`,
|
|
@@ -1157,7 +1720,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
1157
1720
|
src: toImageSrc(getCellValue2(scope.row, column)),
|
|
1158
1721
|
"preview-src-list": getPreviewSrcList(scope.row, column),
|
|
1159
1722
|
fit: column.imageFit || "cover"
|
|
1160
|
-
}, null, 8, ["style", "src", "preview-src-list", "fit"])) : column.kind === "tag" ? (openBlock(), createElementBlock("div",
|
|
1723
|
+
}, null, 8, ["style", "src", "preview-src-list", "fit"])) : column.kind === "tag" ? (openBlock(), createElementBlock("div", _hoisted_34, [
|
|
1161
1724
|
getMatchedOptions(scope.row, column).length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(getMatchedOptions(scope.row, column), (option) => {
|
|
1162
1725
|
return openBlock(), createBlock(_component_el_tag, {
|
|
1163
1726
|
key: String(option.value),
|
|
@@ -1170,11 +1733,11 @@ const _sfc_main$9 = defineComponent({
|
|
|
1170
1733
|
]),
|
|
1171
1734
|
_: 2
|
|
1172
1735
|
}, 1032, ["type", "style"]);
|
|
1173
|
-
}), 128)) : (openBlock(), createElementBlock("span",
|
|
1736
|
+
}), 128)) : (openBlock(), createElementBlock("span", _hoisted_35, toDisplayString(resolveEmptyText(column)), 1))
|
|
1174
1737
|
])) : column.kind === "html" ? (openBlock(), createElementBlock("div", {
|
|
1175
1738
|
key: 3,
|
|
1176
1739
|
innerHTML: getHtmlContent(scope.row, column)
|
|
1177
|
-
}, null, 8,
|
|
1740
|
+
}, null, 8, _hoisted_36)) : column.kind === "input" ? (openBlock(), createBlock(_component_el_input, {
|
|
1178
1741
|
key: 4,
|
|
1179
1742
|
"model-value": toDisplayValue(getCellValue2(scope.row, column), ""),
|
|
1180
1743
|
type: column.inputType || "text",
|
|
@@ -1184,7 +1747,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
1184
1747
|
class: "base-table__link",
|
|
1185
1748
|
type: "button",
|
|
1186
1749
|
onClick: ($event) => handleCellClick(scope.row, column)
|
|
1187
|
-
}, toDisplayString(formatCellDisplay(scope.row, column)), 9,
|
|
1750
|
+
}, toDisplayString(formatCellDisplay(scope.row, column)), 9, _hoisted_37)) : (openBlock(), createElementBlock("div", _hoisted_38, toDisplayString(formatCellDisplay(scope.row, column)), 1))
|
|
1188
1751
|
], 64))
|
|
1189
1752
|
]),
|
|
1190
1753
|
_: 2
|
|
@@ -1198,75 +1761,167 @@ const _sfc_main$9 = defineComponent({
|
|
|
1198
1761
|
} : shouldRenderBuiltInHeader(column) ? {
|
|
1199
1762
|
name: "header",
|
|
1200
1763
|
fn: withCtx(() => [
|
|
1201
|
-
createElementVNode("div",
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1764
|
+
createElementVNode("div", {
|
|
1765
|
+
class: normalizeClass(["base-table__header", [
|
|
1766
|
+
`base-table__header--${resolveHeaderContentAlign(column)}`,
|
|
1767
|
+
{
|
|
1768
|
+
"base-table__header--has-actions": hasHeaderSearch(column),
|
|
1769
|
+
"base-table__header--has-sort": isHeaderSortable(column)
|
|
1770
|
+
}
|
|
1771
|
+
]])
|
|
1772
|
+
}, [
|
|
1773
|
+
createElementVNode("span", _hoisted_13, [
|
|
1774
|
+
createElementVNode("span", _hoisted_14, toDisplayString(column.label), 1),
|
|
1775
|
+
isHeaderSortable(column) ? (openBlock(), createElementBlock("span", {
|
|
1776
|
+
key: 0,
|
|
1777
|
+
class: normalizeClass(["base-table__header-sort", { "is-active": isHeaderSortActive(column) }]),
|
|
1778
|
+
"aria-hidden": "true"
|
|
1779
|
+
}, [
|
|
1780
|
+
createVNode(unref(SvgIcon), {
|
|
1781
|
+
prefix: baseTableIconPrefix,
|
|
1782
|
+
"icon-class": getHeaderSortIconName(column),
|
|
1783
|
+
"class-name": "base-table__header-sort-icon"
|
|
1784
|
+
}, null, 8, ["icon-class"])
|
|
1785
|
+
], 2)) : createCommentVNode("", true)
|
|
1786
|
+
]),
|
|
1787
|
+
hasHeaderSearch(column) ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
1788
|
+
createElementVNode("button", {
|
|
1205
1789
|
ref_for: true,
|
|
1206
|
-
ref:
|
|
1207
|
-
class: "base-table__header-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1790
|
+
ref: bindHeaderSearchTrigger(column),
|
|
1791
|
+
class: normalizeClass(["base-table__header-icon", { "is-active": hasHeaderSearchValue(column) }]),
|
|
1792
|
+
type: "button",
|
|
1793
|
+
onClick: withModifiers(($event) => toggleHeaderSearch(column), ["stop"])
|
|
1794
|
+
}, [
|
|
1795
|
+
createVNode(unref(SvgIcon), {
|
|
1796
|
+
prefix: baseTableIconPrefix,
|
|
1797
|
+
"icon-class": getHeaderSearchIconName(column),
|
|
1798
|
+
"class-name": "base-table__header-search-icon"
|
|
1799
|
+
}, null, 8, ["icon-class"])
|
|
1800
|
+
], 10, _hoisted_16),
|
|
1801
|
+
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1802
|
+
isHeaderSearchVisible(column) ? (openBlock(), createElementBlock("div", {
|
|
1803
|
+
key: getHeaderSearchStateKey(column),
|
|
1804
|
+
class: "base-table__header-search-panel",
|
|
1805
|
+
style: normalizeStyle(getHeaderSearchPanelStyle(column)),
|
|
1806
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
1807
|
+
}, ["stop"])),
|
|
1808
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
1809
|
+
}, ["stop"]))
|
|
1810
|
+
}, [
|
|
1811
|
+
isHeaderSearchSelect(column) ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
1812
|
+
createElementVNode("button", {
|
|
1813
|
+
class: "base-table__header-select-trigger",
|
|
1814
|
+
type: "button",
|
|
1815
|
+
onClick: ($event) => toggleHeaderSearchSelect(column)
|
|
1816
|
+
}, [
|
|
1817
|
+
isHeaderSearchMultiple(column) && getHeaderSearchSelectedLabels(column).length ? (openBlock(), createElementBlock("span", _hoisted_19, [
|
|
1818
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getHeaderSearchSelectedLabels(column).slice(0, 2), (label) => {
|
|
1819
|
+
return openBlock(), createElementBlock("span", {
|
|
1820
|
+
key: label,
|
|
1821
|
+
class: "base-table__header-select-tag"
|
|
1822
|
+
}, toDisplayString(label), 1);
|
|
1823
|
+
}), 128)),
|
|
1824
|
+
getHeaderSearchSelectedLabels(column).length > 2 ? (openBlock(), createElementBlock("span", _hoisted_20, " +" + toDisplayString(getHeaderSearchSelectedLabels(column).length - 2), 1)) : createCommentVNode("", true)
|
|
1825
|
+
])) : (openBlock(), createElementBlock("span", {
|
|
1826
|
+
key: 1,
|
|
1827
|
+
class: normalizeClass(["base-table__header-select-text", { "is-placeholder": !hasHeaderSearchValue(column) }])
|
|
1828
|
+
}, toDisplayString(getHeaderSearchSelectLabel(column)), 3)),
|
|
1829
|
+
createElementVNode("span", {
|
|
1830
|
+
class: normalizeClass(["base-table__header-select-arrow", { "is-open": isHeaderSearchSelectOpen(column) }]),
|
|
1831
|
+
"aria-hidden": "true"
|
|
1832
|
+
}, null, 2)
|
|
1833
|
+
], 8, _hoisted_18),
|
|
1834
|
+
isHeaderSearchSelectOpen(column) ? (openBlock(), createElementBlock("div", _hoisted_21, [
|
|
1835
|
+
!isHeaderSearchMultiple(column) ? (openBlock(), createElementBlock("button", {
|
|
1836
|
+
key: 0,
|
|
1837
|
+
class: normalizeClass(["base-table__header-select-option", { "is-selected": !hasHeaderSearchValue(column) }]),
|
|
1838
|
+
type: "button",
|
|
1839
|
+
onClick: ($event) => handleHeaderSearchSelectEmpty(column)
|
|
1840
|
+
}, toDisplayString(getHeaderSearchPlaceholder(column)), 11, _hoisted_22)) : createCommentVNode("", true),
|
|
1841
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getHeaderSearchOptions(column), (option) => {
|
|
1842
|
+
return openBlock(), createElementBlock("button", {
|
|
1843
|
+
key: String(getHeaderSearchOptionValue(option, column)),
|
|
1844
|
+
class: normalizeClass(["base-table__header-select-option", { "is-selected": isHeaderSearchOptionSelected(option, column) }]),
|
|
1845
|
+
type: "button",
|
|
1846
|
+
disabled: isHeaderSearchOptionDisabled(option, column),
|
|
1847
|
+
onClick: ($event) => handleHeaderSearchSelectValue(column, getHeaderSearchOptionValue(option, column))
|
|
1848
|
+
}, [
|
|
1849
|
+
createElementVNode("span", _hoisted_24, toDisplayString(getHeaderSearchOptionLabel(option, column)), 1)
|
|
1850
|
+
], 10, _hoisted_23);
|
|
1851
|
+
}), 128))
|
|
1852
|
+
])) : createCommentVNode("", true)
|
|
1853
|
+
])) : isHeaderSearchCascader(column) ? (openBlock(), createElementBlock("div", _hoisted_25, [
|
|
1854
|
+
createElementVNode("button", {
|
|
1855
|
+
class: "base-table__header-select-trigger",
|
|
1856
|
+
type: "button",
|
|
1857
|
+
onClick: ($event) => toggleHeaderSearchSelect(column)
|
|
1858
|
+
}, [
|
|
1859
|
+
createElementVNode("span", {
|
|
1860
|
+
class: normalizeClass(["base-table__header-select-text", { "is-placeholder": !hasHeaderSearchValue(column) }])
|
|
1861
|
+
}, toDisplayString(getHeaderSearchCascaderLabel(column)), 3),
|
|
1862
|
+
createElementVNode("span", {
|
|
1863
|
+
class: normalizeClass(["base-table__header-select-arrow", { "is-open": isHeaderSearchSelectOpen(column) }]),
|
|
1864
|
+
"aria-hidden": "true"
|
|
1865
|
+
}, null, 2)
|
|
1866
|
+
], 8, _hoisted_26),
|
|
1867
|
+
isHeaderSearchSelectOpen(column) ? (openBlock(), createElementBlock("div", _hoisted_27, [
|
|
1868
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getHeaderSearchCascaderColumns(column), (levelOptions, levelIndex) => {
|
|
1869
|
+
return openBlock(), createElementBlock("div", {
|
|
1870
|
+
key: levelIndex,
|
|
1871
|
+
class: "base-table__header-cascader-menu"
|
|
1872
|
+
}, [
|
|
1873
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(levelOptions, (option) => {
|
|
1874
|
+
return openBlock(), createElementBlock("button", {
|
|
1875
|
+
key: `${levelIndex}-${String(getHeaderSearchOptionValue(option, column))}`,
|
|
1876
|
+
class: normalizeClass(["base-table__header-cascader-option", {
|
|
1877
|
+
"is-active": isHeaderSearchCascaderOptionActive(column, option, levelIndex),
|
|
1878
|
+
"is-selected": isHeaderSearchCascaderOptionSelected(column, option, levelIndex)
|
|
1879
|
+
}]),
|
|
1880
|
+
type: "button",
|
|
1881
|
+
disabled: isHeaderSearchOptionDisabled(option, column),
|
|
1882
|
+
onClick: ($event) => handleHeaderSearchCascaderOption(column, option, levelIndex)
|
|
1883
|
+
}, [
|
|
1884
|
+
createElementVNode("span", _hoisted_29, toDisplayString(getHeaderSearchOptionLabel(option, column)), 1),
|
|
1885
|
+
hasHeaderSearchOptionChildren(option, column) ? (openBlock(), createElementBlock("span", _hoisted_30)) : createCommentVNode("", true)
|
|
1886
|
+
], 10, _hoisted_28);
|
|
1887
|
+
}), 128))
|
|
1888
|
+
]);
|
|
1889
|
+
}), 128))
|
|
1890
|
+
])) : createCommentVNode("", true)
|
|
1891
|
+
])) : (openBlock(), createElementBlock("input", {
|
|
1892
|
+
key: 2,
|
|
1893
|
+
class: "base-table__header-search-input",
|
|
1894
|
+
type: "text",
|
|
1895
|
+
value: getHeaderSearchInputValue(column),
|
|
1896
|
+
placeholder: getHeaderSearchPlaceholder(column),
|
|
1897
|
+
onInput: ($event) => handleHeaderSearchInput(column, $event),
|
|
1898
|
+
onKeyup: withKeys(($event) => handleHeaderSearch(column), ["enter"])
|
|
1899
|
+
}, null, 40, _hoisted_31)),
|
|
1900
|
+
createElementVNode("div", _hoisted_32, [
|
|
1901
|
+
createVNode(_component_el_button, {
|
|
1902
|
+
link: "",
|
|
1903
|
+
type: "primary",
|
|
1904
|
+
onClick: ($event) => handleHeaderSearch(column)
|
|
1905
|
+
}, {
|
|
1906
|
+
default: withCtx(() => [
|
|
1907
|
+
createTextVNode(toDisplayString(getHeaderSearchSearchText(column)), 1)
|
|
1908
|
+
]),
|
|
1909
|
+
_: 2
|
|
1910
|
+
}, 1032, ["onClick"]),
|
|
1911
|
+
createVNode(_component_el_button, {
|
|
1912
|
+
link: "",
|
|
1913
|
+
onClick: ($event) => handleHeaderSearchReset(column)
|
|
1914
|
+
}, {
|
|
1915
|
+
default: withCtx(() => [
|
|
1916
|
+
createTextVNode(toDisplayString(getHeaderSearchResetText(column)), 1)
|
|
1917
|
+
]),
|
|
1918
|
+
_: 2
|
|
1919
|
+
}, 1032, ["onClick"])
|
|
1920
|
+
])
|
|
1921
|
+
], 36)) : createCommentVNode("", true)
|
|
1922
|
+
]))
|
|
1923
|
+
])) : createCommentVNode("", true)
|
|
1924
|
+
], 2)
|
|
1270
1925
|
]),
|
|
1271
1926
|
key: "1"
|
|
1272
1927
|
} : void 0
|
|
@@ -1281,7 +1936,7 @@ const _sfc_main$9 = defineComponent({
|
|
|
1281
1936
|
};
|
|
1282
1937
|
}
|
|
1283
1938
|
});
|
|
1284
|
-
var BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
1939
|
+
var BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-20fa814c"]]);
|
|
1285
1940
|
var BaseEChart_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1286
1941
|
const _sfc_main$8 = defineComponent({
|
|
1287
1942
|
__name: "BaseEChart",
|
|
@@ -3959,4 +4614,4 @@ const _sfc_main = defineComponent({
|
|
|
3959
4614
|
});
|
|
3960
4615
|
var OutlinedTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-30d7dee0"]]);
|
|
3961
4616
|
installRipple();
|
|
3962
|
-
export { BaseCard, BaseEChart, _sfc_main$7 as BaseExportButton, BaseTable, OutlinedCascader, OutlinedDatePicker, OutlinedDateTimePicker, OutlinedInput, OutlinedSelect, OutlinedTimePicker, OutlinedTreeSelect, downloadExportResponse, exportExcel, extractFileNameFromDisposition, installRipple, normalizeExportFileName, uninstallRipple };
|
|
4617
|
+
export { BaseCard, BaseEChart, _sfc_main$7 as BaseExportButton, BaseTable, OutlinedCascader, OutlinedDatePicker, OutlinedDateTimePicker, OutlinedInput, OutlinedSelect, OutlinedTimePicker, OutlinedTreeSelect, SvgIcon, downloadExportResponse, exportExcel, extractFileNameFromDisposition, installRipple, normalizeExportFileName, uninstallRipple };
|