wkjp-list-page 1.0.37 → 1.0.38
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/package.json
CHANGED
|
@@ -929,6 +929,7 @@ export default {
|
|
|
929
929
|
// slot 列可以设置 showOverflowTooltip
|
|
930
930
|
// 对于 slot 列,我们只检查用户是否显式设置了 showOverflowTooltip
|
|
931
931
|
// 因为 slot 列的内容是自定义的,无法自动判断是否需要省略号
|
|
932
|
+
// 注意:slot列无法自动判断内容是否为纯数字字母,所以这里保留用户设置
|
|
932
933
|
if (col.showOverflowTooltip === true) {
|
|
933
934
|
slotLayout.showOverflowTooltip = true;
|
|
934
935
|
}
|
|
@@ -984,10 +985,16 @@ export default {
|
|
|
984
985
|
if (Number.isFinite(userWidth) && userWidth > 0) {
|
|
985
986
|
// 获取最长内容的字符串来判断是否需要显示省略号
|
|
986
987
|
var maxContentText = this.getColumnMaxContentText(col);
|
|
987
|
-
var shouldShowTooltip = this.shouldShowOverflowTooltip(maxContentText)
|
|
988
|
+
var shouldShowTooltip = this.shouldShowOverflowTooltip(maxContentText);
|
|
989
|
+
// 纯数字字母内容不显示省略号,即使设置了 showOverflowTooltip: true
|
|
990
|
+
if (shouldShowTooltip) {
|
|
991
|
+
return {
|
|
992
|
+
width: userWidth,
|
|
993
|
+
showOverflowTooltip: true
|
|
994
|
+
};
|
|
995
|
+
}
|
|
988
996
|
return {
|
|
989
|
-
width: userWidth
|
|
990
|
-
showOverflowTooltip: shouldShowTooltip
|
|
997
|
+
width: userWidth
|
|
991
998
|
};
|
|
992
999
|
}
|
|
993
1000
|
}
|
|
@@ -999,7 +1006,8 @@ export default {
|
|
|
999
1006
|
// 判断是否需要显示 tooltip
|
|
1000
1007
|
// 获取最长内容的字符串来判断是否需要显示省略号
|
|
1001
1008
|
var maxContentText = this.getColumnMaxContentText(col);
|
|
1002
|
-
var shouldShowTooltip = this.shouldShowOverflowTooltip(maxContentText)
|
|
1009
|
+
var shouldShowTooltip = this.shouldShowOverflowTooltip(maxContentText);
|
|
1010
|
+
// 纯数字字母内容不显示省略号,即使设置了 showOverflowTooltip: true
|
|
1003
1011
|
if (shouldShowTooltip) {
|
|
1004
1012
|
layout.showOverflowTooltip = true;
|
|
1005
1013
|
}
|