@kne/table-page 0.1.26 → 0.1.30
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/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1976,7 +1976,7 @@ const resolveButtonGroupProps = (buttonGroup, getPopupContainer, {
|
|
|
1976
1976
|
getPopupContainer: userGetPopupContainer,
|
|
1977
1977
|
...rest
|
|
1978
1978
|
} = buttonGroup;
|
|
1979
|
-
const resolvedShowLength = Number.isInteger(showLength) ? Math.max(minShowLength, showLength) : defaultShowLength;
|
|
1979
|
+
const resolvedShowLength = Number.isInteger(showLength) ? Math.max(minShowLength, showLength) : Number.isInteger(defaultShowLength) ? defaultShowLength : undefined;
|
|
1980
1980
|
return {
|
|
1981
1981
|
...rest,
|
|
1982
1982
|
list: normalizeButtonGroupList(list, defaultSize),
|
|
@@ -1986,14 +1986,17 @@ const resolveButtonGroupProps = (buttonGroup, getPopupContainer, {
|
|
|
1986
1986
|
size
|
|
1987
1987
|
} : {}),
|
|
1988
1988
|
moreType: moreType ?? 'link',
|
|
1989
|
-
|
|
1989
|
+
...(resolvedShowLength !== undefined ? {
|
|
1990
|
+
showLength: resolvedShowLength
|
|
1991
|
+
} : {}),
|
|
1990
1992
|
getPopupContainer: userGetPopupContainer ?? getPopupContainer
|
|
1991
1993
|
};
|
|
1992
1994
|
};
|
|
1993
1995
|
const resolveToolbarButtonGroupProps = (buttonGroup, getPopupContainer) => {
|
|
1994
1996
|
return resolveButtonGroupProps(buttonGroup, getPopupContainer, {
|
|
1995
1997
|
defaultSize: 'small',
|
|
1996
|
-
|
|
1998
|
+
// 未显式传 showLength 时走 ButtonGroup 自适应测宽(@kne/overflow-items)
|
|
1999
|
+
defaultShowLength: undefined,
|
|
1997
2000
|
minShowLength: 1
|
|
1998
2001
|
});
|
|
1999
2002
|
};
|