@94ai/nf-table 100.1.19 → 100.1.21
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/lib/nf-table.cjs.js +15 -10
- package/lib/nf-table.esm-bundler.js +15 -10
- package/package/nf-table.vue +15 -10
- package/package.json +6 -6
package/lib/nf-table.cjs.js
CHANGED
|
@@ -6226,8 +6226,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6226
6226
|
}, {
|
|
6227
6227
|
immediate: true
|
|
6228
6228
|
});
|
|
6229
|
-
const initLocalShow = () => {
|
|
6230
|
-
|
|
6229
|
+
const initLocalShow = (init = false) => {
|
|
6230
|
+
if (!init) {
|
|
6231
|
+
props.columns._skip = true;
|
|
6232
|
+
}
|
|
6231
6233
|
const result = props.columns.filter((item) => {
|
|
6232
6234
|
var _a2, _b;
|
|
6233
6235
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
@@ -6239,9 +6241,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6239
6241
|
var _a2;
|
|
6240
6242
|
return item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6241
6243
|
});
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6244
|
+
if (!init) {
|
|
6245
|
+
vueDemi.nextTick(() => {
|
|
6246
|
+
props.columns._skip = false;
|
|
6247
|
+
});
|
|
6248
|
+
}
|
|
6245
6249
|
if (result.length) {
|
|
6246
6250
|
return result;
|
|
6247
6251
|
}
|
|
@@ -6250,7 +6254,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6250
6254
|
return item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6251
6255
|
});
|
|
6252
6256
|
};
|
|
6253
|
-
const localShowColumn = vueDemi.ref(initLocalShow());
|
|
6257
|
+
const localShowColumn = vueDemi.ref(initLocalShow(true));
|
|
6254
6258
|
vueDemi.watch(() => {
|
|
6255
6259
|
var _a2;
|
|
6256
6260
|
return (_a2 = localShowColumn.value) == null ? void 0 : _a2.length;
|
|
@@ -6395,9 +6399,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6395
6399
|
console.log(e);
|
|
6396
6400
|
}
|
|
6397
6401
|
}
|
|
6398
|
-
await vueDemi.nextTick();
|
|
6399
|
-
props.columns._skip = true;
|
|
6400
6402
|
tableColumns.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
6403
|
+
vueDemi.nextTick(() => {
|
|
6404
|
+
props.columns._skip = false;
|
|
6405
|
+
});
|
|
6401
6406
|
elTableRefKey.value = Date.now();
|
|
6402
6407
|
};
|
|
6403
6408
|
syncCookiesToTableColumn();
|
|
@@ -6409,7 +6414,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6409
6414
|
return;
|
|
6410
6415
|
}
|
|
6411
6416
|
localShowColumn.value = initLocalShow();
|
|
6412
|
-
await syncCookiesToTableColumn(
|
|
6417
|
+
await syncCookiesToTableColumn();
|
|
6413
6418
|
}, {
|
|
6414
6419
|
deep: true
|
|
6415
6420
|
});
|
|
@@ -6550,7 +6555,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6550
6555
|
};
|
|
6551
6556
|
const columnCheckConfirm = async (cb, error) => {
|
|
6552
6557
|
try {
|
|
6553
|
-
const value =
|
|
6558
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies();
|
|
6554
6559
|
columnCheckConfirmFeedback(value);
|
|
6555
6560
|
await syncCookiesToLocalShowColumn();
|
|
6556
6561
|
await syncCookiesToTableColumn();
|
|
@@ -6224,8 +6224,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6224
6224
|
}, {
|
|
6225
6225
|
immediate: true
|
|
6226
6226
|
});
|
|
6227
|
-
const initLocalShow = () => {
|
|
6228
|
-
|
|
6227
|
+
const initLocalShow = (init = false) => {
|
|
6228
|
+
if (!init) {
|
|
6229
|
+
props.columns._skip = true;
|
|
6230
|
+
}
|
|
6229
6231
|
const result = props.columns.filter((item) => {
|
|
6230
6232
|
var _a2, _b;
|
|
6231
6233
|
const prop = item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
@@ -6237,9 +6239,11 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6237
6239
|
var _a2;
|
|
6238
6240
|
return item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6239
6241
|
});
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6242
|
+
if (!init) {
|
|
6243
|
+
nextTick(() => {
|
|
6244
|
+
props.columns._skip = false;
|
|
6245
|
+
});
|
|
6246
|
+
}
|
|
6243
6247
|
if (result.length) {
|
|
6244
6248
|
return result;
|
|
6245
6249
|
}
|
|
@@ -6248,7 +6252,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6248
6252
|
return item.prop || ((_a2 = item.attr) == null ? void 0 : _a2.prop);
|
|
6249
6253
|
});
|
|
6250
6254
|
};
|
|
6251
|
-
const localShowColumn = ref(initLocalShow());
|
|
6255
|
+
const localShowColumn = ref(initLocalShow(true));
|
|
6252
6256
|
watch(() => {
|
|
6253
6257
|
var _a2;
|
|
6254
6258
|
return (_a2 = localShowColumn.value) == null ? void 0 : _a2.length;
|
|
@@ -6393,9 +6397,10 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6393
6397
|
console.log(e);
|
|
6394
6398
|
}
|
|
6395
6399
|
}
|
|
6396
|
-
await nextTick();
|
|
6397
|
-
props.columns._skip = true;
|
|
6398
6400
|
tableColumns.value = columns.sort((a, b) => a._index - b._index < 0 ? -1 : a._index - b._index > 0 ? 1 : 0);
|
|
6401
|
+
nextTick(() => {
|
|
6402
|
+
props.columns._skip = false;
|
|
6403
|
+
});
|
|
6399
6404
|
elTableRefKey.value = Date.now();
|
|
6400
6405
|
};
|
|
6401
6406
|
syncCookiesToTableColumn();
|
|
@@ -6407,7 +6412,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6407
6412
|
return;
|
|
6408
6413
|
}
|
|
6409
6414
|
localShowColumn.value = initLocalShow();
|
|
6410
|
-
await syncCookiesToTableColumn(
|
|
6415
|
+
await syncCookiesToTableColumn();
|
|
6411
6416
|
}, {
|
|
6412
6417
|
deep: true
|
|
6413
6418
|
});
|
|
@@ -6548,7 +6553,7 @@ __sfc_main.setup = (__props, __ctx) => {
|
|
|
6548
6553
|
};
|
|
6549
6554
|
const columnCheckConfirm = async (cb, error) => {
|
|
6550
6555
|
try {
|
|
6551
|
-
const value =
|
|
6556
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies();
|
|
6552
6557
|
columnCheckConfirmFeedback(value);
|
|
6553
6558
|
await syncCookiesToLocalShowColumn();
|
|
6554
6559
|
await syncCookiesToTableColumn();
|
package/package/nf-table.vue
CHANGED
|
@@ -807,8 +807,10 @@ watch(() => {
|
|
|
807
807
|
immediate: true
|
|
808
808
|
})
|
|
809
809
|
// 同步用户参数
|
|
810
|
-
const initLocalShow = () => {
|
|
811
|
-
|
|
810
|
+
const initLocalShow = (init = false) => {
|
|
811
|
+
if (!init) {
|
|
812
|
+
props.columns._skip = true
|
|
813
|
+
}
|
|
812
814
|
const result = props.columns.filter(item => {
|
|
813
815
|
const prop = item.prop || item.attr?.prop
|
|
814
816
|
if (props.showColumn?.includes(prop!)) {
|
|
@@ -816,15 +818,17 @@ const initLocalShow = () => {
|
|
|
816
818
|
}
|
|
817
819
|
return !item.initHidden
|
|
818
820
|
}).map(item => item.prop! || item.attr?.prop!)
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
821
|
+
if (!init) {
|
|
822
|
+
nextTick(() => {
|
|
823
|
+
props.columns._skip = false
|
|
824
|
+
})
|
|
825
|
+
}
|
|
822
826
|
if (result.length) {
|
|
823
827
|
return result
|
|
824
828
|
}
|
|
825
829
|
return props.columns.map(item => item.prop! || item.attr?.prop!)
|
|
826
830
|
}
|
|
827
|
-
const localShowColumn = ref<string[]>(initLocalShow())
|
|
831
|
+
const localShowColumn = ref<string[]>(initLocalShow(true))
|
|
828
832
|
watch(() => localShowColumn.value?.length, () => {
|
|
829
833
|
emit('update:showColumn', localShowColumn.value)
|
|
830
834
|
}, {
|
|
@@ -973,9 +977,10 @@ const syncCookiesToTableColumn = async (readCached = true) => {
|
|
|
973
977
|
console.log(e)
|
|
974
978
|
}
|
|
975
979
|
}
|
|
976
|
-
await nextTick()
|
|
977
|
-
props.columns._skip = true
|
|
978
980
|
tableColumns.value = columns.sort((a, b) => a._index! - b._index! < 0 ? -1 : a._index! - b._index! > 0 ? 1 : 0)
|
|
981
|
+
nextTick(() => {
|
|
982
|
+
props.columns._skip = false
|
|
983
|
+
})
|
|
979
984
|
elTableRefKey.value = Date.now()
|
|
980
985
|
}
|
|
981
986
|
|
|
@@ -989,7 +994,7 @@ onBeforeMount(() => {
|
|
|
989
994
|
return
|
|
990
995
|
}
|
|
991
996
|
localShowColumn.value = initLocalShow()
|
|
992
|
-
await syncCookiesToTableColumn(
|
|
997
|
+
await syncCookiesToTableColumn()
|
|
993
998
|
}, {
|
|
994
999
|
deep: true
|
|
995
1000
|
})
|
|
@@ -1137,7 +1142,7 @@ const fieldsConfirm = async (value) => {
|
|
|
1137
1142
|
*/
|
|
1138
1143
|
const columnCheckConfirm = async (cb, error) => {
|
|
1139
1144
|
try {
|
|
1140
|
-
const value =
|
|
1145
|
+
const value = columnCheckDrawer.value.syncTableColumnsToCookies()
|
|
1141
1146
|
columnCheckConfirmFeedback(value)
|
|
1142
1147
|
await syncCookiesToLocalShowColumn()
|
|
1143
1148
|
await syncCookiesToTableColumn()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-table",
|
|
3
|
-
"version": "100.1.
|
|
3
|
+
"version": "100.1.21",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^100.1.
|
|
18
|
-
"@94ai/nf-drawer": "^100.1.
|
|
19
|
-
"@94ai/nf-message": "^100.1.
|
|
20
|
-
"@94ai/nf-search-form": "^100.1.
|
|
21
|
-
"@94ai/nf-theme-chalk": "^100.1.
|
|
17
|
+
"@94ai/common-utils": "^100.1.21",
|
|
18
|
+
"@94ai/nf-drawer": "^100.1.21",
|
|
19
|
+
"@94ai/nf-message": "^100.1.21",
|
|
20
|
+
"@94ai/nf-search-form": "^100.1.21",
|
|
21
|
+
"@94ai/nf-theme-chalk": "^100.1.21",
|
|
22
22
|
"idb-keyval": "^6.2.1",
|
|
23
23
|
"vue-demi": "^0.14.5",
|
|
24
24
|
"vuedraggable": "^2.24.3"
|