@koi-design/uxd-ui 14.0.13 → 14.0.15
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/Select/RefSelect.mjs +45 -31
- package/es/components/Select/RefSelect.mjs.map +1 -1
- package/es/components/Table/BaseTable.mjs +5 -3
- package/es/components/Table/BaseTable.mjs.map +1 -1
- package/es/components/Table/BaseTable.vue.d.ts +18 -2
- package/es/components/Table/BodyTable.vue.d.ts +18 -2
- package/es/components/Table/HeadTable.vue.d.ts +18 -2
- package/es/components/Table/Table.mjs +6 -2
- package/es/components/Table/Table.mjs.map +1 -1
- package/es/components/Table/Table.type.d.ts +2 -0
- package/es/components/Table/Table.type.mjs.map +1 -1
- package/es/components/Table/Table.vue.d.ts +36 -4
- package/es/components/Table/TableBox.vue.d.ts +36 -4
- package/es/components/Table/hooks/useTableResize.d.ts +2 -0
- package/es/components/Table/hooks/useTableResize.mjs +8 -1
- package/es/components/Table/hooks/useTableResize.mjs.map +1 -1
- package/es/components/Table/tableUnits/ColGroup.mjs +14 -3
- package/es/components/Table/tableUnits/ColGroup.mjs.map +1 -1
- package/es/components/Table/tableUnits/ColGroup.vue.d.ts +10 -0
- package/es/components/Table/tableUnits/ExpandRows.vue.d.ts +4 -1
- package/es/components/Table/tableUnits/TableBody.vue.d.ts +8 -2
- package/es/components/Table/tableUnits/TableCell.mjs +6 -4
- package/es/components/Table/tableUnits/TableCell.mjs.map +1 -1
- package/es/components/Table/tableUnits/TableCell.vue.d.ts +4 -1
- package/es/components/Table/tableUnits/TableRow.vue.d.ts +4 -1
- package/lib/components/Select/RefSelect.js +44 -30
- package/lib/components/Select/RefSelect.js.map +1 -1
- package/lib/components/Table/BaseTable.js +5 -3
- package/lib/components/Table/BaseTable.js.map +1 -1
- package/lib/components/Table/BaseTable.vue.d.ts +18 -2
- package/lib/components/Table/BodyTable.vue.d.ts +18 -2
- package/lib/components/Table/HeadTable.vue.d.ts +18 -2
- package/lib/components/Table/Table.js +6 -2
- package/lib/components/Table/Table.js.map +1 -1
- package/lib/components/Table/Table.type.d.ts +2 -0
- package/lib/components/Table/Table.type.js.map +1 -1
- package/lib/components/Table/Table.vue.d.ts +36 -4
- package/lib/components/Table/TableBox.vue.d.ts +36 -4
- package/lib/components/Table/hooks/useTableResize.d.ts +2 -0
- package/lib/components/Table/hooks/useTableResize.js +8 -1
- package/lib/components/Table/hooks/useTableResize.js.map +1 -1
- package/lib/components/Table/tableUnits/ColGroup.js +14 -3
- package/lib/components/Table/tableUnits/ColGroup.js.map +1 -1
- package/lib/components/Table/tableUnits/ColGroup.vue.d.ts +10 -0
- package/lib/components/Table/tableUnits/ExpandRows.vue.d.ts +4 -1
- package/lib/components/Table/tableUnits/TableBody.vue.d.ts +8 -2
- package/lib/components/Table/tableUnits/TableCell.js +6 -4
- package/lib/components/Table/tableUnits/TableCell.js.map +1 -1
- package/lib/components/Table/tableUnits/TableCell.vue.d.ts +4 -1
- package/lib/components/Table/tableUnits/TableRow.vue.d.ts +4 -1
- package/package.json +1 -1
- package/styles/components/modal/index.css +1 -1
- package/styles/components/modal/modal.less +4 -0
- package/styles/index.css +1 -1
- package/types/components/Table/BaseTable.vue.d.ts +18 -2
- package/types/components/Table/BodyTable.vue.d.ts +18 -2
- package/types/components/Table/HeadTable.vue.d.ts +18 -2
- package/types/components/Table/Table.type.d.ts +2 -0
- package/types/components/Table/Table.vue.d.ts +36 -4
- package/types/components/Table/TableBox.vue.d.ts +36 -4
- package/types/components/Table/hooks/useTableResize.d.ts +2 -0
- package/types/components/Table/tableUnits/ColGroup.vue.d.ts +10 -0
- package/types/components/Table/tableUnits/ExpandRows.vue.d.ts +4 -1
- package/types/components/Table/tableUnits/TableBody.vue.d.ts +8 -2
- package/types/components/Table/tableUnits/TableCell.vue.d.ts +4 -1
- package/types/components/Table/tableUnits/TableRow.vue.d.ts +4 -1
- package/uxd-ui.css +1 -1
- package/uxd-ui.esm.min.mjs +6 -6
- package/uxd-ui.esm.mjs +85 -44
- package/uxd-ui.umd.js +84 -43
- package/uxd-ui.umd.min.js +6 -6
package/uxd-ui.esm.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @koi-design/uxd-ui@4.0.
|
|
1
|
+
/*! @koi-design/uxd-ui@4.0.15 */
|
|
2
2
|
|
|
3
|
-
import { defineComponent, reactive, watch, provide, inject, computed, onMounted, ref, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, withDirectives, vShow, createBlock, resolveDynamicComponent, createCommentVNode, toRaw, resolveComponent, Transition, withCtx, createVNode, toDisplayString, isVNode, Comment as Comment$1, Fragment, Text as Text$1, h, shallowRef, toRef, nextTick, onUpdated, onUnmounted, cloneVNode, Teleport, toRefs, withModifiers, mergeProps, renderList, onBeforeUpdate, createTextVNode, createStaticVNode,
|
|
3
|
+
import { defineComponent, reactive, watch, provide, inject, computed, onMounted, ref, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, withDirectives, vShow, createBlock, resolveDynamicComponent, createCommentVNode, toRaw, resolveComponent, Transition, withCtx, createVNode, toDisplayString, isVNode, Comment as Comment$1, Fragment, Text as Text$1, h, shallowRef, toRef, nextTick, onUpdated, onUnmounted, cloneVNode, Teleport, toRefs, withModifiers, mergeProps, renderList, onBeforeUpdate, createTextVNode, createStaticVNode, normalizeProps, guardReactiveProps, watchEffect, onActivated, onDeactivated, withKeys, TransitionGroup, createApp, onBeforeMount, unref } from 'vue';
|
|
4
4
|
import { X, Terminal, CircleAlert, Info, CircleCheck, LoaderCircle, CircleX, Search, Eye, EyeOff, Check, CornerDownLeft, ChevronUp, ChevronDown, ChevronRight, MenuIcon, Minus, ChevronLeft, CheckIcon, ChevronsLeft, ChevronsRight, Calendar as Calendar$1, ZoomIn, ZoomOut, RotateCcw, RotateCw, PanelLeft, PanelRight, Image as Image$2, CheckCircle, XCircle, Star as Star$1, XIcon, FilterIcon, GripVertical, Plus, Clock, FileIcon, HelpCircle, CircleHelp, AlertCircle, SearchIcon } from 'lucide-vue-next';
|
|
5
5
|
|
|
6
6
|
const isFunction$2 = (val) => typeof val === "function";
|
|
@@ -15122,6 +15122,7 @@ const _sfc_main$1O = defineComponent({
|
|
|
15122
15122
|
emitChange(rowValue);
|
|
15123
15123
|
}
|
|
15124
15124
|
} else if (value !== stateValue.value && !Array.isArray(value)) {
|
|
15125
|
+
console.log("onSelect", value);
|
|
15125
15126
|
emitChange([value]);
|
|
15126
15127
|
}
|
|
15127
15128
|
const { autoClearSearchValue = true } = props;
|
|
@@ -15324,40 +15325,53 @@ function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15324
15325
|
"click-outside": _ctx.onClickOutside
|
|
15325
15326
|
}, {
|
|
15326
15327
|
popup: withCtx(() => [
|
|
15327
|
-
|
|
15328
|
-
id: _ctx.ariaId,
|
|
15329
|
-
ref: "listRef",
|
|
15330
|
-
"prefix-cls": _ctx.prefixCls,
|
|
15328
|
+
renderSlot(_ctx.$slots, "dropdown", normalizeProps(guardReactiveProps({
|
|
15331
15329
|
open: _ctx.stateOpen,
|
|
15332
|
-
|
|
15330
|
+
options: _ctx.displayOptions,
|
|
15333
15331
|
multiple: _ctx.multiple,
|
|
15334
|
-
|
|
15335
|
-
options: _ctx.loading ? [] : _ctx.displayOptions,
|
|
15332
|
+
multipleLimit: _ctx.multipleLimit,
|
|
15336
15333
|
values: _ctx.innerValue,
|
|
15337
|
-
|
|
15338
|
-
|
|
15339
|
-
height: _ctx.dropdownHeight,
|
|
15340
|
-
"item-height": _ctx.dropdownItemHeight,
|
|
15341
|
-
size: _ctx.size,
|
|
15342
|
-
"select-all": _ctx.selectAll,
|
|
15343
|
-
direction: _ctx.computedDirection,
|
|
15344
|
-
"title-key": _ctx.titleKey,
|
|
15334
|
+
searchValue: _ctx.searchValue,
|
|
15335
|
+
loading: _ctx.loading,
|
|
15345
15336
|
onSelect: _ctx.onOptionSelect,
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
]
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15337
|
+
onCreate: _ctx.onCreateSubmit,
|
|
15338
|
+
onClose: () => _ctx.onToggleOpen(false)
|
|
15339
|
+
})), () => [
|
|
15340
|
+
createVNode(_component_DropdownMenu, {
|
|
15341
|
+
id: _ctx.ariaId,
|
|
15342
|
+
ref: "listRef",
|
|
15343
|
+
"prefix-cls": _ctx.prefixCls,
|
|
15344
|
+
open: _ctx.stateOpen,
|
|
15345
|
+
width: _ctx.dropdownMenuWidth,
|
|
15346
|
+
multiple: _ctx.multiple,
|
|
15347
|
+
"multiple-limit": _ctx.multipleLimit,
|
|
15348
|
+
options: _ctx.loading ? [] : _ctx.displayOptions,
|
|
15349
|
+
values: _ctx.innerValue,
|
|
15350
|
+
"search-value": _ctx.searchValue,
|
|
15351
|
+
"default-active-first": _ctx.defaultActiveFirst,
|
|
15352
|
+
height: _ctx.dropdownHeight,
|
|
15353
|
+
"item-height": _ctx.dropdownItemHeight,
|
|
15354
|
+
size: _ctx.size,
|
|
15355
|
+
"select-all": _ctx.selectAll,
|
|
15356
|
+
direction: _ctx.computedDirection,
|
|
15357
|
+
"title-key": _ctx.titleKey,
|
|
15358
|
+
onSelect: _ctx.onOptionSelect,
|
|
15359
|
+
onClose: _cache[4] || (_cache[4] = ($event) => _ctx.onToggleOpen(false)),
|
|
15360
|
+
onScrollAtTop: _ctx.onScrollAtTop,
|
|
15361
|
+
onScrollAtBottom: _ctx.onScrollAtBottom,
|
|
15362
|
+
onCreateSubmit: _ctx.onCreateSubmit
|
|
15363
|
+
}, {
|
|
15364
|
+
empty: withCtx(() => [
|
|
15365
|
+
renderSlot(_ctx.$slots, "notFound", {}, () => [
|
|
15366
|
+
createVNode(_component_RenderEmpty, {
|
|
15367
|
+
size: "small",
|
|
15368
|
+
text: _ctx.loading ? _ctx.loadingTextLocale : _ctx.notFoundText
|
|
15369
|
+
}, null, 8, ["text"])
|
|
15370
|
+
])
|
|
15371
|
+
]),
|
|
15372
|
+
_: 3
|
|
15373
|
+
}, 8, ["id", "prefix-cls", "open", "width", "multiple", "multiple-limit", "options", "values", "search-value", "default-active-first", "height", "item-height", "size", "select-all", "direction", "title-key", "onSelect", "onScrollAtTop", "onScrollAtBottom", "onCreateSubmit"])
|
|
15374
|
+
])
|
|
15361
15375
|
]),
|
|
15362
15376
|
default: withCtx(() => [
|
|
15363
15377
|
createElementVNode("div", mergeProps({
|
|
@@ -32101,11 +32115,15 @@ const _sfc_main$L = defineComponent({
|
|
|
32101
32115
|
columns: {
|
|
32102
32116
|
type: Array,
|
|
32103
32117
|
default: () => []
|
|
32118
|
+
},
|
|
32119
|
+
isHeadTable: {
|
|
32120
|
+
type: Boolean,
|
|
32121
|
+
default: false
|
|
32104
32122
|
}
|
|
32105
32123
|
},
|
|
32106
32124
|
setup(props) {
|
|
32107
32125
|
const {
|
|
32108
|
-
size: { resizeColumns }
|
|
32126
|
+
size: { resizeColumns, columnWidths }
|
|
32109
32127
|
} = inject("tableContext", {});
|
|
32110
32128
|
const cols = computed(() => {
|
|
32111
32129
|
let rst = [];
|
|
@@ -32126,8 +32144,15 @@ const _sfc_main$L = defineComponent({
|
|
|
32126
32144
|
);
|
|
32127
32145
|
return rst;
|
|
32128
32146
|
});
|
|
32147
|
+
const getWidth = (col) => {
|
|
32148
|
+
if (props.isHeadTable) {
|
|
32149
|
+
return `${columnWidths.value[col.key]}px`;
|
|
32150
|
+
}
|
|
32151
|
+
return col.resizeWidth ? col.resizeWidth : col.width;
|
|
32152
|
+
};
|
|
32129
32153
|
return {
|
|
32130
|
-
cols
|
|
32154
|
+
cols,
|
|
32155
|
+
getWidth
|
|
32131
32156
|
};
|
|
32132
32157
|
}
|
|
32133
32158
|
});
|
|
@@ -32136,7 +32161,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
32136
32161
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.cols, (col) => {
|
|
32137
32162
|
return openBlock(), createElementBlock("col", {
|
|
32138
32163
|
key: col.key,
|
|
32139
|
-
style: normalizeStyle({ width:
|
|
32164
|
+
style: normalizeStyle({ width: _ctx.getWidth(col), minWidth: col.minWidth, maxWidth: col.fixed ? col.width : "" })
|
|
32140
32165
|
}, null, 4);
|
|
32141
32166
|
}), 128))
|
|
32142
32167
|
]);
|
|
@@ -32361,6 +32386,7 @@ function getWidth(width, tableWidth) {
|
|
|
32361
32386
|
function useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, props) {
|
|
32362
32387
|
const tableWidth = ref(void 0);
|
|
32363
32388
|
const resizeColumns = shallowRef([]);
|
|
32389
|
+
const columnWidths = ref({});
|
|
32364
32390
|
const syncColumnsWidth = () => {
|
|
32365
32391
|
const { bodyTable } = tableRefs;
|
|
32366
32392
|
if (!bodyTable || bodyTable.getWidth() === void 0) {
|
|
@@ -32378,6 +32404,9 @@ function useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, pro
|
|
|
32378
32404
|
tableWidth.value = void 0;
|
|
32379
32405
|
}
|
|
32380
32406
|
};
|
|
32407
|
+
const syncColumnWidth = (width, column) => {
|
|
32408
|
+
columnWidths.value[getColumnKey(column)] = width;
|
|
32409
|
+
};
|
|
32381
32410
|
let syncHeightTimer = null;
|
|
32382
32411
|
const scrollPosition = ref("left");
|
|
32383
32412
|
const setScrollPositionClass = () => {
|
|
@@ -32416,6 +32445,7 @@ function useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, pro
|
|
|
32416
32445
|
_column.width = width;
|
|
32417
32446
|
}
|
|
32418
32447
|
resizeColumns.value = columns;
|
|
32448
|
+
syncColumnWidth(width, _column);
|
|
32419
32449
|
};
|
|
32420
32450
|
const isScrollX = computed(() => {
|
|
32421
32451
|
const { table } = tableRefs;
|
|
@@ -32449,7 +32479,9 @@ function useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, pro
|
|
|
32449
32479
|
setScrollPositionClass,
|
|
32450
32480
|
resetScrollX,
|
|
32451
32481
|
clearResizeTimer,
|
|
32452
|
-
setResizeWidth
|
|
32482
|
+
setResizeWidth,
|
|
32483
|
+
syncColumnWidth,
|
|
32484
|
+
columnWidths
|
|
32453
32485
|
};
|
|
32454
32486
|
}
|
|
32455
32487
|
|
|
@@ -32968,6 +33000,7 @@ const _sfc_main$G = defineComponent({
|
|
|
32968
33000
|
props: { indentSize },
|
|
32969
33001
|
expand: { handleExpandChange, isRowExpanded },
|
|
32970
33002
|
filterAndSorter: { hasAction, hasSorters, hasFilters, isSortColumn },
|
|
33003
|
+
size: { syncColumnWidth },
|
|
32971
33004
|
pagination
|
|
32972
33005
|
} = inject("tableContext", {});
|
|
32973
33006
|
const cellRef = ref();
|
|
@@ -33055,8 +33088,10 @@ const _sfc_main$G = defineComponent({
|
|
|
33055
33088
|
}
|
|
33056
33089
|
}
|
|
33057
33090
|
});
|
|
33091
|
+
if (props.index === 0) {
|
|
33092
|
+
syncColumnWidth(width, props.column);
|
|
33093
|
+
}
|
|
33058
33094
|
};
|
|
33059
|
-
const debouncedHandleResize = debounce$2((args) => checkWidth(args), 100);
|
|
33060
33095
|
return {
|
|
33061
33096
|
tablePrefixCls,
|
|
33062
33097
|
isRender,
|
|
@@ -33077,7 +33112,7 @@ const _sfc_main$G = defineComponent({
|
|
|
33077
33112
|
cellRef,
|
|
33078
33113
|
ellipsisSpanRef,
|
|
33079
33114
|
isOverflow,
|
|
33080
|
-
|
|
33115
|
+
checkWidth
|
|
33081
33116
|
};
|
|
33082
33117
|
}
|
|
33083
33118
|
});
|
|
@@ -33088,7 +33123,7 @@ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33088
33123
|
const _component_Render = resolveComponent("Render");
|
|
33089
33124
|
const _component_UTooltip = resolveComponent("UTooltip");
|
|
33090
33125
|
const _component_ResizeObserver = resolveComponent("ResizeObserver");
|
|
33091
|
-
return openBlock(), createBlock(_component_ResizeObserver, { onResize: _ctx.
|
|
33126
|
+
return openBlock(), createBlock(_component_ResizeObserver, { onResize: _ctx.checkWidth }, {
|
|
33092
33127
|
default: withCtx(() => {
|
|
33093
33128
|
var _a;
|
|
33094
33129
|
return [
|
|
@@ -33682,10 +33717,9 @@ const _sfc_main$B = defineComponent({
|
|
|
33682
33717
|
if (width.value) {
|
|
33683
33718
|
style.width = typeof width.value === "number" ? `${width.value}px` : width.value;
|
|
33684
33719
|
} else if (props.columns.some((x) => x.fixed)) {
|
|
33685
|
-
style.width = "max-content";
|
|
33686
33720
|
style.minWidth = "100%";
|
|
33687
33721
|
}
|
|
33688
|
-
if (props.columns.some((x) => x.ellipsis) || props.columns.some((x) => x.resizable)) {
|
|
33722
|
+
if (props.columns.some((x) => x.ellipsis) || props.columns.some((x) => x.resizable) || props.columns.some((x) => x.fixed)) {
|
|
33689
33723
|
style.tableLayout = "fixed";
|
|
33690
33724
|
} else {
|
|
33691
33725
|
style.tableLayout = "auto";
|
|
@@ -33740,7 +33774,10 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33740
33774
|
ref: "tableRef",
|
|
33741
33775
|
style: normalizeStyle(_ctx.tableStyle)
|
|
33742
33776
|
}, [
|
|
33743
|
-
createVNode(_component_ColGroup, {
|
|
33777
|
+
createVNode(_component_ColGroup, {
|
|
33778
|
+
columns: _ctx.columns,
|
|
33779
|
+
"is-head-table": !_ctx.showBody
|
|
33780
|
+
}, null, 8, ["columns", "is-head-table"]),
|
|
33744
33781
|
_ctx.showHeader ? (openBlock(), createBlock(_component_TableHeader, {
|
|
33745
33782
|
key: 0,
|
|
33746
33783
|
columns: _ctx.getColumns()
|
|
@@ -35342,7 +35379,9 @@ const _sfc_main$u = defineComponent({
|
|
|
35342
35379
|
tableWidth,
|
|
35343
35380
|
resizeColumns,
|
|
35344
35381
|
clearResizeTimer,
|
|
35345
|
-
setResizeWidth
|
|
35382
|
+
setResizeWidth,
|
|
35383
|
+
syncColumnWidth,
|
|
35384
|
+
columnWidths
|
|
35346
35385
|
} = useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, props);
|
|
35347
35386
|
const debouncedHandleResize = debounce$2(handleResize, 150);
|
|
35348
35387
|
onMounted(() => {
|
|
@@ -35460,7 +35499,9 @@ const _sfc_main$u = defineComponent({
|
|
|
35460
35499
|
isScrollX,
|
|
35461
35500
|
setResizeWidth,
|
|
35462
35501
|
handleColumnResize,
|
|
35463
|
-
debouncedHandleResize
|
|
35502
|
+
debouncedHandleResize,
|
|
35503
|
+
syncColumnWidth,
|
|
35504
|
+
columnWidths
|
|
35464
35505
|
},
|
|
35465
35506
|
fixed: {
|
|
35466
35507
|
isColumnFixed,
|
package/uxd-ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @koi-design/uxd-ui@4.0.
|
|
1
|
+
/*! @koi-design/uxd-ui@4.0.15 */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('lucide-vue-next')) :
|
|
@@ -15125,6 +15125,7 @@
|
|
|
15125
15125
|
emitChange(rowValue);
|
|
15126
15126
|
}
|
|
15127
15127
|
} else if (value !== stateValue.value && !Array.isArray(value)) {
|
|
15128
|
+
console.log("onSelect", value);
|
|
15128
15129
|
emitChange([value]);
|
|
15129
15130
|
}
|
|
15130
15131
|
const { autoClearSearchValue = true } = props;
|
|
@@ -15327,40 +15328,53 @@
|
|
|
15327
15328
|
"click-outside": _ctx.onClickOutside
|
|
15328
15329
|
}, {
|
|
15329
15330
|
popup: vue.withCtx(() => [
|
|
15330
|
-
vue.
|
|
15331
|
-
id: _ctx.ariaId,
|
|
15332
|
-
ref: "listRef",
|
|
15333
|
-
"prefix-cls": _ctx.prefixCls,
|
|
15331
|
+
vue.renderSlot(_ctx.$slots, "dropdown", vue.normalizeProps(vue.guardReactiveProps({
|
|
15334
15332
|
open: _ctx.stateOpen,
|
|
15335
|
-
|
|
15333
|
+
options: _ctx.displayOptions,
|
|
15336
15334
|
multiple: _ctx.multiple,
|
|
15337
|
-
|
|
15338
|
-
options: _ctx.loading ? [] : _ctx.displayOptions,
|
|
15335
|
+
multipleLimit: _ctx.multipleLimit,
|
|
15339
15336
|
values: _ctx.innerValue,
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
height: _ctx.dropdownHeight,
|
|
15343
|
-
"item-height": _ctx.dropdownItemHeight,
|
|
15344
|
-
size: _ctx.size,
|
|
15345
|
-
"select-all": _ctx.selectAll,
|
|
15346
|
-
direction: _ctx.computedDirection,
|
|
15347
|
-
"title-key": _ctx.titleKey,
|
|
15337
|
+
searchValue: _ctx.searchValue,
|
|
15338
|
+
loading: _ctx.loading,
|
|
15348
15339
|
onSelect: _ctx.onOptionSelect,
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
|
|
15353
|
-
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
]
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15340
|
+
onCreate: _ctx.onCreateSubmit,
|
|
15341
|
+
onClose: () => _ctx.onToggleOpen(false)
|
|
15342
|
+
})), () => [
|
|
15343
|
+
vue.createVNode(_component_DropdownMenu, {
|
|
15344
|
+
id: _ctx.ariaId,
|
|
15345
|
+
ref: "listRef",
|
|
15346
|
+
"prefix-cls": _ctx.prefixCls,
|
|
15347
|
+
open: _ctx.stateOpen,
|
|
15348
|
+
width: _ctx.dropdownMenuWidth,
|
|
15349
|
+
multiple: _ctx.multiple,
|
|
15350
|
+
"multiple-limit": _ctx.multipleLimit,
|
|
15351
|
+
options: _ctx.loading ? [] : _ctx.displayOptions,
|
|
15352
|
+
values: _ctx.innerValue,
|
|
15353
|
+
"search-value": _ctx.searchValue,
|
|
15354
|
+
"default-active-first": _ctx.defaultActiveFirst,
|
|
15355
|
+
height: _ctx.dropdownHeight,
|
|
15356
|
+
"item-height": _ctx.dropdownItemHeight,
|
|
15357
|
+
size: _ctx.size,
|
|
15358
|
+
"select-all": _ctx.selectAll,
|
|
15359
|
+
direction: _ctx.computedDirection,
|
|
15360
|
+
"title-key": _ctx.titleKey,
|
|
15361
|
+
onSelect: _ctx.onOptionSelect,
|
|
15362
|
+
onClose: _cache[4] || (_cache[4] = ($event) => _ctx.onToggleOpen(false)),
|
|
15363
|
+
onScrollAtTop: _ctx.onScrollAtTop,
|
|
15364
|
+
onScrollAtBottom: _ctx.onScrollAtBottom,
|
|
15365
|
+
onCreateSubmit: _ctx.onCreateSubmit
|
|
15366
|
+
}, {
|
|
15367
|
+
empty: vue.withCtx(() => [
|
|
15368
|
+
vue.renderSlot(_ctx.$slots, "notFound", {}, () => [
|
|
15369
|
+
vue.createVNode(_component_RenderEmpty, {
|
|
15370
|
+
size: "small",
|
|
15371
|
+
text: _ctx.loading ? _ctx.loadingTextLocale : _ctx.notFoundText
|
|
15372
|
+
}, null, 8, ["text"])
|
|
15373
|
+
])
|
|
15374
|
+
]),
|
|
15375
|
+
_: 3
|
|
15376
|
+
}, 8, ["id", "prefix-cls", "open", "width", "multiple", "multiple-limit", "options", "values", "search-value", "default-active-first", "height", "item-height", "size", "select-all", "direction", "title-key", "onSelect", "onScrollAtTop", "onScrollAtBottom", "onCreateSubmit"])
|
|
15377
|
+
])
|
|
15364
15378
|
]),
|
|
15365
15379
|
default: vue.withCtx(() => [
|
|
15366
15380
|
vue.createElementVNode("div", vue.mergeProps({
|
|
@@ -32104,11 +32118,15 @@
|
|
|
32104
32118
|
columns: {
|
|
32105
32119
|
type: Array,
|
|
32106
32120
|
default: () => []
|
|
32121
|
+
},
|
|
32122
|
+
isHeadTable: {
|
|
32123
|
+
type: Boolean,
|
|
32124
|
+
default: false
|
|
32107
32125
|
}
|
|
32108
32126
|
},
|
|
32109
32127
|
setup(props) {
|
|
32110
32128
|
const {
|
|
32111
|
-
size: { resizeColumns }
|
|
32129
|
+
size: { resizeColumns, columnWidths }
|
|
32112
32130
|
} = vue.inject("tableContext", {});
|
|
32113
32131
|
const cols = vue.computed(() => {
|
|
32114
32132
|
let rst = [];
|
|
@@ -32129,8 +32147,15 @@
|
|
|
32129
32147
|
);
|
|
32130
32148
|
return rst;
|
|
32131
32149
|
});
|
|
32150
|
+
const getWidth = (col) => {
|
|
32151
|
+
if (props.isHeadTable) {
|
|
32152
|
+
return `${columnWidths.value[col.key]}px`;
|
|
32153
|
+
}
|
|
32154
|
+
return col.resizeWidth ? col.resizeWidth : col.width;
|
|
32155
|
+
};
|
|
32132
32156
|
return {
|
|
32133
|
-
cols
|
|
32157
|
+
cols,
|
|
32158
|
+
getWidth
|
|
32134
32159
|
};
|
|
32135
32160
|
}
|
|
32136
32161
|
});
|
|
@@ -32139,7 +32164,7 @@
|
|
|
32139
32164
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.cols, (col) => {
|
|
32140
32165
|
return vue.openBlock(), vue.createElementBlock("col", {
|
|
32141
32166
|
key: col.key,
|
|
32142
|
-
style: vue.normalizeStyle({ width:
|
|
32167
|
+
style: vue.normalizeStyle({ width: _ctx.getWidth(col), minWidth: col.minWidth, maxWidth: col.fixed ? col.width : "" })
|
|
32143
32168
|
}, null, 4);
|
|
32144
32169
|
}), 128))
|
|
32145
32170
|
]);
|
|
@@ -32364,6 +32389,7 @@
|
|
|
32364
32389
|
function useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, props) {
|
|
32365
32390
|
const tableWidth = vue.ref(void 0);
|
|
32366
32391
|
const resizeColumns = vue.shallowRef([]);
|
|
32392
|
+
const columnWidths = vue.ref({});
|
|
32367
32393
|
const syncColumnsWidth = () => {
|
|
32368
32394
|
const { bodyTable } = tableRefs;
|
|
32369
32395
|
if (!bodyTable || bodyTable.getWidth() === void 0) {
|
|
@@ -32381,6 +32407,9 @@
|
|
|
32381
32407
|
tableWidth.value = void 0;
|
|
32382
32408
|
}
|
|
32383
32409
|
};
|
|
32410
|
+
const syncColumnWidth = (width, column) => {
|
|
32411
|
+
columnWidths.value[getColumnKey(column)] = width;
|
|
32412
|
+
};
|
|
32384
32413
|
let syncHeightTimer = null;
|
|
32385
32414
|
const scrollPosition = vue.ref("left");
|
|
32386
32415
|
const setScrollPositionClass = () => {
|
|
@@ -32419,6 +32448,7 @@
|
|
|
32419
32448
|
_column.width = width;
|
|
32420
32449
|
}
|
|
32421
32450
|
resizeColumns.value = columns;
|
|
32451
|
+
syncColumnWidth(width, _column);
|
|
32422
32452
|
};
|
|
32423
32453
|
const isScrollX = vue.computed(() => {
|
|
32424
32454
|
const { table } = tableRefs;
|
|
@@ -32452,7 +32482,9 @@
|
|
|
32452
32482
|
setScrollPositionClass,
|
|
32453
32483
|
resetScrollX,
|
|
32454
32484
|
clearResizeTimer,
|
|
32455
|
-
setResizeWidth
|
|
32485
|
+
setResizeWidth,
|
|
32486
|
+
syncColumnWidth,
|
|
32487
|
+
columnWidths
|
|
32456
32488
|
};
|
|
32457
32489
|
}
|
|
32458
32490
|
|
|
@@ -32971,6 +33003,7 @@
|
|
|
32971
33003
|
props: { indentSize },
|
|
32972
33004
|
expand: { handleExpandChange, isRowExpanded },
|
|
32973
33005
|
filterAndSorter: { hasAction, hasSorters, hasFilters, isSortColumn },
|
|
33006
|
+
size: { syncColumnWidth },
|
|
32974
33007
|
pagination
|
|
32975
33008
|
} = vue.inject("tableContext", {});
|
|
32976
33009
|
const cellRef = vue.ref();
|
|
@@ -33058,8 +33091,10 @@
|
|
|
33058
33091
|
}
|
|
33059
33092
|
}
|
|
33060
33093
|
});
|
|
33094
|
+
if (props.index === 0) {
|
|
33095
|
+
syncColumnWidth(width, props.column);
|
|
33096
|
+
}
|
|
33061
33097
|
};
|
|
33062
|
-
const debouncedHandleResize = debounce$2((args) => checkWidth(args), 100);
|
|
33063
33098
|
return {
|
|
33064
33099
|
tablePrefixCls,
|
|
33065
33100
|
isRender,
|
|
@@ -33080,7 +33115,7 @@
|
|
|
33080
33115
|
cellRef,
|
|
33081
33116
|
ellipsisSpanRef,
|
|
33082
33117
|
isOverflow,
|
|
33083
|
-
|
|
33118
|
+
checkWidth
|
|
33084
33119
|
};
|
|
33085
33120
|
}
|
|
33086
33121
|
});
|
|
@@ -33091,7 +33126,7 @@
|
|
|
33091
33126
|
const _component_Render = vue.resolveComponent("Render");
|
|
33092
33127
|
const _component_UTooltip = vue.resolveComponent("UTooltip");
|
|
33093
33128
|
const _component_ResizeObserver = vue.resolveComponent("ResizeObserver");
|
|
33094
|
-
return vue.openBlock(), vue.createBlock(_component_ResizeObserver, { onResize: _ctx.
|
|
33129
|
+
return vue.openBlock(), vue.createBlock(_component_ResizeObserver, { onResize: _ctx.checkWidth }, {
|
|
33095
33130
|
default: vue.withCtx(() => {
|
|
33096
33131
|
var _a;
|
|
33097
33132
|
return [
|
|
@@ -33685,10 +33720,9 @@
|
|
|
33685
33720
|
if (width.value) {
|
|
33686
33721
|
style.width = typeof width.value === "number" ? `${width.value}px` : width.value;
|
|
33687
33722
|
} else if (props.columns.some((x) => x.fixed)) {
|
|
33688
|
-
style.width = "max-content";
|
|
33689
33723
|
style.minWidth = "100%";
|
|
33690
33724
|
}
|
|
33691
|
-
if (props.columns.some((x) => x.ellipsis) || props.columns.some((x) => x.resizable)) {
|
|
33725
|
+
if (props.columns.some((x) => x.ellipsis) || props.columns.some((x) => x.resizable) || props.columns.some((x) => x.fixed)) {
|
|
33692
33726
|
style.tableLayout = "fixed";
|
|
33693
33727
|
} else {
|
|
33694
33728
|
style.tableLayout = "auto";
|
|
@@ -33743,7 +33777,10 @@
|
|
|
33743
33777
|
ref: "tableRef",
|
|
33744
33778
|
style: vue.normalizeStyle(_ctx.tableStyle)
|
|
33745
33779
|
}, [
|
|
33746
|
-
vue.createVNode(_component_ColGroup, {
|
|
33780
|
+
vue.createVNode(_component_ColGroup, {
|
|
33781
|
+
columns: _ctx.columns,
|
|
33782
|
+
"is-head-table": !_ctx.showBody
|
|
33783
|
+
}, null, 8, ["columns", "is-head-table"]),
|
|
33747
33784
|
_ctx.showHeader ? (vue.openBlock(), vue.createBlock(_component_TableHeader, {
|
|
33748
33785
|
key: 0,
|
|
33749
33786
|
columns: _ctx.getColumns()
|
|
@@ -35345,7 +35382,9 @@
|
|
|
35345
35382
|
tableWidth,
|
|
35346
35383
|
resizeColumns,
|
|
35347
35384
|
clearResizeTimer,
|
|
35348
|
-
setResizeWidth
|
|
35385
|
+
setResizeWidth,
|
|
35386
|
+
syncColumnWidth,
|
|
35387
|
+
columnWidths
|
|
35349
35388
|
} = useTableResize(updatedColumns, tableRefs, prefixCls, isColumnFixed, props);
|
|
35350
35389
|
const debouncedHandleResize = debounce$2(handleResize, 150);
|
|
35351
35390
|
vue.onMounted(() => {
|
|
@@ -35463,7 +35502,9 @@
|
|
|
35463
35502
|
isScrollX,
|
|
35464
35503
|
setResizeWidth,
|
|
35465
35504
|
handleColumnResize,
|
|
35466
|
-
debouncedHandleResize
|
|
35505
|
+
debouncedHandleResize,
|
|
35506
|
+
syncColumnWidth,
|
|
35507
|
+
columnWidths
|
|
35467
35508
|
},
|
|
35468
35509
|
fixed: {
|
|
35469
35510
|
isColumnFixed,
|