szld-libs 0.2.34 → 0.2.35
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/szld-components.es.js +483 -480
- package/dist/szld-components.umd.js +16 -16
- package/es/components/SearchTable/index.js +6 -4
- package/es/index.js +1 -1
- package/lib/components/SearchTable/index.js +6 -4
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -31,8 +31,9 @@ function SearchTable(props) {
|
|
|
31
31
|
const getWidth = (v) => {
|
|
32
32
|
var _a, _b;
|
|
33
33
|
let width = v.width || minColumnWidth;
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
34
|
+
if (v.dataIndex && tableId) {
|
|
35
|
+
const key = Array.isArray(v.dataIndex) ? v.dataIndex.join("-") : String(v.dataIndex);
|
|
36
|
+
const _width = (_b = (_a = getLocalStorage(storageKey)) == null ? void 0 : _a[tableId]) == null ? void 0 : _b[key];
|
|
36
37
|
if (_width) {
|
|
37
38
|
width = _width;
|
|
38
39
|
}
|
|
@@ -78,8 +79,9 @@ function SearchTable(props) {
|
|
|
78
79
|
const obj = getLocalStorage(storageKey) || {};
|
|
79
80
|
obj[tableId] = obj[tableId] || {};
|
|
80
81
|
list == null ? void 0 : list.forEach((v) => {
|
|
81
|
-
if (
|
|
82
|
-
|
|
82
|
+
if (v.dataIndex) {
|
|
83
|
+
const key = Array.isArray(v.dataIndex) ? v.dataIndex.join("-") : String(v.dataIndex);
|
|
84
|
+
obj[tableId][key] = v.width;
|
|
83
85
|
}
|
|
84
86
|
});
|
|
85
87
|
localStorage.setItem(storageKey, JSON.stringify(obj));
|
package/es/index.js
CHANGED
|
@@ -32,8 +32,9 @@ function SearchTable(props) {
|
|
|
32
32
|
const getWidth = (v) => {
|
|
33
33
|
var _a, _b;
|
|
34
34
|
let width = v.width || minColumnWidth;
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
35
|
+
if (v.dataIndex && tableId) {
|
|
36
|
+
const key = Array.isArray(v.dataIndex) ? v.dataIndex.join("-") : String(v.dataIndex);
|
|
37
|
+
const _width = (_b = (_a = utils.getLocalStorage(storageKey)) == null ? void 0 : _a[tableId]) == null ? void 0 : _b[key];
|
|
37
38
|
if (_width) {
|
|
38
39
|
width = _width;
|
|
39
40
|
}
|
|
@@ -79,8 +80,9 @@ function SearchTable(props) {
|
|
|
79
80
|
const obj = utils.getLocalStorage(storageKey) || {};
|
|
80
81
|
obj[tableId] = obj[tableId] || {};
|
|
81
82
|
list == null ? void 0 : list.forEach((v) => {
|
|
82
|
-
if (
|
|
83
|
-
|
|
83
|
+
if (v.dataIndex) {
|
|
84
|
+
const key = Array.isArray(v.dataIndex) ? v.dataIndex.join("-") : String(v.dataIndex);
|
|
85
|
+
obj[tableId][key] = v.width;
|
|
84
86
|
}
|
|
85
87
|
});
|
|
86
88
|
localStorage.setItem(storageKey, JSON.stringify(obj));
|
package/lib/index.js
CHANGED