@94ai/nf-table 8.1.6 → 8.1.9
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.
|
@@ -26,7 +26,7 @@ declare const _default: import("vue-demi").DefineComponent<__VLS_WithDefaults<__
|
|
|
26
26
|
operationPropKey: string;
|
|
27
27
|
}>, {
|
|
28
28
|
syncTableColumnsToCookies: () => Record<string, any>;
|
|
29
|
-
setFields: (tableColumns: any) => void
|
|
29
|
+
setFields: (tableColumns: any) => Promise<void>;
|
|
30
30
|
updateColumn: () => void;
|
|
31
31
|
handleSearch: (str: any) => void;
|
|
32
32
|
currentTable: import("vue-demi").Ref<Record<string, any>[]>;
|
package/lib/nf-table.cjs.js
CHANGED
|
@@ -167,7 +167,7 @@ __sfc_main$2.setup = (__props, __ctx) => {
|
|
|
167
167
|
const fields = vueDemi.computed(() => {
|
|
168
168
|
const obj = {};
|
|
169
169
|
props.tableColumns.filter((item) => !item.destory).map((item) => {
|
|
170
|
-
if (!item.type) {
|
|
170
|
+
if (!item.type && !unChangedColumn.value.includes(item.prop)) {
|
|
171
171
|
const key = item.category || props.basicFieldDesc;
|
|
172
172
|
if (!obj[key]) {
|
|
173
173
|
obj[key] = [];
|
|
@@ -5366,14 +5366,17 @@ __sfc_main$1.setup = (__props, __ctx) => {
|
|
|
5366
5366
|
}
|
|
5367
5367
|
});
|
|
5368
5368
|
const fields = vueDemi.ref([]);
|
|
5369
|
-
const setFields = (tableColumns) => {
|
|
5369
|
+
const setFields = async (tableColumns) => {
|
|
5370
|
+
await vueDemi.nextTick();
|
|
5370
5371
|
const obj = {};
|
|
5371
5372
|
tableColumns.map((item) => {
|
|
5372
5373
|
const key = item.category || props.basicFieldDesc;
|
|
5373
5374
|
if (!obj[key]) {
|
|
5374
5375
|
obj[key] = [];
|
|
5375
5376
|
}
|
|
5376
|
-
|
|
5377
|
+
if (!unChangedColumn.value.includes(item.prop)) {
|
|
5378
|
+
obj[key].push(item);
|
|
5379
|
+
}
|
|
5377
5380
|
});
|
|
5378
5381
|
const items = [];
|
|
5379
5382
|
for (const key in obj) {
|
|
@@ -5578,7 +5581,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
|
|
|
5578
5581
|
return (item.prop || ((_a3 = item.attr) == null ? void 0 : _a3.prop)) === props.operationPropKey;
|
|
5579
5582
|
});
|
|
5580
5583
|
if (operationItem) {
|
|
5581
|
-
newTableColumns.
|
|
5584
|
+
newTableColumns.push(commonUtils.deepClone(operationItem));
|
|
5582
5585
|
}
|
|
5583
5586
|
}
|
|
5584
5587
|
currentTable.value.filter((item) => item.initHidden).forEach((item) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, reactive, watch,
|
|
1
|
+
import { defineComponent, getCurrentInstance, ref, computed, onMounted, onBeforeMount, nextTick, reactive, watch, set } from "vue-demi";
|
|
2
2
|
import { CachedManager, deepClone, resolveValue } from "@94ai/common-utils";
|
|
3
3
|
import { normalizeComponent as normalizeComponent$1 } from "@94ai/vue2-runtime-helpers";
|
|
4
4
|
import { Checkbox, Radio, TableColumn, Loading } from "element-ui";
|
|
@@ -165,7 +165,7 @@ __sfc_main$2.setup = (__props, __ctx) => {
|
|
|
165
165
|
const fields = computed(() => {
|
|
166
166
|
const obj = {};
|
|
167
167
|
props.tableColumns.filter((item) => !item.destory).map((item) => {
|
|
168
|
-
if (!item.type) {
|
|
168
|
+
if (!item.type && !unChangedColumn.value.includes(item.prop)) {
|
|
169
169
|
const key = item.category || props.basicFieldDesc;
|
|
170
170
|
if (!obj[key]) {
|
|
171
171
|
obj[key] = [];
|
|
@@ -5364,14 +5364,17 @@ __sfc_main$1.setup = (__props, __ctx) => {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
});
|
|
5366
5366
|
const fields = ref([]);
|
|
5367
|
-
const setFields = (tableColumns) => {
|
|
5367
|
+
const setFields = async (tableColumns) => {
|
|
5368
|
+
await nextTick();
|
|
5368
5369
|
const obj = {};
|
|
5369
5370
|
tableColumns.map((item) => {
|
|
5370
5371
|
const key = item.category || props.basicFieldDesc;
|
|
5371
5372
|
if (!obj[key]) {
|
|
5372
5373
|
obj[key] = [];
|
|
5373
5374
|
}
|
|
5374
|
-
|
|
5375
|
+
if (!unChangedColumn.value.includes(item.prop)) {
|
|
5376
|
+
obj[key].push(item);
|
|
5377
|
+
}
|
|
5375
5378
|
});
|
|
5376
5379
|
const items = [];
|
|
5377
5380
|
for (const key in obj) {
|
|
@@ -5576,7 +5579,7 @@ __sfc_main$1.setup = (__props, __ctx) => {
|
|
|
5576
5579
|
return (item.prop || ((_a3 = item.attr) == null ? void 0 : _a3.prop)) === props.operationPropKey;
|
|
5577
5580
|
});
|
|
5578
5581
|
if (operationItem) {
|
|
5579
|
-
newTableColumns.
|
|
5582
|
+
newTableColumns.push(deepClone(operationItem));
|
|
5580
5583
|
}
|
|
5581
5584
|
}
|
|
5582
5585
|
currentTable.value.filter((item) => item.initHidden).forEach((item) => {
|
|
@@ -143,7 +143,7 @@ const visible = computed({
|
|
|
143
143
|
const fields = computed(() => {
|
|
144
144
|
const obj: Record<string, any> = {}
|
|
145
145
|
props.tableColumns.filter(item => !item.destory).map(item => {
|
|
146
|
-
if (!item.type) {
|
|
146
|
+
if (!item.type && !unChangedColumn.value.includes(item.prop)) {
|
|
147
147
|
const key = item.category || props.basicFieldDesc
|
|
148
148
|
if (!obj[key]) {
|
|
149
149
|
obj[key] = []
|
|
@@ -138,6 +138,7 @@ import {
|
|
|
138
138
|
computed,
|
|
139
139
|
onBeforeMount,
|
|
140
140
|
getCurrentInstance,
|
|
141
|
+
nextTick
|
|
141
142
|
} from 'vue-demi'
|
|
142
143
|
import { deepClone } from '@94ai/common-utils'
|
|
143
144
|
import { CachedManager } from '@94ai/common-utils'
|
|
@@ -229,14 +230,19 @@ const fields = ref<{
|
|
|
229
230
|
name: string,
|
|
230
231
|
list: Record<string, any>[]
|
|
231
232
|
}[]>([])
|
|
232
|
-
const setFields = (tableColumns) => {
|
|
233
|
+
const setFields = async(tableColumns) => {
|
|
234
|
+
// nextTick是为了异步获取unChangedColumn最终值
|
|
235
|
+
await nextTick()
|
|
233
236
|
const obj: Record<string, any> = {}
|
|
234
237
|
tableColumns.map(item => {
|
|
235
238
|
const key = item.category || props.basicFieldDesc
|
|
236
239
|
if (!obj[key]) {
|
|
237
240
|
obj[key] = []
|
|
238
241
|
}
|
|
239
|
-
|
|
242
|
+
// 不可操作的属性过滤掉 如selection operation
|
|
243
|
+
if (!unChangedColumn.value.includes(item.prop)) {
|
|
244
|
+
obj[key].push(item)
|
|
245
|
+
}
|
|
240
246
|
})
|
|
241
247
|
const items: {
|
|
242
248
|
name: string
|
|
@@ -481,7 +487,7 @@ const syncTableColumnsToCookies = () => {
|
|
|
481
487
|
} else {
|
|
482
488
|
const operationItem = currentTable.value.find(item => (item.prop || item.attr?.prop) === props.operationPropKey)
|
|
483
489
|
if (operationItem) {
|
|
484
|
-
newTableColumns.
|
|
490
|
+
newTableColumns.push(deepClone(operationItem))
|
|
485
491
|
}
|
|
486
492
|
}
|
|
487
493
|
currentTable.value.filter(item => item.initHidden).forEach(item => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-table",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.9",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^8.1.
|
|
18
|
-
"@94ai/nf-button": "^8.1.
|
|
19
|
-
"@94ai/nf-drawer": "^8.1.
|
|
20
|
-
"@94ai/nf-message": "^8.1.
|
|
21
|
-
"@94ai/nf-search-form": "^8.1.
|
|
22
|
-
"@94ai/nf-tag": "^8.1.
|
|
23
|
-
"@94ai/nf-theme-chalk": "^8.1.
|
|
17
|
+
"@94ai/common-utils": "^8.1.9",
|
|
18
|
+
"@94ai/nf-button": "^8.1.9",
|
|
19
|
+
"@94ai/nf-drawer": "^8.1.9",
|
|
20
|
+
"@94ai/nf-message": "^8.1.9",
|
|
21
|
+
"@94ai/nf-search-form": "^8.1.9",
|
|
22
|
+
"@94ai/nf-tag": "^8.1.9",
|
|
23
|
+
"@94ai/nf-theme-chalk": "^8.1.9",
|
|
24
24
|
"idb-keyval": "^6.2.1",
|
|
25
25
|
"vue-demi": "^0.14.5",
|
|
26
26
|
"vue-router": "3.6.4",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"types": "lib/index.d.ts",
|
|
40
40
|
"main": "lib/nf-table.cjs.js",
|
|
41
41
|
"module": "lib/nf-table.esm-bundler.js",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "eb0b1c5ee29b277208e13eeebdb43d1b07554ce3"
|
|
43
43
|
}
|