@bit-sun/business-component 1.0.12 → 1.0.16
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 +20 -8
- package/dist/index.js +20 -8
- package/package.json +3 -2
- package/src/components/DataValidation/index.tsx +13 -2
package/dist/index.esm.js
CHANGED
|
@@ -76,14 +76,14 @@ function _inherits(subClass, superClass) {
|
|
|
76
76
|
throw new TypeError("Super expression must either be null or a function");
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
80
|
+
constructor: {
|
|
81
|
+
value: subClass,
|
|
82
|
+
writable: true,
|
|
83
|
+
configurable: true
|
|
84
|
+
}
|
|
85
|
+
});
|
|
79
86
|
Object.defineProperty(subClass, "prototype", {
|
|
80
|
-
value: Object.create(superClass && superClass.prototype, {
|
|
81
|
-
constructor: {
|
|
82
|
-
value: subClass,
|
|
83
|
-
writable: true,
|
|
84
|
-
configurable: true
|
|
85
|
-
}
|
|
86
|
-
}),
|
|
87
87
|
writable: false
|
|
88
88
|
});
|
|
89
89
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
@@ -1717,6 +1717,13 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1717
1717
|
defaultColWidth: 120,
|
|
1718
1718
|
config: {},
|
|
1719
1719
|
celldata: data,
|
|
1720
|
+
// celldata:
|
|
1721
|
+
// data && data.length !== 0 ? data : _.flattenDeep(Array.from({ length: 100 }).map((a, b) => Array.from({ length: 100 }).map((c, d) => ({
|
|
1722
|
+
// "r": b,
|
|
1723
|
+
// "c": d,
|
|
1724
|
+
// "v": { "ct": { "fa": "@", "t": "s" }, }
|
|
1725
|
+
// }))))
|
|
1726
|
+
// ,
|
|
1720
1727
|
scrollLeft: 0,
|
|
1721
1728
|
// "scrollTop": 315, //上下滚动条位置
|
|
1722
1729
|
luckysheet_select_save: [],
|
|
@@ -2051,7 +2058,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2051
2058
|
return {
|
|
2052
2059
|
id: "item-0".concat(index),
|
|
2053
2060
|
content: mapping.get(item),
|
|
2054
|
-
code: item
|
|
2061
|
+
code: item,
|
|
2062
|
+
"ct": {
|
|
2063
|
+
"fa": "General",
|
|
2064
|
+
"t": "s" //格式类型为数字类型
|
|
2065
|
+
|
|
2066
|
+
}
|
|
2055
2067
|
};
|
|
2056
2068
|
});
|
|
2057
2069
|
_this.state = {
|
package/dist/index.js
CHANGED
|
@@ -86,14 +86,14 @@ function _inherits(subClass, superClass) {
|
|
|
86
86
|
throw new TypeError("Super expression must either be null or a function");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
90
|
+
constructor: {
|
|
91
|
+
value: subClass,
|
|
92
|
+
writable: true,
|
|
93
|
+
configurable: true
|
|
94
|
+
}
|
|
95
|
+
});
|
|
89
96
|
Object.defineProperty(subClass, "prototype", {
|
|
90
|
-
value: Object.create(superClass && superClass.prototype, {
|
|
91
|
-
constructor: {
|
|
92
|
-
value: subClass,
|
|
93
|
-
writable: true,
|
|
94
|
-
configurable: true
|
|
95
|
-
}
|
|
96
|
-
}),
|
|
97
97
|
writable: false
|
|
98
98
|
});
|
|
99
99
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
@@ -1727,6 +1727,13 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
1727
1727
|
defaultColWidth: 120,
|
|
1728
1728
|
config: {},
|
|
1729
1729
|
celldata: data,
|
|
1730
|
+
// celldata:
|
|
1731
|
+
// data && data.length !== 0 ? data : _.flattenDeep(Array.from({ length: 100 }).map((a, b) => Array.from({ length: 100 }).map((c, d) => ({
|
|
1732
|
+
// "r": b,
|
|
1733
|
+
// "c": d,
|
|
1734
|
+
// "v": { "ct": { "fa": "@", "t": "s" }, }
|
|
1735
|
+
// }))))
|
|
1736
|
+
// ,
|
|
1730
1737
|
scrollLeft: 0,
|
|
1731
1738
|
// "scrollTop": 315, //上下滚动条位置
|
|
1732
1739
|
luckysheet_select_save: [],
|
|
@@ -2061,7 +2068,12 @@ var DataValidation = /*#__PURE__*/function (_React$Component) {
|
|
|
2061
2068
|
return {
|
|
2062
2069
|
id: "item-0".concat(index),
|
|
2063
2070
|
content: mapping.get(item),
|
|
2064
|
-
code: item
|
|
2071
|
+
code: item,
|
|
2072
|
+
"ct": {
|
|
2073
|
+
"fa": "General",
|
|
2074
|
+
"t": "s" //格式类型为数字类型
|
|
2075
|
+
|
|
2076
|
+
}
|
|
2065
2077
|
};
|
|
2066
2078
|
});
|
|
2067
2079
|
_this.state = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bit-sun/business-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"antd": "4.17.2",
|
|
32
32
|
"axios": "^0.24.0",
|
|
33
33
|
"classnames": "^2.3.1",
|
|
34
|
+
"loadsh": "^0.0.4",
|
|
34
35
|
"react": "^16.12.0",
|
|
35
36
|
"react-beautiful-dnd": "10.0.0"
|
|
36
37
|
},
|
|
@@ -45,4 +46,4 @@
|
|
|
45
46
|
"publishConfig": {
|
|
46
47
|
"access": "public"
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
|
+
}
|
|
@@ -106,6 +106,10 @@ class DataValidation extends React.Component {
|
|
|
106
106
|
id: `item-0${index}`,
|
|
107
107
|
content: mapping.get(item),
|
|
108
108
|
code: item,
|
|
109
|
+
"ct": { //单元格值格式
|
|
110
|
+
"fa": "General", //格式名称为自动格式
|
|
111
|
+
"t": "s" //格式类型为数字类型
|
|
112
|
+
}
|
|
109
113
|
};
|
|
110
114
|
});
|
|
111
115
|
|
|
@@ -206,6 +210,13 @@ class DataValidation extends React.Component {
|
|
|
206
210
|
defaultColWidth: 120, //自定义列宽
|
|
207
211
|
config: {},
|
|
208
212
|
celldata: data,
|
|
213
|
+
// celldata:
|
|
214
|
+
// data && data.length !== 0 ? data : _.flattenDeep(Array.from({ length: 100 }).map((a, b) => Array.from({ length: 100 }).map((c, d) => ({
|
|
215
|
+
// "r": b,
|
|
216
|
+
// "c": d,
|
|
217
|
+
// "v": { "ct": { "fa": "@", "t": "s" }, }
|
|
218
|
+
// }))))
|
|
219
|
+
// ,
|
|
209
220
|
scrollLeft: 0, //左右滚动条位置
|
|
210
221
|
// "scrollTop": 315, //上下滚动条位置
|
|
211
222
|
luckysheet_select_save: [], //选中的区域
|
|
@@ -362,7 +373,7 @@ class DataValidation extends React.Component {
|
|
|
362
373
|
|
|
363
374
|
resetData = () => {
|
|
364
375
|
const { validDataUrl, updateData, columns } = this.props;
|
|
365
|
-
const resultData = this.getData()
|
|
376
|
+
const resultData = this.getData()
|
|
366
377
|
|
|
367
378
|
axios
|
|
368
379
|
.post(validDataUrl, {
|
|
@@ -418,7 +429,7 @@ class DataValidation extends React.Component {
|
|
|
418
429
|
console.log(setExportData);
|
|
419
430
|
setExportData([123123]);
|
|
420
431
|
})
|
|
421
|
-
.catch((err) => {});
|
|
432
|
+
.catch((err) => { });
|
|
422
433
|
};
|
|
423
434
|
|
|
424
435
|
filterData = (type: string) => {
|