@bit-sun/business-component 3.1.3 → 3.1.4

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
@@ -2440,8 +2440,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2440
2440
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
2441
2441
  if (columnAbc.name) {
2442
2442
  var charCode = columnAbc.name.charCodeAt();
2443
- if (charCode - 65 <= items.length) {
2444
- columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : !notValid ? '校验结果' : '';
2443
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
2444
+ if (charCode - codeLen <= items.length) {
2445
+ columnAbc.name = itemsTemp[charCode - codeLen] ? itemsTemp[charCode - codeLen].content : '';
2446
+ if (charCode - 65 === itemsTemp.length) {
2447
+ columnAbc.name = '校验结果';
2448
+ }
2445
2449
  } else {
2446
2450
  columnAbc.name = '';
2447
2451
  }
@@ -3034,8 +3038,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3034
3038
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
3035
3039
  if (columnAbc.name) {
3036
3040
  var charCode = columnAbc.name.charCodeAt();
3037
- if (charCode - 65 <= items.length) {
3038
- columnAbc.name = itemsTemp$1[charCode - 65] ? itemsTemp$1[charCode - 65].content : !notValid ? '校验结果' : '';
3041
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
3042
+ if (charCode - codeLen <= items.length) {
3043
+ columnAbc.name = itemsTemp$1[charCode - codeLen] ? itemsTemp$1[charCode - codeLen].content : !notValid ? '校验结果' : '';
3039
3044
  } else {
3040
3045
  columnAbc.name = '';
3041
3046
  }
@@ -3442,6 +3447,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3442
3447
  fa: FORMAT_NAME_GENERAL$1,
3443
3448
  t: FORMAT_TYPE_STRING$1
3444
3449
  };
3450
+ debugger;
3445
3451
  if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
3446
3452
  var _props$customerColumn2;
3447
3453
  itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
@@ -3454,6 +3460,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3454
3460
  return createItem$1('item-0', index, mapping$1.get(item), item, format);
3455
3461
  })) || [];
3456
3462
  }
3463
+ console.log(itemsTemp$1, 'itemsTemp');
3457
3464
  luckysheet$1 = window.luckysheet || window.top.luckysheet;
3458
3465
  _this.state = {
3459
3466
  showErrorData: false,
package/dist/index.js CHANGED
@@ -2463,8 +2463,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
2463
2463
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
2464
2464
  if (columnAbc.name) {
2465
2465
  var charCode = columnAbc.name.charCodeAt();
2466
- if (charCode - 65 <= items.length) {
2467
- columnAbc.name = itemsTemp[charCode - 65] ? itemsTemp[charCode - 65].content : !notValid ? '校验结果' : '';
2466
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
2467
+ if (charCode - codeLen <= items.length) {
2468
+ columnAbc.name = itemsTemp[charCode - codeLen] ? itemsTemp[charCode - codeLen].content : '';
2469
+ if (charCode - 65 === itemsTemp.length) {
2470
+ columnAbc.name = '校验结果';
2471
+ }
2468
2472
  } else {
2469
2473
  columnAbc.name = '';
2470
2474
  }
@@ -3057,8 +3061,9 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3057
3061
  columnTitleCellRenderBefore: function columnTitleCellRenderBefore(columnAbc, postion, ctx) {
3058
3062
  if (columnAbc.name) {
3059
3063
  var charCode = columnAbc.name.charCodeAt();
3060
- if (charCode - 65 <= items.length) {
3061
- columnAbc.name = itemsTemp$1[charCode - 65] ? itemsTemp$1[charCode - 65].content : !notValid ? '校验结果' : '';
3064
+ var codeLen = 65 + 23 * (columnAbc.name.length - 1);
3065
+ if (charCode - codeLen <= items.length) {
3066
+ columnAbc.name = itemsTemp$1[charCode - codeLen] ? itemsTemp$1[charCode - codeLen].content : !notValid ? '校验结果' : '';
3062
3067
  } else {
3063
3068
  columnAbc.name = '';
3064
3069
  }
@@ -3465,6 +3470,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3465
3470
  fa: FORMAT_NAME_GENERAL$1,
3466
3471
  t: FORMAT_TYPE_STRING$1
3467
3472
  };
3473
+ debugger;
3468
3474
  if (props === null || props === void 0 ? void 0 : (_props$customerColumn = props.customerColumnsMapping) === null || _props$customerColumn === void 0 ? void 0 : _props$customerColumn.length) {
3469
3475
  var _props$customerColumn2;
3470
3476
  itemsTemp$1 = (props === null || props === void 0 ? void 0 : (_props$customerColumn2 = props.customerColumnsMapping) === null || _props$customerColumn2 === void 0 ? void 0 : _props$customerColumn2.map(function (item, index) {
@@ -3477,6 +3483,7 @@ var DataImport = /*#__PURE__*/function (_React$Component) {
3477
3483
  return createItem$1('item-0', index, mapping$1.get(item), item, format);
3478
3484
  })) || [];
3479
3485
  }
3486
+ console.log(itemsTemp$1, 'itemsTemp');
3480
3487
  luckysheet$1 = window.luckysheet || window.top.luckysheet;
3481
3488
  _this.state = {
3482
3489
  showErrorData: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: rodchen
4
4
  * @Date: 2021-12-01 10:52:08
5
- * @LastEditTime: 2021-12-29 17:11:56
6
- * @LastEditors: rodchen
5
+ * @LastEditTime: 2024-07-11 19:20:39
6
+ * @LastEditors: rodchen rodchen_king@outlook.com
7
7
  */
8
8
  // @ts-nocheck
9
9
  import React from 'react';
@@ -132,6 +132,7 @@ class DataImport extends React.Component {
132
132
  this.props.onRef(this);
133
133
 
134
134
  const format = { fa: FORMAT_NAME_GENERAL, t: FORMAT_TYPE_STRING };
135
+ debugger
135
136
  if (props?.customerColumnsMapping?.length) {
136
137
  itemsTemp = props?.customerColumnsMapping?.map((item, index) => {
137
138
  return createItem('item-0', index, item.title, item.name, format);
@@ -145,6 +146,7 @@ class DataImport extends React.Component {
145
146
  return createItem('item-0', index, mapping.get(item), item, format);
146
147
  })||[];
147
148
  }
149
+ console.log(itemsTemp, 'itemsTemp')
148
150
  luckysheet = window.luckysheet || window.top.luckysheet;
149
151
  this.state = {
150
152
  showErrorData: false,
@@ -194,9 +196,10 @@ class DataImport extends React.Component {
194
196
  columnTitleCellRenderBefore: function (columnAbc, postion, ctx) {
195
197
  if (columnAbc.name) {
196
198
  let charCode = columnAbc.name.charCodeAt();
197
- if (charCode - 65 <= items.length) {
198
- columnAbc.name = itemsTemp[charCode - 65]
199
- ? itemsTemp[charCode - 65].content
199
+ let codeLen = (65+23 * (columnAbc.name.length-1))
200
+ if (charCode - codeLen <= items.length) {
201
+ columnAbc.name = itemsTemp[charCode - codeLen]
202
+ ? itemsTemp[charCode - codeLen].content
200
203
  : (!notValid ? '校验结果' : '');
201
204
  } else {
202
205
  columnAbc.name = '';
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: rodchen
4
4
  * @Date: 2021-12-01 10:52:08
5
- * @LastEditTime: 2021-12-29 17:11:56
6
- * @LastEditors: rodchen
5
+ * @LastEditTime: 2024-07-11 19:28:43
6
+ * @LastEditors: rodchen rodchen_king@outlook.com
7
7
  */
8
8
  // @ts-nocheck
9
9
  import React from 'react';
@@ -194,10 +194,15 @@ class DataValidation extends React.Component {
194
194
  columnTitleCellRenderBefore: function (columnAbc, postion, ctx) {
195
195
  if (columnAbc.name) {
196
196
  let charCode = columnAbc.name.charCodeAt();
197
- if (charCode - 65 <= items.length) {
198
- columnAbc.name = itemsTemp[charCode - 65]
199
- ? itemsTemp[charCode - 65].content
200
- : (!notValid ? '校验结果' : '');
197
+ let codeLen = (65+23 * (columnAbc.name.length-1))
198
+ if (charCode - codeLen <= items.length) {
199
+ columnAbc.name = itemsTemp[charCode - codeLen]
200
+ ? itemsTemp[charCode - codeLen].content
201
+ : '';
202
+
203
+ if(charCode - 65 === itemsTemp.length) {
204
+ columnAbc.name = '校验结果'
205
+ }
201
206
  } else {
202
207
  columnAbc.name = '';
203
208
  }