@netang/quasar 0.0.48 → 0.0.50
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/components/data/index.vue +23 -23
- package/components/dialog/index.vue +10 -10
- package/components/dialog-table/index.vue +1 -1
- package/components/dragger/index.vue +2 -2
- package/components/drawer/index.vue +7 -7
- package/components/editor-code/index.vue +282 -0
- package/components/empty/index.vue +22 -3
- package/components/field-date/index.vue +35 -35
- package/components/field-table/index.vue +34 -34
- package/components/field-text/index.vue +2 -2
- package/components/field-tree/index.vue +18 -18
- package/components/input-number/index.vue +2 -2
- package/components/list-menu/index.vue +2 -2
- package/components/private/components/move-to-tree/index.vue +2 -2
- package/components/private/edit-power-data/index.vue +50 -50
- package/components/private/table-visible-columns-button/index.vue +2 -2
- package/components/render/index.vue +6 -6
- package/components/search/index.vue +2 -2
- package/components/search-item/index.vue +5 -5
- package/components/select/index.vue +2 -2
- package/components/splitter/index.vue +7 -7
- package/components/table/index.vue +5 -5
- package/components/table-splitter/index.vue +4 -4
- package/components/table-summary/index.vue +3 -3
- package/components/thumbnail/index.vue +6 -6
- package/components/uploader/index.vue +1 -1
- package/components/uploader-query/index.vue +25 -25
- package/components/value-format/index.vue +12 -12
- package/package.json +1 -1
- package/sass/quasar/field.scss +5 -0
- package/sass/quasar/table.scss +6 -0
- package/utils/$area.js +13 -13
- package/utils/$auth.js +6 -6
- package/utils/$dialog.js +3 -3
- package/utils/$form.js +2 -2
- package/utils/$power.js +118 -118
- package/utils/$rule.js +4 -4
- package/utils/$search.js +50 -50
- package/utils/$table.js +79 -76
- package/utils/$tree.js +43 -43
- package/utils/$uploader.js +47 -47
- package/utils/alert.js +1 -1
- package/utils/arr.js +2 -2
- package/utils/bus.js +1 -1
- package/utils/config.js +4 -4
- package/utils/confrim.js +1 -1
- package/utils/dict.js +5 -5
- package/utils/getData.js +9 -9
- package/utils/getFile.js +5 -5
- package/utils/getImage.js +12 -12
- package/utils/getTime.js +4 -4
- package/utils/http.js +20 -20
- package/utils/loading.js +1 -1
- package/utils/notify.js +1 -1
- package/utils/previewImage.js +2 -2
- package/utils/price.js +3 -3
- package/utils/timestamp.js +1 -1
- package/utils/toast.js +1 -1
- package/utils/uploader/qiniu.js +11 -11
- package/utils/useAuth.js +2 -2
- package/utils/useRouter.js +4 -4
package/utils/$table.js
CHANGED
|
@@ -26,7 +26,7 @@ function create(params) {
|
|
|
26
26
|
// const rowsPerPageOptions = [3, 40, 50, 100, 200, 500, 1000]
|
|
27
27
|
|
|
28
28
|
// 获取参数
|
|
29
|
-
const o =
|
|
29
|
+
const o = $n.merge({
|
|
30
30
|
// 路由路径
|
|
31
31
|
path: '',
|
|
32
32
|
// 路由参数
|
|
@@ -98,32 +98,32 @@ function create(params) {
|
|
|
98
98
|
// 如果有渲染注入
|
|
99
99
|
if (!! $render) {
|
|
100
100
|
// 如果有表格传参, 则合并参数
|
|
101
|
-
const tableProps =
|
|
102
|
-
if (
|
|
103
|
-
|
|
101
|
+
const tableProps = $n.get($render, 'props.tableProps')
|
|
102
|
+
if ($n.isValidObject(tableProps)) {
|
|
103
|
+
$n.merge(o, tableProps)
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// 获取权限注入
|
|
108
|
-
const $power =
|
|
108
|
+
const $power = $n.has(params, '$power') ? params.$power : inject(NPowerKey)
|
|
109
109
|
const hasPowr = !! $power
|
|
110
110
|
|
|
111
111
|
// 获取权限路由
|
|
112
|
-
const $route =
|
|
112
|
+
const $route = $n.isValidString(o.path) ?
|
|
113
113
|
// 如果为自定义路由
|
|
114
|
-
|
|
114
|
+
$n.router.resolve({
|
|
115
115
|
path: o.path,
|
|
116
|
-
query:
|
|
116
|
+
query: $n.isValidObject(o.query) ? o.query : {},
|
|
117
117
|
})
|
|
118
118
|
// 否则获取当前路由
|
|
119
|
-
: (hasPowr ? $power.getRoute() :
|
|
119
|
+
: (hasPowr ? $power.getRoute() : $n.router.getRoute())
|
|
120
120
|
|
|
121
121
|
// 是否有权限按钮
|
|
122
122
|
const hasPowerBtns = hasPowr ? $power.powerBtns.value.length : false
|
|
123
123
|
|
|
124
124
|
// 表格已选数据
|
|
125
125
|
const tableSelected = hasPowr ? $power.tableSelected : ref([])
|
|
126
|
-
if (
|
|
126
|
+
if ($n.isValidArray(o.selected)) {
|
|
127
127
|
tableSelected.value = o.selected
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -131,7 +131,7 @@ function create(params) {
|
|
|
131
131
|
const isCache = !! o.cache
|
|
132
132
|
|
|
133
133
|
// 缓存名
|
|
134
|
-
const cacheName = $route.fullPath ? $route.fullPath : (
|
|
134
|
+
const cacheName = $route.fullPath ? $route.fullPath : ($n.isValidString(o.cache) ? o.cache : '')
|
|
135
135
|
|
|
136
136
|
// 表格列
|
|
137
137
|
const tableColumns = []
|
|
@@ -149,48 +149,48 @@ function create(params) {
|
|
|
149
149
|
const tableImgNames = ref([])
|
|
150
150
|
|
|
151
151
|
// 设置列参数
|
|
152
|
-
|
|
152
|
+
$n.forEach(o.columns, function(item) {
|
|
153
153
|
|
|
154
154
|
if (
|
|
155
|
-
!
|
|
156
|
-
&&
|
|
155
|
+
! $n.has(item, 'field')
|
|
156
|
+
&& $n.has(item, 'name')
|
|
157
157
|
) {
|
|
158
158
|
item.field = item.name
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
if (!
|
|
161
|
+
if (! $n.has(item, 'align')) {
|
|
162
162
|
item.align = 'left'
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// 是否隐藏
|
|
166
|
-
item.hide =
|
|
166
|
+
item.hide = $n.get(item, 'hide') === true
|
|
167
167
|
|
|
168
168
|
// 如果有显示项
|
|
169
|
-
if (
|
|
169
|
+
if ($n.get(item, 'visible') !== false) {
|
|
170
170
|
o.visibleColumns.push(item.field)
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
// 如果有时间戳
|
|
174
|
-
if (
|
|
175
|
-
item.format = val => date.formatDate(
|
|
174
|
+
if ($n.has(item, 'time')) {
|
|
175
|
+
item.format = val => date.formatDate($n.toDate(val), item.time === true ? `YYYY-MM-DD HH:mm` : item.time)
|
|
176
176
|
|
|
177
177
|
// 如果有数据字典
|
|
178
|
-
} else if (
|
|
179
|
-
item.format = val =>
|
|
178
|
+
} else if ($n.has(item, 'dict')) {
|
|
179
|
+
item.format = val => $n.dict(item.dict, val)
|
|
180
180
|
|
|
181
181
|
// 如果有图片
|
|
182
|
-
} else if (
|
|
182
|
+
} else if ($n.has(item, 'img') && item.img === true) {
|
|
183
183
|
tableImgNames.value.push(item.name)
|
|
184
184
|
|
|
185
185
|
// 如果有价格
|
|
186
|
-
} else if (
|
|
187
|
-
item.format = val =>
|
|
186
|
+
} else if ($n.has(item, 'price')) {
|
|
187
|
+
item.format = val => $n.price(val)
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
// 如果有路由
|
|
191
|
-
if (
|
|
191
|
+
if ($n.get(item, 'route')) {
|
|
192
192
|
// 如果该值在当前路由路径中, 则显示
|
|
193
|
-
if (
|
|
193
|
+
if ($n.indexOf($route.fullPath, item.route) > -1) {
|
|
194
194
|
tableColumns.push(item)
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -200,10 +200,10 @@ function create(params) {
|
|
|
200
200
|
})
|
|
201
201
|
|
|
202
202
|
// 获取可见列缓存
|
|
203
|
-
const visibleColumnsCache = o.showVisibleColumns && isCache ?
|
|
203
|
+
const visibleColumnsCache = o.showVisibleColumns && isCache ? $n.storage.get('table:visible_columns:' + cacheName) : []
|
|
204
204
|
|
|
205
205
|
// 表格可见列
|
|
206
|
-
const tableVisibleColumns = ref(Array.isArray(visibleColumnsCache) ? visibleColumnsCache :
|
|
206
|
+
const tableVisibleColumns = ref(Array.isArray(visibleColumnsCache) ? visibleColumnsCache : $n.uniq([...o.visibleColumns]))
|
|
207
207
|
|
|
208
208
|
// 表格加载状态
|
|
209
209
|
const tableLoading = ref(o.loading)
|
|
@@ -215,7 +215,7 @@ function create(params) {
|
|
|
215
215
|
const tablePagination = ref($route.fullPath ? o.pagination : {})
|
|
216
216
|
|
|
217
217
|
// 表格宫格
|
|
218
|
-
const tableGrid = ref(o.showGrid && isCache ?
|
|
218
|
+
const tableGrid = ref(o.showGrid && isCache ? $n.storage.get('table:grid:' + cacheName) === true : false)
|
|
219
219
|
|
|
220
220
|
// 表格请求参数(将表格传参中的搜索参数剥离掉, 剩下的直接当做参数传递给服务器)
|
|
221
221
|
let tableRequestQuery = {}
|
|
@@ -242,7 +242,7 @@ function create(params) {
|
|
|
242
242
|
// 首次表格搜索值(如果表格搜索参数中带了初始值, 则设置初始值)
|
|
243
243
|
firstTableSearchValue,
|
|
244
244
|
// 表格搜索值(如果表格搜索参数中带了初始值, 则设置初始值)
|
|
245
|
-
} =
|
|
245
|
+
} = $n.$search.getRawData(tableColumns, Object.assign({}, $route.query), o.searchFromQuery)
|
|
246
246
|
|
|
247
247
|
// 表格搜索数据值
|
|
248
248
|
const tableSearchValue = ref($route.fullPath ? firstTableSearchValue : [])
|
|
@@ -263,7 +263,7 @@ function create(params) {
|
|
|
263
263
|
const lists = []
|
|
264
264
|
|
|
265
265
|
// 先格式化权限按钮列表
|
|
266
|
-
|
|
266
|
+
$n.forEach($n.$power.formatBtns($power.powerBtns.value), function(item) {
|
|
267
267
|
|
|
268
268
|
// 如果是固定按钮
|
|
269
269
|
if (item.fixed) {
|
|
@@ -282,10 +282,10 @@ function create(params) {
|
|
|
282
282
|
// 非手机模式
|
|
283
283
|
! $q.platform.is.mobile
|
|
284
284
|
// 有权限列表
|
|
285
|
-
&&
|
|
285
|
+
&& $n.isValidArray($power.powerBtns.value)
|
|
286
286
|
) {
|
|
287
287
|
for (const item of $power.powerBtns.value) {
|
|
288
|
-
if (
|
|
288
|
+
if ($n.has(item, 'data.dbclick') === true) {
|
|
289
289
|
return item
|
|
290
290
|
}
|
|
291
291
|
}
|
|
@@ -296,7 +296,7 @@ function create(params) {
|
|
|
296
296
|
* 是否显示固定在右边的权限按钮列表
|
|
297
297
|
*/
|
|
298
298
|
const showTableFixed = computed(function () {
|
|
299
|
-
return
|
|
299
|
+
return $n.indexOf(tableVisibleColumns.value, 'settings') > -1
|
|
300
300
|
})
|
|
301
301
|
|
|
302
302
|
// ==========【监听数据】=============================================================================================
|
|
@@ -309,7 +309,7 @@ function create(params) {
|
|
|
309
309
|
|
|
310
310
|
// 设置宫格模式缓存(永久缓存)
|
|
311
311
|
// #if ! IS_DEV
|
|
312
|
-
|
|
312
|
+
$n.storage.set('table:grid:' + cacheName, val, 0)
|
|
313
313
|
// #endif
|
|
314
314
|
})
|
|
315
315
|
}
|
|
@@ -322,7 +322,7 @@ function create(params) {
|
|
|
322
322
|
|
|
323
323
|
// 设置可见列缓存(永久缓存)
|
|
324
324
|
// #if ! IS_DEV
|
|
325
|
-
|
|
325
|
+
$n.storage.set('table:visible_columns:' + cacheName, val, 0)
|
|
326
326
|
// #endif
|
|
327
327
|
})
|
|
328
328
|
}
|
|
@@ -333,10 +333,10 @@ function create(params) {
|
|
|
333
333
|
if (hasPowerBtns) {
|
|
334
334
|
watch(tableFixedPowerBtns, function (lists) {
|
|
335
335
|
|
|
336
|
-
const index =
|
|
336
|
+
const index = $n.indexOf(tableVisibleColumns.value, 'settings')
|
|
337
337
|
|
|
338
338
|
// 如果有固定在右边的权限按钮列表
|
|
339
|
-
if (
|
|
339
|
+
if ($n.isValidArray(lists)) {
|
|
340
340
|
|
|
341
341
|
// 如果设置不在可见列中
|
|
342
342
|
if (index === -1) {
|
|
@@ -375,9 +375,9 @@ function create(params) {
|
|
|
375
375
|
*/
|
|
376
376
|
function setQuery(query) {
|
|
377
377
|
|
|
378
|
-
if (
|
|
378
|
+
if ($n.isValidObject(query)) {
|
|
379
379
|
|
|
380
|
-
query =
|
|
380
|
+
query = $n.cloneDeep(query)
|
|
381
381
|
|
|
382
382
|
// 搜索参数键值数组
|
|
383
383
|
const searchQueryKey = []
|
|
@@ -388,11 +388,11 @@ function create(params) {
|
|
|
388
388
|
const NSearchValues = []
|
|
389
389
|
|
|
390
390
|
// 参数中是否有自定义搜索参数
|
|
391
|
-
const hasNSearch =
|
|
391
|
+
const hasNSearch = $n.has(query, 'n_search')
|
|
392
392
|
if (hasNSearch) {
|
|
393
393
|
// 删除在搜索中存在的参数键值
|
|
394
|
-
|
|
395
|
-
if (
|
|
394
|
+
$n.forIn(query.n_search, function (item, key) {
|
|
395
|
+
if ($n.has(query, key)) {
|
|
396
396
|
delete query[key]
|
|
397
397
|
}
|
|
398
398
|
})
|
|
@@ -401,14 +401,14 @@ function create(params) {
|
|
|
401
401
|
// 如果允许从参数中获取搜索值
|
|
402
402
|
if (o.searchFromQuery) {
|
|
403
403
|
|
|
404
|
-
|
|
404
|
+
$n.forEach(rawSearchOptions, function (item, index) {
|
|
405
405
|
|
|
406
406
|
const valueItem = tableSearchValue.value[index]
|
|
407
407
|
|
|
408
408
|
// 如果传参在搜素 n_search 参数中
|
|
409
|
-
if (hasNSearch &&
|
|
409
|
+
if (hasNSearch && $n.has(query.n_search, item.name)) {
|
|
410
410
|
const newSearchItem = query.n_search[item.name]
|
|
411
|
-
if (
|
|
411
|
+
if ($n.isValidArray(newSearchItem)) {
|
|
412
412
|
valueItem[0].compare = newSearchItem[0].compare
|
|
413
413
|
valueItem[0].value = newSearchItem[0].value
|
|
414
414
|
|
|
@@ -421,23 +421,23 @@ function create(params) {
|
|
|
421
421
|
NSearchKeys.push(item.name)
|
|
422
422
|
|
|
423
423
|
// 如果传参在搜索参数中
|
|
424
|
-
} else if (
|
|
424
|
+
} else if ($n.has(query, item.name)) {
|
|
425
425
|
// 设置单个搜索值
|
|
426
|
-
setItemValue(valueItem,
|
|
426
|
+
setItemValue(valueItem, $n.isRequired(query[item.name]) ? query[item.name] : '')
|
|
427
427
|
// 设置参数中搜索的 key
|
|
428
428
|
searchQueryKey.push(item.name)
|
|
429
429
|
}
|
|
430
430
|
})
|
|
431
431
|
|
|
432
|
-
|
|
432
|
+
$n.forEach(searchQueryKey, function (key) {
|
|
433
433
|
delete query[key]
|
|
434
434
|
})
|
|
435
435
|
|
|
436
436
|
if (hasNSearch) {
|
|
437
|
-
|
|
437
|
+
$n.forIn(query.n_search, function(item, key) {
|
|
438
438
|
if (
|
|
439
439
|
NSearchKeys.indexOf(key) === -1
|
|
440
|
-
&&
|
|
440
|
+
&& $n.isValidArray(item)
|
|
441
441
|
) {
|
|
442
442
|
item[0].field = key
|
|
443
443
|
NSearchValues.push(item[0])
|
|
@@ -451,8 +451,8 @@ function create(params) {
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
} else {
|
|
454
|
-
|
|
455
|
-
if (
|
|
454
|
+
$n.forIn(query.n_search, function(item, key) {
|
|
455
|
+
if ($n.isValidArray(item)) {
|
|
456
456
|
item[0].field = key
|
|
457
457
|
NSearchValues.push(item[0])
|
|
458
458
|
if (item.length > 1) {
|
|
@@ -563,7 +563,7 @@ function create(params) {
|
|
|
563
563
|
|
|
564
564
|
const newValue = []
|
|
565
565
|
|
|
566
|
-
|
|
566
|
+
$n.forEach(rawSearchOptions, function (item, index) {
|
|
567
567
|
// 如果该搜索条件是隐藏的
|
|
568
568
|
if (item.hide) {
|
|
569
569
|
newValue.push(tableSearchValue.value[index])
|
|
@@ -574,7 +574,7 @@ function create(params) {
|
|
|
574
574
|
})
|
|
575
575
|
|
|
576
576
|
// 还原表格搜索数据
|
|
577
|
-
tableSearchValue.value =
|
|
577
|
+
tableSearchValue.value = $n.cloneDeep(newValue)
|
|
578
578
|
|
|
579
579
|
// 表格重新加载
|
|
580
580
|
if (reload) {
|
|
@@ -611,7 +611,7 @@ function create(params) {
|
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
// 如果排序字段是有效值
|
|
614
|
-
if (
|
|
614
|
+
if ($n.isValidValue(sortBy)) {
|
|
615
615
|
Object.assign(data, {
|
|
616
616
|
// 排序字段
|
|
617
617
|
order_by: sortBy,
|
|
@@ -621,20 +621,20 @@ function create(params) {
|
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
// 合并参数
|
|
624
|
-
|
|
624
|
+
$n.forIn(Object.assign({}, rawQuery, tableRequestQuery, o.data), function(value, key) {
|
|
625
625
|
// 如果有值
|
|
626
|
-
if (
|
|
626
|
+
if ($n.isRequired(value)) {
|
|
627
627
|
data[key] = value
|
|
628
628
|
}
|
|
629
629
|
})
|
|
630
630
|
|
|
631
631
|
// 获取搜索值
|
|
632
|
-
const search =
|
|
633
|
-
if (
|
|
634
|
-
data.n_search =
|
|
632
|
+
const search = $n.$search.formatValue(rawSearchOptions, tableSearchValue.value)
|
|
633
|
+
if ($n.isValidArray(search)) {
|
|
634
|
+
data.n_search = $n.has(data, 'n_search') ? $n.concat(data.n_search, search) : search
|
|
635
635
|
}
|
|
636
636
|
|
|
637
|
-
if (
|
|
637
|
+
if ($n.isNil(isSummary)) {
|
|
638
638
|
isSummary = isRequestSummary
|
|
639
639
|
}
|
|
640
640
|
|
|
@@ -651,6 +651,9 @@ function create(params) {
|
|
|
651
651
|
*/
|
|
652
652
|
async function tableRequest(props) {
|
|
653
653
|
|
|
654
|
+
// 加载
|
|
655
|
+
tableLoading.value = true
|
|
656
|
+
|
|
654
657
|
// 解构数据
|
|
655
658
|
const {
|
|
656
659
|
// filter,
|
|
@@ -672,8 +675,8 @@ function create(params) {
|
|
|
672
675
|
let result
|
|
673
676
|
|
|
674
677
|
// 如果有自定义请求方法
|
|
675
|
-
if (
|
|
676
|
-
result = await
|
|
678
|
+
if ($n.isFunction(o.request)) {
|
|
679
|
+
result = await $n.runAsync(o.request)({
|
|
677
680
|
data,
|
|
678
681
|
props,
|
|
679
682
|
rows: tableRows,
|
|
@@ -692,7 +695,7 @@ function create(params) {
|
|
|
692
695
|
// debounce: false,
|
|
693
696
|
}, o.httpSettings)
|
|
694
697
|
|
|
695
|
-
result = await
|
|
698
|
+
result = await $n.http(opts)
|
|
696
699
|
}
|
|
697
700
|
|
|
698
701
|
const { status, data: res } = result
|
|
@@ -709,8 +712,8 @@ function create(params) {
|
|
|
709
712
|
|
|
710
713
|
// 如果请求表格合计
|
|
711
714
|
if (isRequestSummary) {
|
|
712
|
-
const summary =
|
|
713
|
-
tableSummary.value =
|
|
715
|
+
const summary = $n.get(res, 'summary')
|
|
716
|
+
tableSummary.value = $n.isValidObject(summary) ? summary : null
|
|
714
717
|
}
|
|
715
718
|
|
|
716
719
|
// 更新页码
|
|
@@ -725,8 +728,8 @@ function create(params) {
|
|
|
725
728
|
tablePagination.value.descending = descending
|
|
726
729
|
|
|
727
730
|
// 格式化单条数据
|
|
728
|
-
if (
|
|
729
|
-
|
|
731
|
+
if ($n.isFunction(o.formatRow)) {
|
|
732
|
+
$n.forEach(rows, function(row) {
|
|
730
733
|
o.formatRow({
|
|
731
734
|
row,
|
|
732
735
|
rows: tableRows,
|
|
@@ -761,7 +764,7 @@ function create(params) {
|
|
|
761
764
|
opt[o.rowKey] = row[o.rowKey]
|
|
762
765
|
|
|
763
766
|
// 获取当前数据索引
|
|
764
|
-
const itemIndex =
|
|
767
|
+
const itemIndex = $n.findIndex(tableSelected.value, opt)
|
|
765
768
|
|
|
766
769
|
// 如果不存在, 则添加
|
|
767
770
|
if (itemIndex === -1) {
|
|
@@ -786,7 +789,7 @@ function create(params) {
|
|
|
786
789
|
_tableRowClick(...e)
|
|
787
790
|
|
|
788
791
|
// 如果有自定义单击事件
|
|
789
|
-
if (
|
|
792
|
+
if ($n.isFunction(o.rowClick)) {
|
|
790
793
|
o.rowClick(...e)
|
|
791
794
|
}
|
|
792
795
|
}
|
|
@@ -817,7 +820,7 @@ function create(params) {
|
|
|
817
820
|
_tableRowDblclick(...e)
|
|
818
821
|
|
|
819
822
|
// 如果有自定义双击表格行事件
|
|
820
|
-
if (
|
|
823
|
+
if ($n.isFunction(o.tableRowDblclick)) {
|
|
821
824
|
o.tableRowDblclick(...e)
|
|
822
825
|
}
|
|
823
826
|
}
|
|
@@ -826,14 +829,14 @@ function create(params) {
|
|
|
826
829
|
* 设置表格搜索参数
|
|
827
830
|
*/
|
|
828
831
|
async function setTableSearchOptions(format) {
|
|
829
|
-
tableSearchOptions.value = await
|
|
832
|
+
tableSearchOptions.value = await $n.$search.getOptions(rawSearchOptions, format)
|
|
830
833
|
}
|
|
831
834
|
|
|
832
835
|
/**
|
|
833
836
|
* 是否有表格搜索值
|
|
834
837
|
*/
|
|
835
838
|
function hasTableSearchValue() {
|
|
836
|
-
return !!
|
|
839
|
+
return !! $n.$search.formatValue(rawSearchOptions, tableSearchValue.value).length
|
|
837
840
|
}
|
|
838
841
|
|
|
839
842
|
// 如果开启搜索
|
|
@@ -936,13 +939,13 @@ function create(params) {
|
|
|
936
939
|
* 获取表格配置
|
|
937
940
|
*/
|
|
938
941
|
function config(routePath, path, defaultValue) {
|
|
939
|
-
return
|
|
942
|
+
return $n.cloneDeep($n.get(tablesConfig, $n.slash(routePath, 'start', false) + (path ? '.' + path : ''), defaultValue))
|
|
940
943
|
}
|
|
941
944
|
|
|
942
945
|
/**
|
|
943
946
|
* 业务表格
|
|
944
947
|
*/
|
|
945
|
-
|
|
948
|
+
$n.$table = {
|
|
946
949
|
// 创建表格
|
|
947
950
|
create,
|
|
948
951
|
// 获取表格配置
|