想要<0 为true 等于0 为false 大于0为true, 想问一下这样写有什么问题呢 这样写 都是 true let iconSetRule = new GC.Spread.Sheets.ConditionalFormatting.IconSetRule(); // 实例化一个图标集对象 const iconCriteria = iconSetRule.iconCriteria();
iconSetRule.ranges([new GC.Spread.Sheets.Range(i, j, 1, 1)]);//设置图标集范围
const base = GC.Spread.Sheets.ConditionalFormatting.IconSetRule.getIcon;
GC.Spread.Sheets.ConditionalFormatting.IconSetRule.getIcon = function (
iconSetType,
iconIndex,
) {
if (iconIndex === 0) {
return yesBase64;
}
if (iconIndex === 1) {
return falseBase64;
}
if (iconIndex === 2) {
return yesBase64;
}
// }
return icon;
};
iconCriteria[0] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(
false,
GC.Spread.Sheets.ConditionalFormatting.IconValueType.number,
-0.1,
);
iconCriteria[1] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(
true,
GC.Spread.Sheets.ConditionalFormatting.IconValueType.number,
0,
);
iconCriteria[2] = new GC.Spread.Sheets.ConditionalFormatting.IconCriterion(
true,
GC.Spread.Sheets.ConditionalFormatting.IconValueType.number,
0.5,
);
iconSetRule.reverseIconOrder(false);
iconSetRule.showIconOnly(false);
sheet.conditionalFormats.addRule(iconSetRule)
|