rapid-spreadjs 1.0.115 → 1.0.117

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.cjs.js CHANGED
@@ -1089,13 +1089,14 @@ const BusinessUtils = {
1089
1089
  },
1090
1090
  /**
1091
1091
  * 显示超差提醒批注信息
1092
+ * @param spread 工作簿实例
1092
1093
  * @param cctxConfigs 超差提醒配置集合
1093
1094
  * @param cellRowIndex 发生改变值的单元格行索引
1094
1095
  * @param cellColIndex 发生改变值的单元格列索引
1095
1096
  * @param isValueChgedUse 是否为单元格值发生改变的时候调用
1096
1097
  * @param commentOptions 批注配置项,默认为:{color: '#E11010', size: 10, defaultTextIsSet: true, defaultText: '无效'}(color:批注颜色,size:批注大小,defaultTextIsSet:是否设置单元格默认值,defaultText:单元格默认值内容)
1097
1098
  */
1098
- cctxComments: (spread, cctxConfigs, cellRowIndex, cellColIndex, isValueChgedUse = true, commentOptions = {
1099
+ overRemindComments: (spread, cctxConfigs, cellRowIndex, cellColIndex, isValueChgedUse = true, commentOptions = {
1099
1100
  color: '#E11010',
1100
1101
  size: 10,
1101
1102
  defaultTextIsSet: true,
@@ -14638,6 +14639,50 @@ const FormulaUtils = {
14638
14639
  allCellVals = [funDefaultVal];
14639
14640
  }
14640
14641
  }
14642
+ /**
14643
+ * 综合判断是否为纯JSON对象
14644
+ * @param {any} obj - 要判断的变量
14645
+ * @returns {boolean}
14646
+ */
14647
+ function isPlainObject(obj) {
14648
+ // 基本类型检查
14649
+ if (obj === null || typeof obj !== 'object') {
14650
+ return false;
14651
+ }
14652
+ // 原型检查
14653
+ const proto = Object.getPrototypeOf(obj);
14654
+ if (proto !== null && proto !== Object.prototype) {
14655
+ return false;
14656
+ }
14657
+ // 构造函数检查
14658
+ if (obj.constructor !== Object) {
14659
+ return false;
14660
+ }
14661
+ return true;
14662
+ }
14663
+ // 处理技术要求对象的值
14664
+ if (allCellVals != null && allCellVals != undefined && allCellVals.length > 0) {
14665
+ allCellVals.forEach((item) => {
14666
+ if (item != null && item != undefined && isPlainObject(item) && item.hasOwnProperty('con') && item.hasOwnProperty('val')) {
14667
+ item = item['val'];
14668
+ }
14669
+ });
14670
+ }
14671
+ if (allCellValsEw != null && allCellValsEw != undefined && allCellValsEw.length > 0) {
14672
+ allCellValsEw.forEach((item) => {
14673
+ if (item != null && item != undefined && item.length > 0) {
14674
+ item.forEach((element) => {
14675
+ if (element != null &&
14676
+ element != undefined &&
14677
+ isPlainObject(element) &&
14678
+ element.hasOwnProperty('con') &&
14679
+ element.hasOwnProperty('val')) {
14680
+ element = element['val'];
14681
+ }
14682
+ });
14683
+ }
14684
+ });
14685
+ }
14641
14686
  //返回的回调函数参数数据
14642
14687
  let retData = {
14643
14688
  arguments: arguments,