@@ -1226,7 +1226,7 @@ $(document).ready(function() {
this.spreadSetting = {
cols: [{
title: '标段列表', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 280,
- formatter: '@', cellType: 'tree',
+ formatter: '@', cellType: 'tree', showTips: true,
getValue: function(data) {
return data.name;
},
@@ -2101,7 +2101,15 @@ const SpreadJsObj = {
if (!node) return false;
const move = (node[tree.setting.level]) * indent + (node[tree.setting.level]) * levelIndent + xOffset;
- const validWidth = hitinfo.cellRect.width - move;
+ let iconWidth = 0;
+ if (col.getIcon) {
+ const iconType = col.getIcon(node);
+ if (iconType) {
+ const customSize = typeof iconType === 'object' ? Number(iconType.size) : 0;
+ iconWidth = (customSize > 0 ? customSize : 14) + 4;
+ }
+ const validWidth = hitinfo.cellRect.width - move - iconWidth;
return this.getTextDisplayWidth(hitinfo, text) > validWidth;
};
/**