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.esm.js CHANGED
@@ -1067,13 +1067,14 @@ const BusinessUtils = {
1067
1067
  },
1068
1068
  /**
1069
1069
  * 显示超差提醒批注信息
1070
+ * @param spread 工作簿实例
1070
1071
  * @param cctxConfigs 超差提醒配置集合
1071
1072
  * @param cellRowIndex 发生改变值的单元格行索引
1072
1073
  * @param cellColIndex 发生改变值的单元格列索引
1073
1074
  * @param isValueChgedUse 是否为单元格值发生改变的时候调用
1074
1075
  * @param commentOptions 批注配置项,默认为:{color: '#E11010', size: 10, defaultTextIsSet: true, defaultText: '无效'}(color:批注颜色,size:批注大小,defaultTextIsSet:是否设置单元格默认值,defaultText:单元格默认值内容)
1075
1076
  */
1076
- cctxComments: (spread, cctxConfigs, cellRowIndex, cellColIndex, isValueChgedUse = true, commentOptions = {
1077
+ overRemindComments: (spread, cctxConfigs, cellRowIndex, cellColIndex, isValueChgedUse = true, commentOptions = {
1077
1078
  color: '#E11010',
1078
1079
  size: 10,
1079
1080
  defaultTextIsSet: true,
@@ -14616,6 +14617,50 @@ const FormulaUtils = {
14616
14617
  allCellVals = [funDefaultVal];
14617
14618
  }
14618
14619
  }
14620
+ /**
14621
+ * 综合判断是否为纯JSON对象
14622
+ * @param {any} obj - 要判断的变量
14623
+ * @returns {boolean}
14624
+ */
14625
+ function isPlainObject(obj) {
14626
+ // 基本类型检查
14627
+ if (obj === null || typeof obj !== 'object') {
14628
+ return false;
14629
+ }
14630
+ // 原型检查
14631
+ const proto = Object.getPrototypeOf(obj);
14632
+ if (proto !== null && proto !== Object.prototype) {
14633
+ return false;
14634
+ }
14635
+ // 构造函数检查
14636
+ if (obj.constructor !== Object) {
14637
+ return false;
14638
+ }
14639
+ return true;
14640
+ }
14641
+ // 处理技术要求对象的值
14642
+ if (allCellVals != null && allCellVals != undefined && allCellVals.length > 0) {
14643
+ allCellVals.forEach((item) => {
14644
+ if (item != null && item != undefined && isPlainObject(item) && item.hasOwnProperty('con') && item.hasOwnProperty('val')) {
14645
+ item = item['val'];
14646
+ }
14647
+ });
14648
+ }
14649
+ if (allCellValsEw != null && allCellValsEw != undefined && allCellValsEw.length > 0) {
14650
+ allCellValsEw.forEach((item) => {
14651
+ if (item != null && item != undefined && item.length > 0) {
14652
+ item.forEach((element) => {
14653
+ if (element != null &&
14654
+ element != undefined &&
14655
+ isPlainObject(element) &&
14656
+ element.hasOwnProperty('con') &&
14657
+ element.hasOwnProperty('val')) {
14658
+ element = element['val'];
14659
+ }
14660
+ });
14661
+ }
14662
+ });
14663
+ }
14619
14664
  //返回的回调函数参数数据
14620
14665
  let retData = {
14621
14666
  arguments: arguments,