yc-pro-components 0.0.76 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/index.mjs +1 -0
- package/es/components/yc-plus-page/index.d.ts +2 -0
- package/es/components/yc-plus-page/index.mjs +1 -0
- package/es/components/yc-plus-page/src/index.vue.d.ts +75 -0
- package/es/components/yc-plus-page/src/index.vue.mjs +1 -1
- package/es/components/yc-plus-page/src/index.vue2.mjs +90 -58
- package/es/components/yc-plus-page/src/type.d.ts +9 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useTableDragScroll.d.ts +35 -0
- package/es/hooks/useTableDragScroll.mjs +201 -0
- package/es/index.css +9 -9
- package/es/index.mjs +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/yc-components/version.d.ts +1 -1
- package/index.js +290 -60
- package/index.min.css +1 -1
- package/index.min.js +12 -11
- package/index.min.mjs +12 -11
- package/index.mjs +290 -61
- package/lib/components/index.js +2 -0
- package/lib/components/yc-plus-page/index.d.ts +2 -0
- package/lib/components/yc-plus-page/index.js +2 -0
- package/lib/components/yc-plus-page/src/index.vue.d.ts +75 -0
- package/lib/components/yc-plus-page/src/index.vue.js +1 -1
- package/lib/components/yc-plus-page/src/index.vue2.js +89 -57
- package/lib/components/yc-plus-page/src/type.d.ts +9 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/useTableDragScroll.d.ts +35 -0
- package/lib/hooks/useTableDragScroll.js +203 -0
- package/lib/index.css +10 -10
- package/lib/index.js +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/yc-components/version.d.ts +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! yc-pro-components v0.0.
|
|
1
|
+
/*! yc-pro-components v0.0.77 */
|
|
2
2
|
import { unref, isRef, ref, inject, isReactive, watch, computed, shallowRef, provide, onMounted, nextTick, onBeforeUnmount, defineComponent, useAttrs, watchEffect, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, normalizeStyle, createVNode, createTextVNode, toDisplayString, createElementBlock, normalizeClass, createCommentVNode, reactive, Fragment, renderList, resolveDynamicComponent, normalizeProps, guardReactiveProps, h, withDirectives, isVNode, withKeys, withModifiers, TransitionGroup, toHandlers, getCurrentInstance, resolveComponent, pushScopeId, popScopeId, toRefs, useSlots, onUnmounted, resolveDirective, onBeforeMount, getCurrentScope, onScopeDispose, toRef, mergeModels, useModel, vShow, createStaticVNode, hasInjectionContext, markRaw, effectScope, toRaw } from 'vue';
|
|
3
3
|
import { dayjs, localeContextKey, ElDialog, ElButton, ElPagination, ElRadioGroup, ElRadio, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon, ElTooltip, ElPopconfirm, ElLink, ElMessageBox, useFormDisabled, ElDatePicker, ClickOutside, ElTag, ElInput, ElAutocomplete, ElCascader, ElCheckboxGroup, ElCheckbox, ElColorPicker, ElInputNumber, ElRate, ElSelect, ElOption, ElSlider, ElSwitch, ElTimePicker, ElTimeSelect, ElTransfer, ElTreeSelect, ElSelectV2, ElText, ElDivider, ElFormItem, ElOptionGroup, ElRow, ElCol, ElForm, ElCard, ElMessage, ElImage, ElProgress, ElAvatar, ElPopover, ElTable, vLoading, ElDescriptions, ElDescriptionsItem, ElDrawer, TableV2FixedDir, ElAutoResizer, ElTableV2, ElSteps, ElStep, ElBreadcrumb, ElBreadcrumbItem, ElMenuItem, ElSubMenu, ElMenu, ElScrollbar, ElHeader, ElContainer, ElMain, ElBacktop, ElUpload } from 'element-plus';
|
|
4
4
|
|
|
@@ -8613,6 +8613,204 @@ function useDictInjection(dictStore) {
|
|
|
8613
8613
|
provide(DictStoreInjectionKey, dictStore);
|
|
8614
8614
|
}
|
|
8615
8615
|
|
|
8616
|
+
const DEFAULT_RESIZE_AREA_WIDTH = 12;
|
|
8617
|
+
const DEFAULT_BORDER_COLOR = "var(--theme-color)";
|
|
8618
|
+
const DEFAULT_SCROLL_SELECTOR = ".el-scrollbar__wrap";
|
|
8619
|
+
function useTableDragScroll(wrapperRef, tableRef, options = {}) {
|
|
8620
|
+
var _a, _b, _c;
|
|
8621
|
+
const resizeAreaWidth = (_a = options.resizeAreaWidth) != null ? _a : DEFAULT_RESIZE_AREA_WIDTH;
|
|
8622
|
+
const borderColor = (_b = options.resizeBorderColor) != null ? _b : DEFAULT_BORDER_COLOR;
|
|
8623
|
+
const scrollSelector = (_c = options.scrollContainerSelector) != null ? _c : DEFAULT_SCROLL_SELECTOR;
|
|
8624
|
+
const isDragging = ref(false);
|
|
8625
|
+
const isResizing = ref(false);
|
|
8626
|
+
const startX = ref(0);
|
|
8627
|
+
const scrollLeft = ref(0);
|
|
8628
|
+
const scrollContainer = ref(null);
|
|
8629
|
+
const isEnabled = () => {
|
|
8630
|
+
const enabled = options.enabled;
|
|
8631
|
+
if (enabled === void 0) return true;
|
|
8632
|
+
if (typeof enabled === "boolean") return enabled;
|
|
8633
|
+
return enabled.value;
|
|
8634
|
+
};
|
|
8635
|
+
const getTableEl = () => {
|
|
8636
|
+
var _a2;
|
|
8637
|
+
const fromRef = (_a2 = tableRef == null ? void 0 : tableRef.value) == null ? void 0 : _a2.$el;
|
|
8638
|
+
if (fromRef) return fromRef;
|
|
8639
|
+
const wrapper = wrapperRef.value;
|
|
8640
|
+
if (!wrapper) return null;
|
|
8641
|
+
return wrapper.querySelector(".el-table");
|
|
8642
|
+
};
|
|
8643
|
+
const refreshScrollContainer = () => {
|
|
8644
|
+
const tableEl = getTableEl();
|
|
8645
|
+
if (tableEl) {
|
|
8646
|
+
scrollContainer.value = tableEl.querySelector(scrollSelector);
|
|
8647
|
+
}
|
|
8648
|
+
};
|
|
8649
|
+
const isInsideTable = (e) => {
|
|
8650
|
+
const tableEl = getTableEl();
|
|
8651
|
+
if (!tableEl) return false;
|
|
8652
|
+
const target = e.target;
|
|
8653
|
+
return !!target && tableEl.contains(target);
|
|
8654
|
+
};
|
|
8655
|
+
const isInResizeArea = (e, th) => {
|
|
8656
|
+
const rect = th.getBoundingClientRect();
|
|
8657
|
+
const mouseX = e.clientX;
|
|
8658
|
+
return mouseX >= rect.right - resizeAreaWidth && mouseX <= rect.right + 4;
|
|
8659
|
+
};
|
|
8660
|
+
const getCurrentColumn = (e) => {
|
|
8661
|
+
var _a2;
|
|
8662
|
+
let current = e.target;
|
|
8663
|
+
while (current && ((_a2 = current.tagName) == null ? void 0 : _a2.toLowerCase()) !== "th") {
|
|
8664
|
+
current = current.parentElement;
|
|
8665
|
+
if (!current || current === wrapperRef.value) return null;
|
|
8666
|
+
}
|
|
8667
|
+
return current;
|
|
8668
|
+
};
|
|
8669
|
+
const clearAllHeaderStyles = () => {
|
|
8670
|
+
const tableEl = getTableEl();
|
|
8671
|
+
if (!tableEl) return;
|
|
8672
|
+
const headers = tableEl.querySelectorAll("th");
|
|
8673
|
+
headers.forEach((header) => {
|
|
8674
|
+
const h = header;
|
|
8675
|
+
h.style.borderRight = "";
|
|
8676
|
+
h.style.cursor = "";
|
|
8677
|
+
});
|
|
8678
|
+
};
|
|
8679
|
+
const onMouseDown = (e) => {
|
|
8680
|
+
if (!isEnabled()) return;
|
|
8681
|
+
if (!isInsideTable(e)) return;
|
|
8682
|
+
if (!scrollContainer.value) {
|
|
8683
|
+
refreshScrollContainer();
|
|
8684
|
+
if (!scrollContainer.value) return;
|
|
8685
|
+
}
|
|
8686
|
+
const target = e.target;
|
|
8687
|
+
const column = getCurrentColumn(e);
|
|
8688
|
+
if (column && isInResizeArea(e, column)) {
|
|
8689
|
+
isDragging.value = false;
|
|
8690
|
+
isResizing.value = true;
|
|
8691
|
+
return;
|
|
8692
|
+
}
|
|
8693
|
+
if (target.classList.contains("noclick")) {
|
|
8694
|
+
isDragging.value = false;
|
|
8695
|
+
isResizing.value = true;
|
|
8696
|
+
return;
|
|
8697
|
+
}
|
|
8698
|
+
isDragging.value = true;
|
|
8699
|
+
isResizing.value = false;
|
|
8700
|
+
startX.value = e.clientX;
|
|
8701
|
+
scrollLeft.value = scrollContainer.value.scrollLeft;
|
|
8702
|
+
if (wrapperRef.value) {
|
|
8703
|
+
wrapperRef.value.style.cursor = "";
|
|
8704
|
+
}
|
|
8705
|
+
target.style.cursor = "";
|
|
8706
|
+
};
|
|
8707
|
+
const onMouseMove = (e) => {
|
|
8708
|
+
var _a2, _b2, _c2;
|
|
8709
|
+
if (!isEnabled()) return;
|
|
8710
|
+
const target = e.target;
|
|
8711
|
+
const parentElement = target.parentElement;
|
|
8712
|
+
const insideTable = isInsideTable(e);
|
|
8713
|
+
if (!insideTable) {
|
|
8714
|
+
if (wrapperRef.value) {
|
|
8715
|
+
wrapperRef.value.style.cursor = "";
|
|
8716
|
+
}
|
|
8717
|
+
if (isDragging.value && scrollContainer.value) {
|
|
8718
|
+
const deltaX2 = e.clientX - startX.value;
|
|
8719
|
+
scrollContainer.value.scrollLeft = scrollLeft.value - deltaX2;
|
|
8720
|
+
}
|
|
8721
|
+
return;
|
|
8722
|
+
}
|
|
8723
|
+
if (target.classList.contains("drag-disabled")) {
|
|
8724
|
+
target.style.cursor = "pointer";
|
|
8725
|
+
return;
|
|
8726
|
+
}
|
|
8727
|
+
const column = getCurrentColumn(e);
|
|
8728
|
+
if (column) {
|
|
8729
|
+
const allHeaders = (_a2 = column.parentElement) == null ? void 0 : _a2.querySelectorAll("th");
|
|
8730
|
+
if (isInResizeArea(e, column)) {
|
|
8731
|
+
isDragging.value = false;
|
|
8732
|
+
isResizing.value = true;
|
|
8733
|
+
column.style.borderRight = `2px solid ${borderColor}`;
|
|
8734
|
+
allHeaders == null ? void 0 : allHeaders.forEach((header) => {
|
|
8735
|
+
const h = header;
|
|
8736
|
+
if (h !== column) {
|
|
8737
|
+
h.style.borderRight = "";
|
|
8738
|
+
h.style.cursor = "";
|
|
8739
|
+
}
|
|
8740
|
+
});
|
|
8741
|
+
return;
|
|
8742
|
+
} else {
|
|
8743
|
+
allHeaders == null ? void 0 : allHeaders.forEach((header) => {
|
|
8744
|
+
const h = header;
|
|
8745
|
+
h.style.borderRight = "";
|
|
8746
|
+
h.style.cursor = "";
|
|
8747
|
+
});
|
|
8748
|
+
isResizing.value = false;
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
if (target.classList.contains("noclick") || target.classList.contains("el-table__column-resize-proxy")) {
|
|
8752
|
+
isDragging.value = false;
|
|
8753
|
+
isResizing.value = true;
|
|
8754
|
+
return;
|
|
8755
|
+
}
|
|
8756
|
+
if (isResizing.value || ((_b2 = parentElement == null ? void 0 : parentElement.tagName) == null ? void 0 : _b2.toLowerCase()) === "th" || ((_c2 = target.tagName) == null ? void 0 : _c2.toLowerCase()) === "th") {
|
|
8757
|
+
isDragging.value = false;
|
|
8758
|
+
return;
|
|
8759
|
+
}
|
|
8760
|
+
if (target.classList.contains("edit-icon")) {
|
|
8761
|
+
target.style.cursor = "pointer";
|
|
8762
|
+
return;
|
|
8763
|
+
}
|
|
8764
|
+
isResizing.value = false;
|
|
8765
|
+
target.style.cursor = "";
|
|
8766
|
+
if (wrapperRef.value) {
|
|
8767
|
+
wrapperRef.value.style.cursor = "grab";
|
|
8768
|
+
}
|
|
8769
|
+
if (!isDragging.value || !scrollContainer.value) return;
|
|
8770
|
+
const deltaX = e.clientX - startX.value;
|
|
8771
|
+
scrollContainer.value.scrollLeft = scrollLeft.value - deltaX;
|
|
8772
|
+
};
|
|
8773
|
+
const onMouseUp = () => {
|
|
8774
|
+
isDragging.value = false;
|
|
8775
|
+
isResizing.value = false;
|
|
8776
|
+
if (wrapperRef.value) {
|
|
8777
|
+
wrapperRef.value.style.cursor = "";
|
|
8778
|
+
}
|
|
8779
|
+
clearAllHeaderStyles();
|
|
8780
|
+
};
|
|
8781
|
+
const onTableBodyOver = () => {
|
|
8782
|
+
const ths = document.querySelectorAll(".el-table__header th");
|
|
8783
|
+
ths.forEach((th) => {
|
|
8784
|
+
const h = th;
|
|
8785
|
+
h.style.borderRight = "";
|
|
8786
|
+
h.style.cursor = "";
|
|
8787
|
+
});
|
|
8788
|
+
};
|
|
8789
|
+
let tableBodyEl = null;
|
|
8790
|
+
onMounted(() => {
|
|
8791
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
8792
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
8793
|
+
requestAnimationFrame(() => {
|
|
8794
|
+
var _a2;
|
|
8795
|
+
refreshScrollContainer();
|
|
8796
|
+
const tableEl = getTableEl();
|
|
8797
|
+
tableBodyEl = (_a2 = tableEl == null ? void 0 : tableEl.querySelector(".el-table__body")) != null ? _a2 : null;
|
|
8798
|
+
tableBodyEl == null ? void 0 : tableBodyEl.addEventListener("mouseover", onTableBodyOver);
|
|
8799
|
+
});
|
|
8800
|
+
});
|
|
8801
|
+
onBeforeUnmount(() => {
|
|
8802
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
8803
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
8804
|
+
tableBodyEl == null ? void 0 : tableBodyEl.removeEventListener("mouseover", onTableBodyOver);
|
|
8805
|
+
});
|
|
8806
|
+
return {
|
|
8807
|
+
onMouseDown,
|
|
8808
|
+
isDragging,
|
|
8809
|
+
isResizing,
|
|
8810
|
+
refreshScrollContainer
|
|
8811
|
+
};
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8616
8814
|
const _hoisted_1$v = { class: "plus-dialog-body" };
|
|
8617
8815
|
var _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
8618
8816
|
...{
|
|
@@ -33206,7 +33404,8 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
33206
33404
|
hideHeaderFilter: { type: Boolean, default: true },
|
|
33207
33405
|
columnCacheKey: { default: void 0 },
|
|
33208
33406
|
disableColumnCache: { type: Boolean, default: false },
|
|
33209
|
-
columnSettingsText: { default: void 0 }
|
|
33407
|
+
columnSettingsText: { default: void 0 },
|
|
33408
|
+
dragScroll: { type: [Boolean, Object], default: false }
|
|
33210
33409
|
},
|
|
33211
33410
|
emits: ["header-filter-confirm", "header-filter-reset"],
|
|
33212
33411
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -33217,6 +33416,21 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
33217
33416
|
const plusPageConfig = useYcComponentConfig("plusPage");
|
|
33218
33417
|
const plusPageRef = ref();
|
|
33219
33418
|
const rootRef = ref();
|
|
33419
|
+
const dragScrollWrapperRef = ref(null);
|
|
33420
|
+
const dragScrollEnabled = computed(() => props.dragScroll !== false && props.dragScroll != null);
|
|
33421
|
+
const dragScrollOptions = computed(() => {
|
|
33422
|
+
const value = props.dragScroll;
|
|
33423
|
+
if (value && typeof value === "object") return value;
|
|
33424
|
+
return {};
|
|
33425
|
+
});
|
|
33426
|
+
const { onMouseDown: onDragScrollMouseDown } = useTableDragScroll(
|
|
33427
|
+
dragScrollWrapperRef,
|
|
33428
|
+
void 0,
|
|
33429
|
+
{
|
|
33430
|
+
...dragScrollOptions.value,
|
|
33431
|
+
enabled: dragScrollEnabled
|
|
33432
|
+
}
|
|
33433
|
+
);
|
|
33220
33434
|
const plusTableInstance = computed(() => {
|
|
33221
33435
|
var _a;
|
|
33222
33436
|
return (_a = plusPageRef.value) == null ? void 0 : _a.plusTableInstance;
|
|
@@ -33634,6 +33848,7 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
33634
33848
|
void resolvedColumnSettingsText.value;
|
|
33635
33849
|
void hasRequest.value;
|
|
33636
33850
|
void showDefaultColumnSettingsIcon.value;
|
|
33851
|
+
void dragScrollEnabled.value;
|
|
33637
33852
|
__expose({
|
|
33638
33853
|
plusPageRef,
|
|
33639
33854
|
plusTableInstance,
|
|
@@ -33691,62 +33906,76 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
33691
33906
|
class: normalizeClass(["yc-plus-page", { "yc-plus-page--borderless": isBorderless.value }])
|
|
33692
33907
|
},
|
|
33693
33908
|
[
|
|
33694
|
-
|
|
33695
|
-
|
|
33696
|
-
|
|
33697
|
-
|
|
33698
|
-
|
|
33699
|
-
|
|
33700
|
-
|
|
33701
|
-
|
|
33702
|
-
|
|
33703
|
-
|
|
33704
|
-
|
|
33705
|
-
|
|
33706
|
-
|
|
33707
|
-
|
|
33708
|
-
|
|
33709
|
-
|
|
33710
|
-
|
|
33711
|
-
|
|
33712
|
-
|
|
33713
|
-
|
|
33714
|
-
|
|
33715
|
-
|
|
33716
|
-
|
|
33717
|
-
|
|
33718
|
-
|
|
33719
|
-
|
|
33720
|
-
|
|
33721
|
-
|
|
33722
|
-
|
|
33723
|
-
|
|
33724
|
-
|
|
33725
|
-
|
|
33726
|
-
|
|
33727
|
-
|
|
33728
|
-
|
|
33729
|
-
|
|
33730
|
-
|
|
33731
|
-
|
|
33732
|
-
|
|
33733
|
-
|
|
33734
|
-
|
|
33735
|
-
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
|
|
33740
|
-
|
|
33741
|
-
|
|
33742
|
-
|
|
33743
|
-
|
|
33744
|
-
|
|
33745
|
-
|
|
33746
|
-
|
|
33747
|
-
|
|
33748
|
-
|
|
33749
|
-
|
|
33909
|
+
createCommentVNode(" \u62D6\u62FD\u6EDA\u52A8\u5305\u88F9\u5C42\uFF1AdragScroll \u542F\u7528\u65F6\u4ECB\u5165\uFF0C\u4F46\u59CB\u7EC8\u4FDD\u7559 ref\uFF0C\n \u4EE5\u4FDD\u8BC1 mousedown \u900F\u4F20 + hook \u5185\u90E8 DOM \u67E5\u8BE2\u6B63\u5E38 "),
|
|
33910
|
+
createElementVNode(
|
|
33911
|
+
"div",
|
|
33912
|
+
{
|
|
33913
|
+
ref_key: "dragScrollWrapperRef",
|
|
33914
|
+
ref: dragScrollWrapperRef,
|
|
33915
|
+
class: normalizeClass(["yc-plus-page__drag-wrapper", { "yc-plus-page__drag-wrapper--enabled": dragScrollEnabled.value }]),
|
|
33916
|
+
onMousedown: _cache[0] || (_cache[0] = ($event) => dragScrollEnabled.value ? unref(onDragScrollMouseDown)($event) : void 0)
|
|
33917
|
+
},
|
|
33918
|
+
[
|
|
33919
|
+
createVNode(unref(PlusPage), mergeProps({
|
|
33920
|
+
ref_key: "plusPageRef",
|
|
33921
|
+
ref: plusPageRef
|
|
33922
|
+
}, { ...props, ..._ctx.$attrs }, {
|
|
33923
|
+
columns: enhancedColumns.value,
|
|
33924
|
+
"is-card": _ctx.isCard,
|
|
33925
|
+
request: wrappedRequest.value,
|
|
33926
|
+
search: mergedSearch.value,
|
|
33927
|
+
"search-card-props": mergedSearchCardProps.value,
|
|
33928
|
+
"table-card-props": mergedTableCardProps.value,
|
|
33929
|
+
table: mergedTable.value,
|
|
33930
|
+
pagination: mergedPagination.value,
|
|
33931
|
+
"default-page-info": { page: 1, pageSize: DEFAULT_PAGE_SIZE },
|
|
33932
|
+
onFilterTableHeader: handleFilterTableHeader,
|
|
33933
|
+
onHeaderDragend: handleHeaderDragend
|
|
33934
|
+
}), createSlots({
|
|
33935
|
+
default: withCtx(() => [
|
|
33936
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
33937
|
+
]),
|
|
33938
|
+
_: 2
|
|
33939
|
+
/* DYNAMIC */
|
|
33940
|
+
}, [
|
|
33941
|
+
_ctx.$slots["column-settings-icon"] ? {
|
|
33942
|
+
name: "column-settings-icon",
|
|
33943
|
+
fn: withCtx(() => [
|
|
33944
|
+
renderSlot(_ctx.$slots, "column-settings-icon", {}, void 0, true)
|
|
33945
|
+
]),
|
|
33946
|
+
key: "0"
|
|
33947
|
+
} : showDefaultColumnSettingsIcon.value ? {
|
|
33948
|
+
name: "column-settings-icon",
|
|
33949
|
+
fn: withCtx(() => [
|
|
33950
|
+
createElementVNode("div", { class: "column-settings-wrapper" }, [
|
|
33951
|
+
createVNode(unref(YcSvgIcon), {
|
|
33952
|
+
src: fieldSettingIconUrl.value,
|
|
33953
|
+
size: 16
|
|
33954
|
+
}, null, 8, ["src"]),
|
|
33955
|
+
createElementVNode(
|
|
33956
|
+
"span",
|
|
33957
|
+
{ class: "column-settings-text" },
|
|
33958
|
+
toDisplayString(resolvedColumnSettingsText.value),
|
|
33959
|
+
1
|
|
33960
|
+
/* TEXT */
|
|
33961
|
+
)
|
|
33962
|
+
])
|
|
33963
|
+
]),
|
|
33964
|
+
key: "1"
|
|
33965
|
+
} : void 0,
|
|
33966
|
+
renderList(_ctx.$slots, (_, name) => {
|
|
33967
|
+
return {
|
|
33968
|
+
name,
|
|
33969
|
+
fn: withCtx((slotProps) => [
|
|
33970
|
+
name !== "column-settings-icon" && name !== "default" ? renderSlot(_ctx.$slots, name, normalizeProps(mergeProps({ key: 0 }, slotProps)), void 0, true) : createCommentVNode("v-if", true)
|
|
33971
|
+
])
|
|
33972
|
+
};
|
|
33973
|
+
})
|
|
33974
|
+
]), 1040, ["columns", "is-card", "request", "search", "search-card-props", "table-card-props", "table", "pagination", "default-page-info"])
|
|
33975
|
+
],
|
|
33976
|
+
34
|
|
33977
|
+
/* CLASS, NEED_HYDRATION */
|
|
33978
|
+
)
|
|
33750
33979
|
],
|
|
33751
33980
|
2
|
|
33752
33981
|
/* CLASS */
|
|
@@ -33755,7 +33984,7 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
33755
33984
|
}
|
|
33756
33985
|
});
|
|
33757
33986
|
|
|
33758
|
-
var YcPlusPageComponent = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
33987
|
+
var YcPlusPageComponent = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-3ce473db"], ["__file", "index.vue"]]);
|
|
33759
33988
|
|
|
33760
33989
|
function compareValues(a, b) {
|
|
33761
33990
|
if (a == null && b == null) return 0;
|
|
@@ -64300,8 +64529,8 @@ function createDictStore(config) {
|
|
|
64300
64529
|
});
|
|
64301
64530
|
}
|
|
64302
64531
|
|
|
64303
|
-
const version = "0.0.
|
|
64532
|
+
const version = "0.0.77";
|
|
64304
64533
|
|
|
64305
64534
|
const install = installer.install;
|
|
64306
64535
|
|
|
64307
|
-
export { DEFAULT_CDN_CONFIG, DEFAULT_OPERATORS, DEFAULT_YC_CONFIG, DatePickerValueIsArrayList, DefaultPageInfo, DefaultPageSizeList, DictStoreInjectionKey, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS, PlusBreadcrumb, PlusCheckCard, PlusCheckCardGroup, PlusDatePicker, PlusDescriptions, PlusDialog, PlusDialogForm, PlusDisplayItem, PlusDrawerForm, PlusForm, PlusFormItem, PlusHeader, PlusInputTag, PlusLayout, PlusPage, PlusPagination, PlusPopover, PlusRadio, PlusSearch, PlusSidebar, PlusSidebarItem, PlusStepsForm, PlusTable, PlusVirtualTable, YcAnimateSelector as ReAnimateSelector, YcAuth as ReAuth, YcBatchImportDialog as ReBatchImportDialog, YcCard as ReCard, YcCol as ReCol, YcConfigProvider as ReConfigProvider, ReDialog, YcDownloadDialog as ReDownloadDialog, ReDrawer, ReFormContainerHeader, YcLineTree as ReLineTree, ReMoreActions, YcCountTo as ReNormalCountTo, YcPerms as RePerms, RePlusPage, RePlusTree, YcSegmented as ReSegmented, YcSelectV2 as ReSelectV2, YcStatusDialog as ReStatusDialog, YcSvgIcon as ReSvgIcon, YcTabsWithFilter as ReTabsWithFilter, YcText as ReText, YcReboundCountTo as ReboundCountTo, SIZE_MAP, STATUS_CONFIG_MAP, TableColumnsEmptyTextInjectionKey, TableFormFieldRefInjectionKey, TableFormRefInjectionKey, TableFormRowInfoInjectionKey, ValueIsArrayList, ValueIsBooleanList, ValueIsNumberList, YC_CONFIG_KEY, YcAnimateSelector, YcAnimateSelectorWithInstall, YcAuth, YcAuthWithInstall, YcBatchImportDialog, YcBatchImportDialogWithInstall, YcCard, YcCardWithInstall, YcCol, YcConfigProvider, YcCountTo, YcDialog, YcDownloadDialog, YcDownloadDialogWithInstall, YcDrawer, YcFlicker, YcFormContainerHeader, YcLineTree, YcLineTreeWithInstall, YcMoreActions, YcPerms, YcPermsWithInstall, YcPlusPage, YcPlusTree, YcReboundCountTo, YcReboundCountToWithInstall, YcSegmented, YcSegmentedWithInstall, YcSelectV2, YcStatusDialog, YcSvgIcon, YcTableHeaderFilterCell, YcTabsWithFilter, YcTabsWithFilterWithInstall, YcText, YcTextWithInstall, addDrawer, animates, closeAllDrawer, closeDrawer, createDictStore, installer as default, drawerStore, findNodeById, findNodeByPath, findNodePosition, fnPerm, n as hasFunctionPermission, insertAsChild, insertAsSibling, insertNodeAtPosition, install, providePlusProConfig, removeNode, reorderNodeChildren, reorderSiblingNodes, selectValueTypeList, updateDrawer, useColumnAdapter, useDialogFormConfig, useDictInjection, useDrawerFormConfig, a as useFunctionPermission, useGetOptions, useHeaderFilter, useLocalHeaderFilter, useLocale, usePlusFormReset, usePlusProConfig, useRenderFlicker, useRenderFlicker as useRenderReFlicker, useSelectWithMapping, useSelectWithPagination, useSortableDrag$1 as useSortableDrag, useTable, useVirtualScroll, useVirtualSelection, useYcAuth, useYcCdn, useYcCdnUrl, useYcComponentConfig, useYcConfig, useYcPerms, useYcShowPageSearch, useYcTranslate, version };
|
|
64536
|
+
export { DEFAULT_CDN_CONFIG, DEFAULT_OPERATORS, DEFAULT_YC_CONFIG, DatePickerValueIsArrayList, DefaultPageInfo, DefaultPageSizeList, DictStoreInjectionKey, NO_VALUE_OPERATORS, OPERATOR_CATALOG, OPERATOR_LABELS, PlusBreadcrumb, PlusCheckCard, PlusCheckCardGroup, PlusDatePicker, PlusDescriptions, PlusDialog, PlusDialogForm, PlusDisplayItem, PlusDrawerForm, PlusForm, PlusFormItem, PlusHeader, PlusInputTag, PlusLayout, PlusPage, PlusPagination, PlusPopover, PlusRadio, PlusSearch, PlusSidebar, PlusSidebarItem, PlusStepsForm, PlusTable, PlusVirtualTable, YcAnimateSelector as ReAnimateSelector, YcAuth as ReAuth, YcBatchImportDialog as ReBatchImportDialog, YcCard as ReCard, YcCol as ReCol, YcConfigProvider as ReConfigProvider, ReDialog, YcDownloadDialog as ReDownloadDialog, ReDrawer, ReFormContainerHeader, YcLineTree as ReLineTree, ReMoreActions, YcCountTo as ReNormalCountTo, YcPerms as RePerms, RePlusPage, RePlusTree, YcSegmented as ReSegmented, YcSelectV2 as ReSelectV2, YcStatusDialog as ReStatusDialog, YcSvgIcon as ReSvgIcon, YcTabsWithFilter as ReTabsWithFilter, YcText as ReText, YcReboundCountTo as ReboundCountTo, SIZE_MAP, STATUS_CONFIG_MAP, TableColumnsEmptyTextInjectionKey, TableFormFieldRefInjectionKey, TableFormRefInjectionKey, TableFormRowInfoInjectionKey, ValueIsArrayList, ValueIsBooleanList, ValueIsNumberList, YC_CONFIG_KEY, YcAnimateSelector, YcAnimateSelectorWithInstall, YcAuth, YcAuthWithInstall, YcBatchImportDialog, YcBatchImportDialogWithInstall, YcCard, YcCardWithInstall, YcCol, YcConfigProvider, YcCountTo, YcDialog, YcDownloadDialog, YcDownloadDialogWithInstall, YcDrawer, YcFlicker, YcFormContainerHeader, YcLineTree, YcLineTreeWithInstall, YcMoreActions, YcPerms, YcPermsWithInstall, YcPlusPage, YcPlusTree, YcReboundCountTo, YcReboundCountToWithInstall, YcSegmented, YcSegmentedWithInstall, YcSelectV2, YcStatusDialog, YcSvgIcon, YcTableHeaderFilterCell, YcTabsWithFilter, YcTabsWithFilterWithInstall, YcText, YcTextWithInstall, addDrawer, animates, closeAllDrawer, closeDrawer, createDictStore, installer as default, drawerStore, findNodeById, findNodeByPath, findNodePosition, fnPerm, n as hasFunctionPermission, insertAsChild, insertAsSibling, insertNodeAtPosition, install, providePlusProConfig, removeNode, reorderNodeChildren, reorderSiblingNodes, selectValueTypeList, updateDrawer, useColumnAdapter, useDialogFormConfig, useDictInjection, useDrawerFormConfig, a as useFunctionPermission, useGetOptions, useHeaderFilter, useLocalHeaderFilter, useLocale, usePlusFormReset, usePlusProConfig, useRenderFlicker, useRenderFlicker as useRenderReFlicker, useSelectWithMapping, useSelectWithPagination, useSortableDrag$1 as useSortableDrag, useTable, useTableDragScroll, useVirtualScroll, useVirtualSelection, useYcAuth, useYcCdn, useYcCdnUrl, useYcComponentConfig, useYcConfig, useYcPerms, useYcShowPageSearch, useYcTranslate, version };
|
package/lib/components/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var useVirtualScroll = require('./virtual-table/src/use-virtual-scroll.js');
|
|
|
49
49
|
var type = require('./yc-config-provider/src/type.js');
|
|
50
50
|
var useYcConfig = require('./yc-config-provider/src/useYcConfig.js');
|
|
51
51
|
var useHeaderFilter = require('./yc-plus-page/src/use-header-filter.js');
|
|
52
|
+
var useTableDragScroll = require('../hooks/useTableDragScroll.js');
|
|
52
53
|
var useLocalHeaderFilter = require('./yc-plus-page/src/use-local-header-filter.js');
|
|
53
54
|
var constants = require('./yc-plus-page/src/constants.js');
|
|
54
55
|
var index$p = require('./yc-select-v2/src/index.vue.js');
|
|
@@ -145,6 +146,7 @@ exports.useYcPerms = useYcConfig.useYcPerms;
|
|
|
145
146
|
exports.useYcShowPageSearch = useYcConfig.useYcShowPageSearch;
|
|
146
147
|
exports.useYcTranslate = useYcConfig.useYcTranslate;
|
|
147
148
|
exports.useHeaderFilter = useHeaderFilter.useHeaderFilter;
|
|
149
|
+
exports.useTableDragScroll = useTableDragScroll.useTableDragScroll;
|
|
148
150
|
exports.useLocalHeaderFilter = useLocalHeaderFilter.useLocalHeaderFilter;
|
|
149
151
|
exports.DEFAULT_OPERATORS = constants.DEFAULT_OPERATORS;
|
|
150
152
|
exports.NO_VALUE_OPERATORS = constants.NO_VALUE_OPERATORS;
|
|
@@ -4,6 +4,8 @@ import { DefineComponent } from 'vue';
|
|
|
4
4
|
export type { YcPlusPageProps, FieldCatalogItem, FieldCatalog, OperatorOption, HeaderFilterConfig, ColumnHeaderFilterConfig, HeaderFilterPayload, HeaderFilterResetPayload, FilterItem, HeaderFiltersState, OrderByItem, RequestResponse } from './src/type';
|
|
5
5
|
export { useHeaderFilter } from './src/use-header-filter';
|
|
6
6
|
export type { UseHeaderFilterOptions, UseHeaderFilterReturn } from './src/use-header-filter';
|
|
7
|
+
export type { UseTableDragScrollOptions, UseTableDragScrollReturn, TableLikeRef } from '../../hooks/useTableDragScroll';
|
|
8
|
+
export { useTableDragScroll } from '../../hooks/useTableDragScroll';
|
|
7
9
|
export { useLocalHeaderFilter } from './src/use-local-header-filter';
|
|
8
10
|
export type { LocalFilterColumnConfig, UseLocalHeaderFilterOptions, UseLocalHeaderFilterReturn } from './src/use-local-header-filter';
|
|
9
11
|
export { OPERATOR_CATALOG, OPERATOR_LABELS, NO_VALUE_OPERATORS, DEFAULT_OPERATORS } from './src/constants';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var index = require('./src/index.vue.js');
|
|
4
4
|
var headerFilterCell = require('./src/header-filter-cell.vue.js');
|
|
5
5
|
var useHeaderFilter = require('./src/use-header-filter.js');
|
|
6
|
+
var useTableDragScroll = require('../../hooks/useTableDragScroll.js');
|
|
6
7
|
var useLocalHeaderFilter = require('./src/use-local-header-filter.js');
|
|
7
8
|
var constants = require('./src/constants.js');
|
|
8
9
|
|
|
@@ -11,6 +12,7 @@ const YcTableHeaderFilterCell = headerFilterCell.default;
|
|
|
11
12
|
const RePlusPage = index.default;
|
|
12
13
|
|
|
13
14
|
exports.useHeaderFilter = useHeaderFilter.useHeaderFilter;
|
|
15
|
+
exports.useTableDragScroll = useTableDragScroll.useTableDragScroll;
|
|
14
16
|
exports.useLocalHeaderFilter = useLocalHeaderFilter.useLocalHeaderFilter;
|
|
15
17
|
exports.DEFAULT_OPERATORS = constants.DEFAULT_OPERATORS;
|
|
16
18
|
exports.NO_VALUE_OPERATORS = constants.NO_VALUE_OPERATORS;
|