@netang/quasar 0.1.44 → 0.1.46
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.
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
v-for="item in tableColumns"
|
|
37
37
|
clickable
|
|
38
38
|
@click="onTableVisible(item)"
|
|
39
|
+
v-if="tableShowVisibleColumns"
|
|
39
40
|
>
|
|
40
41
|
<q-item-section>{{item.label}}</q-item-section>
|
|
41
42
|
<q-item-section side>
|
|
@@ -71,6 +72,8 @@ export default {
|
|
|
71
72
|
const {
|
|
72
73
|
// 表格列数据(对象数组)
|
|
73
74
|
tableColumns,
|
|
75
|
+
// 表格是否显示可见列
|
|
76
|
+
tableShowVisibleColumns,
|
|
74
77
|
// 表格可见列
|
|
75
78
|
tableVisibleColumns,
|
|
76
79
|
// 表格宫格
|
|
@@ -94,6 +97,8 @@ export default {
|
|
|
94
97
|
return {
|
|
95
98
|
// 表格列数据(对象数组)
|
|
96
99
|
tableColumns,
|
|
100
|
+
// 表格是否显示可见列
|
|
101
|
+
tableShowVisibleColumns,
|
|
97
102
|
// 表格可见列
|
|
98
103
|
tableVisibleColumns,
|
|
99
104
|
// 表格宫格
|
package/package.json
CHANGED
package/utils/$table.js
CHANGED
|
@@ -26,6 +26,7 @@ import $n_isValidObject from '@netang/utils/isValidObject'
|
|
|
26
26
|
import $n_isValidValue from '@netang/utils/isValidValue'
|
|
27
27
|
import $n_slash from '@netang/utils/slash'
|
|
28
28
|
import $n_http from '@netang/utils/http'
|
|
29
|
+
import $n_cb from '@netang/utils/cb'
|
|
29
30
|
|
|
30
31
|
import $n_$power from './$power'
|
|
31
32
|
import $n_dict from './dict'
|
|
@@ -146,8 +147,8 @@ function create(options) {
|
|
|
146
147
|
let tableColumns
|
|
147
148
|
let tableImgNames
|
|
148
149
|
|
|
149
|
-
//
|
|
150
|
-
let
|
|
150
|
+
// 是否显示可见列
|
|
151
|
+
let tableShowVisibleColumns
|
|
151
152
|
// 表格可见列
|
|
152
153
|
let tableVisibleColumns
|
|
153
154
|
// 表格加载状态
|
|
@@ -337,11 +338,10 @@ function create(options) {
|
|
|
337
338
|
}
|
|
338
339
|
})
|
|
339
340
|
|
|
340
|
-
// 获取可见列缓存
|
|
341
|
-
visibleColumnsCache = o.showVisibleColumns && isCache ? $n_storage.get('table:visible_columns:' + cacheName) : []
|
|
342
|
-
|
|
343
341
|
// 表格可见列
|
|
344
|
-
const _tableVisibleColumns =
|
|
342
|
+
const _tableVisibleColumns = o.showVisibleColumns && isCache ?
|
|
343
|
+
$n_cb($n_storage.get('table:visible_columns:' + cacheName), e => Array.isArray(e) ? e : $n_uniq([...o.visibleColumns]))
|
|
344
|
+
: $n_uniq([...o.visibleColumns])
|
|
345
345
|
|
|
346
346
|
// 表格翻页参数
|
|
347
347
|
const _tablePagination = $route.fullPath ? o.pagination : {}
|
|
@@ -368,6 +368,9 @@ function create(options) {
|
|
|
368
368
|
// 表格列
|
|
369
369
|
tableColumns.value = _tableColumns
|
|
370
370
|
|
|
371
|
+
// 表格是否显示可见列
|
|
372
|
+
tableShowVisibleColumns.value = o.showVisibleColumns
|
|
373
|
+
|
|
371
374
|
// 表格可见列
|
|
372
375
|
tableVisibleColumns.value = _tableVisibleColumns
|
|
373
376
|
|
|
@@ -403,6 +406,9 @@ function create(options) {
|
|
|
403
406
|
// 表格列
|
|
404
407
|
tableColumns = ref(_tableColumns)
|
|
405
408
|
|
|
409
|
+
// 表格是否显示可见列
|
|
410
|
+
tableShowVisibleColumns = ref(o.showVisibleColumns)
|
|
411
|
+
|
|
406
412
|
// 表格可见列
|
|
407
413
|
tableVisibleColumns = ref(_tableVisibleColumns)
|
|
408
414
|
|
|
@@ -1081,6 +1087,8 @@ function create(options) {
|
|
|
1081
1087
|
tableSeparator,
|
|
1082
1088
|
// 表格列数据(对象数组)
|
|
1083
1089
|
tableColumns,
|
|
1090
|
+
// 表格是否显示可见列
|
|
1091
|
+
tableShowVisibleColumns,
|
|
1084
1092
|
// 表格可见列
|
|
1085
1093
|
tableVisibleColumns,
|
|
1086
1094
|
// 表格行数据
|