3h1-ui 3.0.0-next.46 → 3.0.0-next.47
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/index.js +5 -4
- package/lib/index.js +5 -4
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -37679,18 +37679,19 @@ function handleColumnResize(propsRef, columns, wrapRef) {
|
|
|
37679
37679
|
);
|
|
37680
37680
|
const length2 = columns.length;
|
|
37681
37681
|
columns.forEach((item) => {
|
|
37682
|
-
const
|
|
37683
|
-
const
|
|
37682
|
+
const minWidth = ((item == null ? void 0 : item.title) + "").length * 14 + 16;
|
|
37683
|
+
const colWidth = item.width || minWidth;
|
|
37684
|
+
const countWidth = tableWidth && length2 - sumLength ? (tableWidth - sumWidth - selectWidth) / (length2 - sumLength) : colWidth;
|
|
37684
37685
|
if (item.flag)
|
|
37685
37686
|
return;
|
|
37686
37687
|
if (propsRef.value.resizable) {
|
|
37687
37688
|
item.width = colWidth > countWidth ? colWidth : countWidth;
|
|
37688
|
-
item.minWidth =
|
|
37689
|
+
item.minWidth = minWidth;
|
|
37689
37690
|
item.resizable = item.resizable === void 0 ? true : item.resizable;
|
|
37690
37691
|
} else {
|
|
37691
37692
|
if (item.resizable) {
|
|
37692
37693
|
item.width = colWidth > countWidth ? colWidth : countWidth;
|
|
37693
|
-
item.minWidth =
|
|
37694
|
+
item.minWidth = minWidth;
|
|
37694
37695
|
}
|
|
37695
37696
|
}
|
|
37696
37697
|
});
|
package/lib/index.js
CHANGED
|
@@ -37703,18 +37703,19 @@ function handleColumnResize(propsRef, columns, wrapRef) {
|
|
|
37703
37703
|
);
|
|
37704
37704
|
const length2 = columns.length;
|
|
37705
37705
|
columns.forEach((item) => {
|
|
37706
|
-
const
|
|
37707
|
-
const
|
|
37706
|
+
const minWidth = ((item == null ? void 0 : item.title) + "").length * 14 + 16;
|
|
37707
|
+
const colWidth = item.width || minWidth;
|
|
37708
|
+
const countWidth = tableWidth && length2 - sumLength ? (tableWidth - sumWidth - selectWidth) / (length2 - sumLength) : colWidth;
|
|
37708
37709
|
if (item.flag)
|
|
37709
37710
|
return;
|
|
37710
37711
|
if (propsRef.value.resizable) {
|
|
37711
37712
|
item.width = colWidth > countWidth ? colWidth : countWidth;
|
|
37712
|
-
item.minWidth =
|
|
37713
|
+
item.minWidth = minWidth;
|
|
37713
37714
|
item.resizable = item.resizable === void 0 ? true : item.resizable;
|
|
37714
37715
|
} else {
|
|
37715
37716
|
if (item.resizable) {
|
|
37716
37717
|
item.width = colWidth > countWidth ? colWidth : countWidth;
|
|
37717
|
-
item.minWidth =
|
|
37718
|
+
item.minWidth = minWidth;
|
|
37718
37719
|
}
|
|
37719
37720
|
}
|
|
37720
37721
|
});
|