@wp1001/ui 2.9.13 → 3.0.1

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.
Files changed (106) hide show
  1. package/@vant-D4fmGxs6.js +1 -3891
  2. package/index.html +28 -0
  3. package/index.js +1 -8419
  4. package/lib/tinymce/zh_CN.js +1 -0
  5. package/package.json +1 -1
  6. package/packages/assets/devtools-detector.js +1 -2
  7. package/packages/components/xarray/index.js +1 -64
  8. package/packages/components/xautorows/index.js +1 -35
  9. package/packages/components/xbutton/mobile.js +1 -3
  10. package/packages/components/xbutton/pc.js +1 -3
  11. package/packages/components/xbuttons/mobile.js +1 -51
  12. package/packages/components/xbuttons/pc.js +1 -51
  13. package/packages/components/xchart/constants.js +1 -58
  14. package/packages/components/xchart/index.js +1 -263
  15. package/packages/components/xchart/utils.js +1 -121
  16. package/packages/components/xcheckboxs/mobile.js +1 -58
  17. package/packages/components/xcheckboxs/pc.js +1 -49
  18. package/packages/components/xcol/mobile.js +1 -10
  19. package/packages/components/xcol/pc.js +1 -10
  20. package/packages/components/xdatepicker/mobile.js +1 -71
  21. package/packages/components/xdatepicker/pc.js +1 -9
  22. package/packages/components/xdialog/mobile.js +1 -60
  23. package/packages/components/xdialog/pc.js +1 -64
  24. package/packages/components/xdict/index.js +1 -47
  25. package/packages/components/xdistrictselect/mobile.js +1 -79
  26. package/packages/components/xdistrictselect/pc.js +1 -127
  27. package/packages/components/xform/mobile.js +1 -29
  28. package/packages/components/xform/pc.js +1 -42
  29. package/packages/components/xform/utils.js +1 -95
  30. package/packages/components/xformitem/mobile.js +1 -56
  31. package/packages/components/xformitem/pc.js +1 -72
  32. package/packages/components/xicon/mobile.js +1 -35
  33. package/packages/components/xicon/pc.js +1 -35
  34. package/packages/components/xinfo/index.js +1 -100
  35. package/packages/components/xlooper/index.js +1 -7
  36. package/packages/components/xpagination/mobile.js +1 -21
  37. package/packages/components/xpagination/pc.js +1 -21
  38. package/packages/components/xpicker/index.js +1 -38
  39. package/packages/components/xradios/mobile.js +1 -40
  40. package/packages/components/xradios/pc.js +1 -53
  41. package/packages/components/xrow/mobile.js +1 -9
  42. package/packages/components/xrow/pc.js +1 -9
  43. package/packages/components/xscan/mobile.js +1 -24
  44. package/packages/components/xscan/pc.js +1 -20
  45. package/packages/components/xsearcher/index.js +1 -198
  46. package/packages/components/xselect/mobile.js +1 -86
  47. package/packages/components/xselect/pc.js +1 -114
  48. package/packages/components/xselect/util.js +1 -66
  49. package/packages/components/xselectv2/index.js +1 -91
  50. package/packages/components/xtable/mobile.js +1 -108
  51. package/packages/components/xtable/pc.js +1 -143
  52. package/packages/components/xtable/searcher.js +1 -477
  53. package/packages/components/xtable/settings.js +1 -80
  54. package/packages/components/xtable/utils.js +1 -692
  55. package/packages/components/xtabletools/mobile.js +1 -25
  56. package/packages/components/xtabletools/pc.js +1 -18
  57. package/packages/components/xtablev2/index.js +1 -53
  58. package/packages/components/xtags/mobile.js +1 -17
  59. package/packages/components/xtags/pc.js +1 -17
  60. package/packages/components/xtinymce/index.js +1 -71
  61. package/packages/components/xuploader/xfileuploader.js +1 -48
  62. package/packages/components/xuploader/ximageuploader.js +1 -53
  63. package/packages/comps.js +1 -108
  64. package/packages/controllers/BaseController.js +1 -125
  65. package/packages/controllers/CrudController.js +1 -907
  66. package/packages/controllers/TempCrudController.js +1 -32
  67. package/packages/controllers/index.js +1 -15
  68. package/packages/directives/el-table-infinite-scroll.js +1 -55
  69. package/packages/directives/index.js +1 -5
  70. package/packages/index.js +1 -81
  71. package/packages/layout/breadcrumb/index.js +1 -41
  72. package/packages/layout/header/inner.js +1 -11
  73. package/packages/layout/pc.vue +1 -1
  74. package/packages/layout/screenlock/index.js +1 -129
  75. package/packages/layout/sidebar/item.js +1 -16
  76. package/packages/layout/sidebar/menu.js +1 -72
  77. package/packages/layout/tagsview/ScrollPane.js +1 -65
  78. package/packages/layout/tagsview/index.js +1 -169
  79. package/packages/plop/actions/make-fill-admin-partials-action.js +1 -95
  80. package/packages/plop/generators/make-admin-page.js +1 -39
  81. package/packages/plop/generators/make-database-admin-pages.js +1 -84
  82. package/packages/plop/generators/make-page-generator.js +1 -52
  83. package/packages/plop/generators/make-simple-page.js +1 -20
  84. package/packages/plop/plopfile.js +1 -24
  85. package/packages/plop/utils/index.js +1 -168
  86. package/packages/plop/utils/plop-utils.js +1 -86
  87. package/packages/utils/crypt.js +1 -24
  88. package/packages/utils/decorators.js +1 -67
  89. package/packages/utils/disallowDevtools.js +1 -53
  90. package/packages/utils/effects.js +1 -173
  91. package/packages/utils/funcs.js +1 -78
  92. package/packages/utils/index.js +1 -95
  93. package/packages/utils/message.js +1 -110
  94. package/packages/utils/middlewares.js +1 -86
  95. package/packages/utils/model.js +1 -71
  96. package/packages/utils/modelUtils.js +1 -203
  97. package/packages/utils/request.js +1 -57
  98. package/packages/utils/site.js +1 -33
  99. package/packages/vite-plugins.js +1 -141
  100. package/src/App.vue +134 -0
  101. package/src/main.js +1 -0
  102. package/src/request.js +1 -0
  103. package/style.css +1 -0
  104. package/vite.config.js +1 -0
  105. package/vite.lib.config.js +1 -0
  106. package/.env +0 -6
@@ -1,692 +1 @@
1
- import { getUrlType, getFiletypeIcon } from '../../utils/funcs.js'
2
-
3
- const { highdict } = StardustJs
4
- const { storage } = StardustBrowser
5
-
6
- const { local } = storage
7
-
8
- const TYPES = ['index', 'selection', 'expand', 'radio', '_index']
9
-
10
- export function props () {
11
- return {
12
- table: Object,
13
- loading: Boolean,
14
- data: Array,
15
- columns: Array,
16
- query: Object,
17
- total: Number,
18
- finished: Boolean,
19
- selection: Array,
20
- chartHeight: String,
21
- chartOption: Object,
22
- tref: Object,
23
- defaultValue: '',
24
- slotAll: {
25
- type: Boolean,
26
- default: false
27
- },
28
- onSelectionChange: Function,
29
- onSortChange: Function,
30
- onHeaderDragend: Function,
31
- onCheckedChange: Function,
32
- onKeywordsSearch: Function,
33
- onSearch: Function,
34
- onAdd: Function,
35
- onEdit: Function,
36
- onDelete: Function,
37
- onRowEdit: Function,
38
- onCancelEdit: Function,
39
- onExport: Function,
40
- onSearchExport: Function,
41
- onImport: Function,
42
- onMultiDelete: Function,
43
- onLoad: Function,
44
-
45
- controller: Object,
46
- listen: {
47
- type: String,
48
- default: '*'
49
- },
50
-
51
- actions: {
52
- type: Array,
53
- default: () => []
54
- },
55
-
56
- title: {
57
- type: String,
58
- default: '表格'
59
- },
60
- useCollapse: {
61
- type: Boolean,
62
- default: false
63
- },
64
- uid: String,
65
- doms: Array
66
- }
67
- }
68
-
69
- export function emits () {
70
- return [
71
- 'update:tref',
72
- 'search',
73
- 'add',
74
- 'edit',
75
- 'row-edit',
76
- 'cancel-edit',
77
- 'delete',
78
- 'export',
79
- 'search-export',
80
- 'load'
81
- ]
82
- }
83
-
84
- export function _attrs () {
85
- const platform = this.$.attrs.platform || (window.isMobile ? 'mobile' : 'pc')
86
- const key = platform + 'TableAttrs'
87
- const dict = {}
88
- if (key in this) Object.assign(dict, this[key])
89
- Object.assign(dict, this.$attrs)
90
- return dict
91
- }
92
-
93
- export function domids () {
94
- const domids = {}
95
- const keys = [
96
- 'keywords-search',
97
- 'search',
98
- 'add',
99
- 'multi-delete',
100
- 'export',
101
- 'search-export',
102
- 'import',
103
-
104
- 'edit',
105
- 'row-edit',
106
- 'cancel-edit',
107
- 'delete',
108
- 'operates'
109
- ]
110
- keys.forEach(key => domids[key] = key)
111
- return { ...domids, ...this.$attrs.domids }
112
- }
113
-
114
- export function elTableAttrs () {
115
- const keys = Object.keys(this._attrs).filter(key => !key.endsWith('-btn'))
116
- const attrs = {}
117
- keys.forEach(key => attrs[key] = this._attrs[key])
118
- delete attrs.platform
119
- return {
120
- border: true,
121
- stripe: true,
122
- fit: true,
123
- 'highlight-current-row': true,
124
- ...attrs,
125
- data: this._data,
126
- 'cell-class-name': this.cellClassName,
127
- 'cell-style': this.cellStyle
128
- }
129
- }
130
-
131
- export function _loading () {
132
- const { table, loading } = this.$props
133
- return loading || table?.loading
134
- }
135
-
136
- export function _data () {
137
- const { table, data } = this.$props
138
- return data || table?.list || []
139
- }
140
-
141
- export function _columns () {
142
- const { $props, _query } = this
143
- const { table, columns } = $props
144
- const cols = columns || table?.columns || []
145
- const domids = cols.map(col => col.tableAttrs?.domid)
146
- return cols.filter((col, index) => !domids[index] || this._doms.includes(domids[index])).map(col => {
147
- if (col.type === '_index') {
148
- return Object.assign({
149
- width: 60,
150
- label: '序号',
151
- index (num) {
152
- const { page, limit } = _query
153
- return (table.isInfinite ? 0 : (page - 1) * limit) + num + 1
154
- }
155
- }, col, { type: 'index' })
156
- } else if (col.type === 'radio') {
157
- return Object.assign({ width: 60, label: '单选' }, col)
158
- }
159
- return Object.assign({}, col, col.tableAttrs)
160
- })
161
- }
162
-
163
- export function _doms () {
164
- return this.doms || this.$store?.acl?.routeDoms || []
165
- }
166
-
167
- export function _query () {
168
- const { table, query } = this.$props
169
- return query || table?.query
170
- }
171
-
172
- export function _total () {
173
- const { table, total } = this.$props
174
- return total || table?.total
175
- }
176
-
177
- export function _finished () {
178
- const { table, finished } = this.$props
179
- return finished ?? table?.finished
180
- }
181
-
182
- export function _selection () {
183
- const { table, selection } = this.$props
184
- return selection || table?.selection
185
- }
186
-
187
- export function _actions () {
188
- const path = this.$route?.path.slice(1).replaceAll('/', ':')
189
- const doms = this.$store?.acl?.routeDoms || []
190
- let items = this.$attrs.platform === 'pc' ? [] : [
191
- { name: '编辑', color: '#07c160', domid: 'edit' },
192
- { name: '删除', color: '#eb6f6f', domid: 'delete' },
193
- ]
194
- items = items.concat(this.actions)
195
- items.forEach(it => {
196
- if (this.$attrs.platform === 'pc') {
197
- if (it.type) delete it.color
198
- }
199
- if (typeof it.handler === 'string') {
200
- it.handler = this.controller[it.handler]
201
- }
202
- })
203
- return items.filter(ele => {
204
- return !ele.domid || doms?.includes(this.domids[ele.domid] ?? ele.domid)
205
- })
206
- }
207
-
208
- export function _chartHeight () {
209
- const { table, chartHeight } = this.$props
210
- return chartHeight || table?.chartHeight || (Math.max(window.innerHeight - 300, 360) + 'px')
211
- }
212
-
213
- export function _chartOption () {
214
- const { table, chartOption } = this.$props
215
- return { ...this._attrs.chartOption, ...table?.chartOption, ...chartOption }
216
- }
217
-
218
- export function _onKeywordsSearch () {
219
- if (this.onKeywordsSearch || this._listen['keywords-search']) {
220
- return (...props) => this._emit('keywords-search', ...props)
221
- }
222
- return null
223
- }
224
-
225
- export function _onSearch () {
226
- if (this.hideSearcher) {
227
- return (this.onSearch || this._listen['search']) ? () => this._emit('search') : null
228
- }
229
- if (this.onSearch || this._listen['search']) {
230
- return (params) => {
231
- if (params) {
232
- this._emit('search')
233
- } else {
234
- this.$refs.searcher.open()
235
- }
236
- }
237
- }
238
- return null
239
- }
240
-
241
- export function _onAdd () {
242
- return (this.onAdd || this._listen['add']) ? () => this._emit('add') : null
243
- }
244
-
245
- export function _onExport () {
246
- return (this.onExport || this._listen['export']) ? () => this._emit('export') : null
247
- }
248
-
249
- export function _onSearchExport () {
250
- return (this.onSearchExport || this._listen['search-export']) ? () => this._emit('search-export') : null
251
- }
252
-
253
- export function _onImport () {
254
- return (this.onImport || this._listen['import']) ? () => this._emit('import') : null
255
- }
256
-
257
- export function _onMultiDelete () {
258
- return (this.onMultiDelete || this._listen['multi-delete']) ? () => this._emit('multi-delete') : null
259
- }
260
-
261
- export function _onLoad () {
262
- return this.onLoad || this._listen['load'] ? () => this._emit('load') : () => {}
263
- }
264
-
265
- export function _listen () {
266
- if (!this.controller || !this.listen?.length) return {}
267
- let events = this.listen.split(',')
268
- if (events.includes('*')) {
269
- events = [...new Set([
270
- ...events, 'keywords-search', 'search', 'add', 'multi-delete', 'export', 'search-export', 'import',
271
- 'edit', 'row-edit', 'cancel-edit', 'delete'
272
- ])]
273
- }
274
- const dict = {}
275
- events.forEach(e => {
276
- const funcName = 'handle' + e.split('-').map(p => p[0].toUpperCase() + p.slice(1)).join('')
277
- dict[e] = this.controller[funcName]
278
- })
279
- return dict
280
- }
281
-
282
- export function _visibleColumns () {
283
- const left = this._columns.filter(col => col.type && TYPES.includes(col.type) || col.fixed === 'left')
284
- const right = this.settings.columns.filter(col => !col.hide && col.fixed !== 'left').map(col => {
285
- const column = this._columns.find(c => c.prop === col.prop)
286
- if (!column) return
287
- return {
288
- sortable: 'custom',
289
- ...column,
290
- width: col.width || column.width
291
- }
292
- }).filter(col => col)
293
- return left.concat(right)
294
- }
295
-
296
- export function _uid () {
297
- const { table, uid } = this.$props
298
- return uid || table?.uid || ''
299
- }
300
-
301
- export function plain () {
302
- const { plain } = this._attrs
303
- return plain || plain === ''
304
- }
305
-
306
- export function hideHeader () {
307
- const { 'hide-header': hideHeader } = this._attrs
308
- return hideHeader || hideHeader === ''
309
- }
310
-
311
- export function hideTools () {
312
- const { 'hide-tools': hideTools } = this._attrs
313
- return this.plain ? hideTools !== false : (hideTools || hideTools === '')
314
- }
315
-
316
- export function hideSearcher () {
317
- const { 'hide-searcher': hideSearcher } = this._attrs
318
- return this.plain ? hideSearcher !== false : (hideSearcher || hideSearcher === '')
319
- }
320
-
321
- export function hideChart () {
322
- const { 'hide-chart': hideChart } = this._attrs
323
- return this.plain ? hideChart !== false : (hideChart || hideChart === '')
324
- }
325
-
326
- export function hideSettings () {
327
- const { 'hide-settings': hideSettings } = this._attrs
328
- return this.plain ? hideSettings !== false : (hideSettings || hideSettings === '')
329
- }
330
-
331
- export function hideOperates () {
332
- const { 'hide-operates': hideOperates } = this._attrs
333
- return this.plain ? hideOperates !== false : (hideOperates || hideOperates === '')
334
- }
335
-
336
- export function hidePagination () {
337
- const { 'hide-pagination': hidePagination } = this._attrs
338
- return this.plain ? hidePagination !== false : (hidePagination || hidePagination === '')
339
- }
340
-
341
- export function operatesWidth () {
342
- return this._attrs['operates-width'] ?? 150
343
- }
344
-
345
- export function operatesDropdown () {
346
- return this._attrs['operates-dropdown']
347
- }
348
-
349
- export function searcherColumns () {
350
- return this._columns.filter(col => !col.virtual && col.canSearch !== false && (!col.type || !TYPES.includes(col.type)))
351
- }
352
-
353
- export function searcherConfig () {
354
- const config = this.table.searcherConfig ?? this._attrs['searcher-config'] ?? {}
355
- if (config.conditions?.length) {
356
- const props = this._columns.map(col => col.prop)
357
- config.conditions = config.conditions.filter(con => props.includes(con.prop))
358
- }
359
- return config
360
- }
361
-
362
- export function initSettings () {
363
- const settings = this._uid && local.getJson(`Settings[${this._uid}]`, {}) || {}
364
- if (!settings.columns?.length) {
365
- settings.columns = this._columns.filter(col => {
366
- return col.label && (col.prop || col.prop === 0) && !(col.type && TYPES.includes(col.type))
367
- }).map(col => {
368
- const { prop, label, show, hide, width, virtual, fixed } = col
369
- return { prop, label, show, hide, width, virtual, fixed }
370
- })
371
- }
372
- this.settings = settings
373
- }
374
-
375
- export function saveSettings (value) {
376
- Object.assign(this.settings, value)
377
- local.setJson(`Settings[${this._uid}]`, this.settings)
378
- }
379
-
380
- export function calcValue (row, column) {
381
- const { prop } = column
382
- const value = row[prop]
383
- let { format, formatter } = column.tableAttrs || column
384
- if (formatter) return formatter(value, row)
385
- format = Array.isArray(column.options) ? format !== false : format
386
- if (format) {
387
- const formatProp = `_formatted_${prop}`
388
- if (formatProp in row) {
389
- return row[formatProp]
390
- }
391
- }
392
- if (value == undefined) {
393
- if (prop.includes('.') || prop.includes('[')) {
394
- return highdict.get(row, prop, this.defaultValue)
395
- }
396
- return this.defaultValue
397
- }
398
- if (value === '') {
399
- return this.defaultValue
400
- }
401
- return value
402
- }
403
-
404
- export function calcLink (row, column) {
405
- if (column.link) return column.link(row)
406
- return highdict.get(row, column.linkProp || column.prop)
407
- }
408
-
409
- export function calcOverflowTooltip (column) {
410
- if (['index', 'selection', 'expand'].includes(column.type)) {
411
- return false
412
- }
413
- const { showOverflowTooltip } = column.tableAttrs || column
414
- return showOverflowTooltip !== false
415
- }
416
-
417
- export function handleSearch (params) {
418
- this.params = params
419
- this._emit('search', params)
420
- }
421
-
422
- export function handleResetSettings () {
423
- this.saveSettings({})
424
- this.initSettings()
425
- }
426
-
427
- export function handleHeaderDragend (newWidth, oldWidth, column, event) {
428
- const col = this.settings.columns.find(col => col.prop === column.property)
429
- if (col) {
430
- col.width = newWidth
431
- this.saveSettings(this.settings)
432
- }
433
- if (this.onHeaderDragend) {
434
- this.onHeaderDragend(newWidth, oldWidth, column, event)
435
- }
436
- }
437
-
438
- export function handleSelectionChange (rows) {
439
- if (this._selection) {
440
- this._selection.splice(0)
441
- this._selection.push(...rows)
442
- }
443
- if (this.onSelectionChange) {
444
- this.onSelectionChange(rows)
445
- }
446
- }
447
-
448
- export function handleSortChange (params) {
449
- if (this.onSortChange) {
450
- this.onSortChange(params)
451
- } else {
452
- if (Array.isArray(params)) {
453
- this.controller?.handleSortChange?.(params)
454
- } else if (params.column.sortable === 'custom') {
455
- this.controller?.handleSortChange?.(params)
456
- }
457
- }
458
- }
459
-
460
- export function handleCheckedChange (e) {
461
- this.checked = e.target.value * 1
462
- const row = this._data[this.checked]
463
- if (this.table) {
464
- this.table.checked = row
465
- }
466
- if (this.onCheckedChange) {
467
- this.onCheckedChange(row)
468
- }
469
- }
470
-
471
- export function handleCollapseChange (activeNames) {
472
- if (activeNames.length) {
473
- this.isMinus = false
474
- if (!this.useCollapse) {
475
- this._useCollapse = false
476
- }
477
- }
478
- }
479
-
480
- export function handleMinus () {
481
- this.isMinus = !this.isMinus
482
- if (this.isMinus) {
483
- this._useCollapse = true
484
- this.activeNames = []
485
- } else {
486
- this._useCollapse = this.useCollapse
487
- this.activeNames = ['name']
488
- }
489
- }
490
-
491
- export function handleToggleFullscreen () {
492
- this.isFullscreen = !this.isFullscreen
493
- if (this.isFullscreen) {
494
- this.zoom = document.documentElement.style.zoom
495
- document.documentElement.style.zoom = 1
496
- } else {
497
- document.documentElement.style.zoom = this.zoom
498
- }
499
- }
500
-
501
- export function cellClassName (props) {
502
- let classNames = this._attrs['cell-class-name'] ? this._attrs['cell-class-name'](props) : ''
503
- const col = this._visibleColumns[props.columnIndex]
504
- if (col?.tableAttrs?.class) {
505
- const klass = col.tableAttrs.class
506
- if (typeof klass === 'function') {
507
- classNames += ' ' + klass(props)
508
- } else if (typeof klass === 'string') {
509
- classNames += ' ' + klass
510
- }
511
- }
512
- return !classNames ? '' : [...new Set(classNames.split(' '))].join(' ')
513
- }
514
-
515
- export function cellStyle (props) {
516
- const style = this._attrs['cell-style'] ? this._attrs['cell-style'](props) : {}
517
- const col = this._visibleColumns[props.columnIndex]
518
- if (col?.tableAttrs?.style) {
519
- const sty = col.tableAttrs.style
520
- if (typeof sty === 'function') {
521
- Object.assign(style, sty(props))
522
- } else if (typeof sty === 'object') {
523
- Object.assign(style, sty)
524
- }
525
- }
526
- return Object.keys(style) ? style : null
527
- }
528
-
529
- export function calcTagType (scope, column) {
530
- const { tagTypes, prop, options } = column
531
- const value = scope.row[prop]
532
- if (tagTypes) {
533
- if (typeof tagTypes === 'function') {
534
- return tagTypes(value, scope, column)
535
- } else if (typeof tagTypes === 'object') {
536
- return tagTypes[value]
537
- }
538
- } else if (options) {
539
- const op = options.find(o => o[column.value || 'value'] === value)
540
- if (op?.tagType) return op.tagType
541
- }
542
- return value ? 'success' : 'danger'
543
- }
544
-
545
- export function calcTagValue (scope, column) {
546
- const { tagValues, prop, options } = column
547
- const value = scope.row[prop]
548
- if (tagValues) {
549
- if (typeof tagValues === 'function') {
550
- return tagValues(value, scope, column)
551
- } else if (typeof tagValues === 'object') {
552
- return tagValues[value]
553
- }
554
- } else if (options) {
555
- const op = options.find(o => o[column.value || 'value'] === value)
556
- if (op) return op[column.text || 'text']
557
- }
558
- return value
559
- }
560
-
561
- export function canEdit (row) {
562
- return !!(this.onEdit || this._listen['edit']) && (row.editable !== false) && !row.isEditing
563
- }
564
-
565
- export function canSave (row) {
566
- return !!(this.onRowEdit || this._listen['row-edit']) && this.table.isRowEdit && row.isEditing
567
- }
568
-
569
- export function canRowEdit (row) {
570
- return !!(this.onRowEdit || this._listen['row-edit']) && this.table.isRowEdit && row.isEditing
571
- }
572
-
573
- export function canCancelEdit (row) {
574
- return !!(this.onCancelEdit || this._listen['cancel-edit']) && this.table.isRowEdit && row.isEditing
575
- }
576
-
577
- export function canDelete (row) {
578
- return !!(this.onDelete || this._listen['delete']) && row.deletable !== false
579
- }
580
-
581
- export function calcImages (scope, column) {
582
- const value = scope.row[column.prop]
583
- let images = []
584
- if (column.images) {
585
- images = column.images(value, scope.row)
586
- } else {
587
- images = Array.isArray(value) ? value : [value]
588
- }
589
- images = images.filter(ele => ele).map(ele => {
590
- if (typeof ele !== 'object') {
591
- ele = { url: ele, name: ele.split('/').pop() }
592
- }
593
- ele.type ||= getUrlType(ele.url)
594
- ele.icon = column.icons?.[ele.type] ?? getFiletypeIcon(ele.type)
595
- return ele
596
- })
597
- scope._images = images
598
- scope._urls = images.map(ele => ele.url)
599
- scope._image_urls = images.filter(ele => ele.type === 'image').map(ele => ele.url)
600
- return images
601
- }
602
-
603
- export function _emit (event, payload) {
604
- const funcName = 'on' + event.split('-').map(p => p[0].toUpperCase() + p.slice(1)).join('')
605
- if (this[funcName]) {
606
- this[funcName](payload)
607
- } else if (this._listen[event]) {
608
- this._listen[event](payload)
609
- } else {
610
- this.$emit(event, payload)
611
- }
612
- }
613
-
614
- export function $route () {
615
- if (this.zoom !== 1) {
616
- document.documentElement.style.zoom = this.zoom
617
- }
618
- }
619
-
620
- export default {
621
- props,
622
- emits,
623
- computed: {
624
- _attrs,
625
- domids,
626
- elTableAttrs,
627
- _loading,
628
- _data,
629
- _columns,
630
- _doms,
631
- _query,
632
- _total,
633
- _finished,
634
- _selection,
635
- _actions,
636
- _chartHeight,
637
- _chartOption,
638
- _onKeywordsSearch,
639
- _onSearch,
640
- _onAdd,
641
- _onExport,
642
- _onSearchExport,
643
- _onImport,
644
- _onMultiDelete,
645
- _onLoad,
646
- _listen,
647
- _visibleColumns,
648
- _uid,
649
- plain,
650
- hideHeader,
651
- hideTools,
652
- hideSearcher,
653
- hideChart,
654
- hideSettings,
655
- hideOperates,
656
- hidePagination,
657
- operatesWidth,
658
- operatesDropdown,
659
- searcherColumns,
660
- searcherConfig
661
- },
662
- watch: {
663
- $route
664
- },
665
- methods: {
666
- initSettings,
667
- saveSettings,
668
- calcValue,
669
- calcLink,
670
- calcOverflowTooltip,
671
- handleSearch,
672
- handleResetSettings,
673
- handleHeaderDragend,
674
- handleSelectionChange,
675
- handleSortChange,
676
- handleCheckedChange,
677
- handleCollapseChange,
678
- handleMinus,
679
- handleToggleFullscreen,
680
- cellClassName,
681
- cellStyle,
682
- calcTagType,
683
- calcTagValue,
684
- canEdit,
685
- canSave,
686
- canRowEdit,
687
- canCancelEdit,
688
- canDelete,
689
- calcImages,
690
- _emit
691
- }
692
- }
1
+ const a51_0x4a70d5=a51_0x1dd9;(function(_0x527854,_0x54bf93){const _0x191dc6=a51_0x1dd9,_0x2c4810=_0x527854();while(!![]){try{const _0x3ed6d9=parseInt(_0x191dc6(0x25c))/0x1+-parseInt(_0x191dc6(0x25f))/0x2*(-parseInt(_0x191dc6(0x1fc))/0x3)+parseInt(_0x191dc6(0x22a))/0x4+parseInt(_0x191dc6(0x1e3))/0x5+parseInt(_0x191dc6(0x240))/0x6+parseInt(_0x191dc6(0x1d7))/0x7+-parseInt(_0x191dc6(0x1ca))/0x8;if(_0x3ed6d9===_0x54bf93)break;else _0x2c4810['push'](_0x2c4810['shift']());}catch(_0x272f7b){_0x2c4810['push'](_0x2c4810['shift']());}}}(a51_0x52ac,0x7e8ee));function a51_0x52ac(){const _0x1b5af2=['left','saveSettings','finished','checked','success','_formatted_','onEdit','string','getJson','value','listen','$props','keywords-search','routeDoms','isInfinite','includes','object','delete','plain','2083086kpOHDD','cancel-edit','columns','columnIndex','name','color','_urls','add','assign','isArray','chartOption','push','split','deletable','editable','onRowEdit','load','controller','replaceAll','danger','activeNames','_selection','documentElement','handleSortChange','text','isMinus','cell-style','prop','565120RsgSkh','virtual','forEach','1606606vZlLQK','attrs','table','total','operates-dropdown','max','_attrs','onMultiDelete','onAdd','settings','length','images','22514464PgrjsO','onDelete','onSearch','open','#eb6f6f','label','search','isFullscreen','#07c160','mobile','_data','concat','_images','3641274agXbTJ','_uid','icons','actions','import','keys','-btn','useCollapse','acl','innerHeight','onExport','property','611685hIVirg','export','map','tableAttrs','splice','link','multi-delete','query','onKeywordsSearch','class','onSortChange','radio','platform','_emit','_columns','row','$attrs','join','loading','_doms','edit','expand','setJson','doms','isRowEdit','3EQovyl','style','conditions','_useCollapse','_listen','width','path','isEditing','index','url','cell-class-name','endsWith','type','image','defaultValue','onSelectionChange','onImport','filter','cellStyle','search-export','TableAttrs','slice','get','zoom','row-edit','linkProp','onHeaderDragend','Settings[','find','handle','$refs','custom','handler','onCheckedChange','$route','$store','column','toUpperCase','onSearchExport','function','selection','hideSearcher','_visibleColumns','domid','domids','_index','3898268WSikLz','pop','initSettings'];a51_0x52ac=function(){return _0x1b5af2;};return a51_0x52ac();}import{getUrlType,getFiletypeIcon}from'../../utils/funcs.js';const {highdict}=StardustJs,{storage}=StardustBrowser,{local}=storage,TYPES=[a51_0x4a70d5(0x204),a51_0x4a70d5(0x224),a51_0x4a70d5(0x1f8),a51_0x4a70d5(0x1ee),'_index'];export function props(){return{'table':Object,'loading':Boolean,'data':Array,'columns':Array,'query':Object,'total':Number,'finished':Boolean,'selection':Array,'chartHeight':String,'chartOption':Object,'tref':Object,'defaultValue':'','slotAll':{'type':Boolean,'default':![]},'onSelectionChange':Function,'onSortChange':Function,'onHeaderDragend':Function,'onCheckedChange':Function,'onKeywordsSearch':Function,'onSearch':Function,'onAdd':Function,'onEdit':Function,'onDelete':Function,'onRowEdit':Function,'onCancelEdit':Function,'onExport':Function,'onSearchExport':Function,'onImport':Function,'onMultiDelete':Function,'onLoad':Function,'controller':Object,'listen':{'type':String,'default':'*'},'actions':{'type':Array,'default':()=>[]},'title':{'type':String,'default':'表格'},'useCollapse':{'type':Boolean,'default':![]},'uid':String,'doms':Array};}export function emits(){const _0x14918c=a51_0x4a70d5;return['update:tref',_0x14918c(0x1d0),_0x14918c(0x247),_0x14918c(0x1f7),'row-edit',_0x14918c(0x241),_0x14918c(0x23e),_0x14918c(0x1e4),_0x14918c(0x20f),'load'];}export function _attrs(){const _0x1c9db6=a51_0x4a70d5,_0x2a565b=this['$'][_0x1c9db6(0x260)]['platform']||(window['isMobile']?_0x1c9db6(0x1d3):'pc'),_0x243c6a=_0x2a565b+_0x1c9db6(0x210),_0xf24a76={};if(_0x243c6a in this)Object[_0x1c9db6(0x248)](_0xf24a76,this[_0x243c6a]);return Object[_0x1c9db6(0x248)](_0xf24a76,this['$attrs']),_0xf24a76;}export function domids(){const _0x58deba=a51_0x4a70d5,_0x2f974b={},_0x2375d=[_0x58deba(0x239),_0x58deba(0x1d0),_0x58deba(0x247),'multi-delete','export',_0x58deba(0x20f),_0x58deba(0x1db),_0x58deba(0x1f7),_0x58deba(0x214),_0x58deba(0x241),_0x58deba(0x23e),'operates'];return _0x2375d[_0x58deba(0x25e)](_0x2336d3=>_0x2f974b[_0x2336d3]=_0x2336d3),{..._0x2f974b,...this['$attrs'][_0x58deba(0x228)]};}export function elTableAttrs(){const _0x5b5182=a51_0x4a70d5,_0x66ca4=Object[_0x5b5182(0x1dc)](this[_0x5b5182(0x265)])[_0x5b5182(0x20d)](_0x16b8f6=>!_0x16b8f6[_0x5b5182(0x207)](_0x5b5182(0x1dd))),_0x133d85={};return _0x66ca4[_0x5b5182(0x25e)](_0x13f6b3=>_0x133d85[_0x13f6b3]=this[_0x5b5182(0x265)][_0x13f6b3]),delete _0x133d85[_0x5b5182(0x1ef)],{'border':!![],'stripe':!![],'fit':!![],'highlight-current-row':!![],..._0x133d85,'data':this[_0x5b5182(0x1d4)],'cell-class-name':this['cellClassName'],'cell-style':this[_0x5b5182(0x20e)]};}export function _loading(){const _0x4c72b7=a51_0x4a70d5,{table:_0x131498,loading:_0x5e57c6}=this[_0x4c72b7(0x238)];return _0x5e57c6||_0x131498?.[_0x4c72b7(0x1f5)];}export function _data(){const _0x44d4b2=a51_0x4a70d5,{table:_0x778053,data:_0x24ac08}=this[_0x44d4b2(0x238)];return _0x24ac08||_0x778053?.['list']||[];}export function _columns(){const _0x362208=a51_0x4a70d5,{$props:_0x1f5e53,_query:_0xd39792}=this,{table:_0x8882d3,columns:_0x44cf0e}=_0x1f5e53,_0x228590=_0x44cf0e||_0x8882d3?.[_0x362208(0x242)]||[],_0x335aae=_0x228590[_0x362208(0x1e5)](_0x93d113=>_0x93d113[_0x362208(0x1e6)]?.[_0x362208(0x227)]);return _0x228590[_0x362208(0x20d)]((_0x2f0f1b,_0x26e80f)=>!_0x335aae[_0x26e80f]||this[_0x362208(0x1f6)][_0x362208(0x23c)](_0x335aae[_0x26e80f]))[_0x362208(0x1e5)](_0x23b25b=>{const _0x5e3ab6=_0x362208;if(_0x23b25b[_0x5e3ab6(0x208)]===_0x5e3ab6(0x229))return Object[_0x5e3ab6(0x248)]({'width':0x3c,'label':'序号','index'(_0x387eba){const _0xd83d29=_0x5e3ab6,{page:_0x4cfdb6,limit:_0x2aeb4d}=_0xd39792;return(_0x8882d3[_0xd83d29(0x23b)]?0x0:(_0x4cfdb6-0x1)*_0x2aeb4d)+_0x387eba+0x1;}},_0x23b25b,{'type':'index'});else{if(_0x23b25b[_0x5e3ab6(0x208)]===_0x5e3ab6(0x1ee))return Object['assign']({'width':0x3c,'label':'单选'},_0x23b25b);}return Object[_0x5e3ab6(0x248)]({},_0x23b25b,_0x23b25b[_0x5e3ab6(0x1e6)]);});}export function _doms(){const _0x400461=a51_0x4a70d5;return this[_0x400461(0x1fa)]||this[_0x400461(0x21f)]?.[_0x400461(0x1df)]?.['routeDoms']||[];}export function _query(){const _0x16be9c=a51_0x4a70d5,{table:_0x507b38,query:_0x175349}=this['$props'];return _0x175349||_0x507b38?.[_0x16be9c(0x1ea)];}export function _total(){const _0x177d83=a51_0x4a70d5,{table:_0x420546,total:_0x5464c0}=this[_0x177d83(0x238)];return _0x5464c0||_0x420546?.[_0x177d83(0x262)];}export function _finished(){const _0x39fd6b=a51_0x4a70d5,{table:_0x526006,finished:_0x2fc96c}=this[_0x39fd6b(0x238)];return _0x2fc96c??_0x526006?.[_0x39fd6b(0x22f)];}export function _selection(){const _0x30fd6a=a51_0x4a70d5,{table:_0x15ebfb,selection:_0x4455e4}=this[_0x30fd6a(0x238)];return _0x4455e4||_0x15ebfb?.[_0x30fd6a(0x224)];}export function _actions(){const _0x292d91=a51_0x4a70d5,_0x4d8352=this[_0x292d91(0x21e)]?.[_0x292d91(0x202)]['slice'](0x1)[_0x292d91(0x252)]('/',':'),_0xb73aa9=this['$store']?.['acl']?.[_0x292d91(0x23a)]||[];let _0x339bab=this['$attrs'][_0x292d91(0x1ef)]==='pc'?[]:[{'name':'编辑','color':_0x292d91(0x1d2),'domid':_0x292d91(0x1f7)},{'name':'删除','color':_0x292d91(0x1ce),'domid':_0x292d91(0x23e)}];return _0x339bab=_0x339bab[_0x292d91(0x1d5)](this[_0x292d91(0x1da)]),_0x339bab[_0x292d91(0x25e)](_0x209f49=>{const _0x179973=_0x292d91;if(this[_0x179973(0x1f3)]['platform']==='pc'){if(_0x209f49['type'])delete _0x209f49[_0x179973(0x245)];}typeof _0x209f49[_0x179973(0x21c)]===_0x179973(0x234)&&(_0x209f49[_0x179973(0x21c)]=this[_0x179973(0x251)][_0x209f49['handler']]);}),_0x339bab[_0x292d91(0x20d)](_0x3e87bc=>{const _0x44b7dd=_0x292d91;return!_0x3e87bc[_0x44b7dd(0x227)]||_0xb73aa9?.['includes'](this[_0x44b7dd(0x228)][_0x3e87bc['domid']]??_0x3e87bc[_0x44b7dd(0x227)]);});}export function _chartHeight(){const _0xcf974f=a51_0x4a70d5,{table:_0x159f2d,chartHeight:_0x534b35}=this['$props'];return _0x534b35||_0x159f2d?.['chartHeight']||Math[_0xcf974f(0x264)](window[_0xcf974f(0x1e0)]-0x12c,0x168)+'px';}export function _chartOption(){const _0x21670f=a51_0x4a70d5,{table:_0x4d8069,chartOption:_0x7abfa0}=this[_0x21670f(0x238)];return{...this[_0x21670f(0x265)][_0x21670f(0x24a)],..._0x4d8069?.['chartOption'],..._0x7abfa0};}export function _onKeywordsSearch(){const _0x5f3b15=a51_0x4a70d5;if(this[_0x5f3b15(0x1eb)]||this['_listen']['keywords-search'])return(..._0x3a781e)=>this[_0x5f3b15(0x1f0)](_0x5f3b15(0x239),..._0x3a781e);return null;}export function _onSearch(){const _0x550d1c=a51_0x4a70d5;if(this[_0x550d1c(0x225)])return this['onSearch']||this[_0x550d1c(0x200)]['search']?()=>this[_0x550d1c(0x1f0)](_0x550d1c(0x1d0)):null;if(this[_0x550d1c(0x1cc)]||this[_0x550d1c(0x200)][_0x550d1c(0x1d0)])return _0x11d5f4=>{const _0x58bae3=_0x550d1c;_0x11d5f4?this[_0x58bae3(0x1f0)](_0x58bae3(0x1d0)):this[_0x58bae3(0x21a)]['searcher'][_0x58bae3(0x1cd)]();};return null;}export function _onAdd(){const _0x337645=a51_0x4a70d5;return this[_0x337645(0x267)]||this[_0x337645(0x200)][_0x337645(0x247)]?()=>this[_0x337645(0x1f0)](_0x337645(0x247)):null;}export function _onExport(){const _0x17a0bd=a51_0x4a70d5;return this[_0x17a0bd(0x1e1)]||this['_listen'][_0x17a0bd(0x1e4)]?()=>this[_0x17a0bd(0x1f0)](_0x17a0bd(0x1e4)):null;}export function _onSearchExport(){const _0x5056d0=a51_0x4a70d5;return this[_0x5056d0(0x222)]||this[_0x5056d0(0x200)][_0x5056d0(0x20f)]?()=>this[_0x5056d0(0x1f0)](_0x5056d0(0x20f)):null;}export function _onImport(){const _0x3fbb02=a51_0x4a70d5;return this[_0x3fbb02(0x20c)]||this[_0x3fbb02(0x200)]['import']?()=>this[_0x3fbb02(0x1f0)](_0x3fbb02(0x1db)):null;}export function _onMultiDelete(){const _0x1938ae=a51_0x4a70d5;return this[_0x1938ae(0x266)]||this[_0x1938ae(0x200)][_0x1938ae(0x1e9)]?()=>this[_0x1938ae(0x1f0)](_0x1938ae(0x1e9)):null;}export function _onLoad(){const _0x9b6844=a51_0x4a70d5;return this['onLoad']||this[_0x9b6844(0x200)][_0x9b6844(0x250)]?()=>this[_0x9b6844(0x1f0)](_0x9b6844(0x250)):()=>{};}export function _listen(){const _0x57cbe2=a51_0x4a70d5;if(!this[_0x57cbe2(0x251)]||!this[_0x57cbe2(0x237)]?.['length'])return{};let _0x540b82=this[_0x57cbe2(0x237)][_0x57cbe2(0x24c)](',');_0x540b82['includes']('*')&&(_0x540b82=[...new Set([..._0x540b82,_0x57cbe2(0x239),'search','add',_0x57cbe2(0x1e9),_0x57cbe2(0x1e4),'search-export',_0x57cbe2(0x1db),_0x57cbe2(0x1f7),_0x57cbe2(0x214),_0x57cbe2(0x241),'delete'])]);const _0x30c81f={};return _0x540b82[_0x57cbe2(0x25e)](_0x5dd31c=>{const _0x2d962c=_0x57cbe2,_0x13e5c9=_0x2d962c(0x219)+_0x5dd31c[_0x2d962c(0x24c)]('-')[_0x2d962c(0x1e5)](_0x46699e=>_0x46699e[0x0][_0x2d962c(0x221)]()+_0x46699e[_0x2d962c(0x211)](0x1))['join']('');_0x30c81f[_0x5dd31c]=this[_0x2d962c(0x251)][_0x13e5c9];}),_0x30c81f;}export function _visibleColumns(){const _0x2157a0=a51_0x4a70d5,_0xe7a69c=this[_0x2157a0(0x1f1)][_0x2157a0(0x20d)](_0x378524=>_0x378524['type']&&TYPES['includes'](_0x378524[_0x2157a0(0x208)])||_0x378524['fixed']===_0x2157a0(0x22d)),_0x110ae5=this[_0x2157a0(0x1c7)][_0x2157a0(0x242)]['filter'](_0x144cf7=>!_0x144cf7['hide']&&_0x144cf7['fixed']!=='left')[_0x2157a0(0x1e5)](_0x2d7075=>{const _0x381bfb=_0x2157a0,_0x14e3c9=this['_columns'][_0x381bfb(0x218)](_0x2678fc=>_0x2678fc['prop']===_0x2d7075['prop']);if(!_0x14e3c9)return;return{'sortable':'custom',..._0x14e3c9,'width':_0x2d7075[_0x381bfb(0x201)]||_0x14e3c9[_0x381bfb(0x201)]};})['filter'](_0x19ee4e=>_0x19ee4e);return _0xe7a69c[_0x2157a0(0x1d5)](_0x110ae5);}export function _uid(){const _0x4f8b27=a51_0x4a70d5,{table:_0xf96a62,uid:_0x3b0970}=this[_0x4f8b27(0x238)];return _0x3b0970||_0xf96a62?.['uid']||'';}export function plain(){const _0x420efa=a51_0x4a70d5,{plain:_0x4b473d}=this[_0x420efa(0x265)];return _0x4b473d||_0x4b473d==='';}export function hideHeader(){const _0x366d17=a51_0x4a70d5,{'hide-header':_0xd01483}=this[_0x366d17(0x265)];return _0xd01483||_0xd01483==='';}export function hideTools(){const _0x592482=a51_0x4a70d5,{'hide-tools':_0xa61c47}=this[_0x592482(0x265)];return this[_0x592482(0x23f)]?_0xa61c47!==![]:_0xa61c47||_0xa61c47==='';}export function hideSearcher(){const _0x5e0d1f=a51_0x4a70d5,{'hide-searcher':_0x3507b5}=this['_attrs'];return this[_0x5e0d1f(0x23f)]?_0x3507b5!==![]:_0x3507b5||_0x3507b5==='';}export function hideChart(){const {'hide-chart':_0x34cb2a}=this['_attrs'];return this['plain']?_0x34cb2a!==![]:_0x34cb2a||_0x34cb2a==='';}export function hideSettings(){const _0xccbae6=a51_0x4a70d5,{'hide-settings':_0x369113}=this['_attrs'];return this[_0xccbae6(0x23f)]?_0x369113!==![]:_0x369113||_0x369113==='';}export function hideOperates(){const _0x56d234=a51_0x4a70d5,{'hide-operates':_0x19eca4}=this[_0x56d234(0x265)];return this[_0x56d234(0x23f)]?_0x19eca4!==![]:_0x19eca4||_0x19eca4==='';}export function hidePagination(){const _0x15d1d3=a51_0x4a70d5,{'hide-pagination':_0x532575}=this['_attrs'];return this[_0x15d1d3(0x23f)]?_0x532575!==![]:_0x532575||_0x532575==='';}export function operatesWidth(){return this['_attrs']['operates-width']??0x96;}export function operatesDropdown(){const _0x25dd3c=a51_0x4a70d5;return this[_0x25dd3c(0x265)][_0x25dd3c(0x263)];}export function searcherColumns(){const _0x23d21c=a51_0x4a70d5;return this[_0x23d21c(0x1f1)]['filter'](_0x18c7ab=>!_0x18c7ab[_0x23d21c(0x25d)]&&_0x18c7ab['canSearch']!==![]&&(!_0x18c7ab[_0x23d21c(0x208)]||!TYPES[_0x23d21c(0x23c)](_0x18c7ab[_0x23d21c(0x208)])));}export function searcherConfig(){const _0x47c8dd=a51_0x4a70d5,_0x343648=this[_0x47c8dd(0x261)]['searcherConfig']??this[_0x47c8dd(0x265)]['searcher-config']??{};if(_0x343648[_0x47c8dd(0x1fe)]?.[_0x47c8dd(0x1c8)]){const _0x26fe82=this['_columns'][_0x47c8dd(0x1e5)](_0x517365=>_0x517365[_0x47c8dd(0x25b)]);_0x343648[_0x47c8dd(0x1fe)]=_0x343648[_0x47c8dd(0x1fe)][_0x47c8dd(0x20d)](_0x13e6c1=>_0x26fe82['includes'](_0x13e6c1[_0x47c8dd(0x25b)]));}return _0x343648;}function a51_0x1dd9(_0x2153a6,_0x31fa64){const _0x52ac7=a51_0x52ac();return a51_0x1dd9=function(_0x1dd993,_0x54d39d){_0x1dd993=_0x1dd993-0x1c7;let _0x2b941f=_0x52ac7[_0x1dd993];return _0x2b941f;},a51_0x1dd9(_0x2153a6,_0x31fa64);}export function initSettings(){const _0x479594=a51_0x4a70d5,_0x3bad06=this[_0x479594(0x1d8)]&&local[_0x479594(0x235)](_0x479594(0x217)+this['_uid']+']',{})||{};!_0x3bad06['columns']?.[_0x479594(0x1c8)]&&(_0x3bad06[_0x479594(0x242)]=this[_0x479594(0x1f1)][_0x479594(0x20d)](_0xff1fb1=>{const _0x460298=_0x479594;return _0xff1fb1[_0x460298(0x1cf)]&&(_0xff1fb1[_0x460298(0x25b)]||_0xff1fb1[_0x460298(0x25b)]===0x0)&&!(_0xff1fb1[_0x460298(0x208)]&&TYPES[_0x460298(0x23c)](_0xff1fb1[_0x460298(0x208)]));})[_0x479594(0x1e5)](_0x56ef76=>{const {prop:_0x2ea451,label:_0x4abbc9,show:_0x66b8ea,hide:_0x324478,width:_0x3d1aa6,virtual:_0xc1759b,fixed:_0x3d8ee5}=_0x56ef76;return{'prop':_0x2ea451,'label':_0x4abbc9,'show':_0x66b8ea,'hide':_0x324478,'width':_0x3d1aa6,'virtual':_0xc1759b,'fixed':_0x3d8ee5};})),this[_0x479594(0x1c7)]=_0x3bad06;}export function saveSettings(_0x349572){const _0x1f9862=a51_0x4a70d5;Object[_0x1f9862(0x248)](this[_0x1f9862(0x1c7)],_0x349572),local[_0x1f9862(0x1f9)]('Settings['+this[_0x1f9862(0x1d8)]+']',this['settings']);}export function calcValue(_0x1e7206,_0x37d2a8){const _0x4162ed=a51_0x4a70d5,{prop:_0x11943a}=_0x37d2a8,_0x5e2a2d=_0x1e7206[_0x11943a];let {format:_0x23384d,formatter:_0xf4a065}=_0x37d2a8[_0x4162ed(0x1e6)]||_0x37d2a8;if(_0xf4a065)return _0xf4a065(_0x5e2a2d,_0x1e7206);_0x23384d=Array[_0x4162ed(0x249)](_0x37d2a8['options'])?_0x23384d!==![]:_0x23384d;if(_0x23384d){const _0x36649d=_0x4162ed(0x232)+_0x11943a;if(_0x36649d in _0x1e7206)return _0x1e7206[_0x36649d];}if(_0x5e2a2d==undefined){if(_0x11943a[_0x4162ed(0x23c)]('.')||_0x11943a['includes']('['))return highdict[_0x4162ed(0x212)](_0x1e7206,_0x11943a,this['defaultValue']);return this[_0x4162ed(0x20a)];}if(_0x5e2a2d==='')return this[_0x4162ed(0x20a)];return _0x5e2a2d;}export function calcLink(_0x41178a,_0x517de0){const _0x529595=a51_0x4a70d5;if(_0x517de0[_0x529595(0x1e8)])return _0x517de0[_0x529595(0x1e8)](_0x41178a);return highdict[_0x529595(0x212)](_0x41178a,_0x517de0[_0x529595(0x215)]||_0x517de0[_0x529595(0x25b)]);}export function calcOverflowTooltip(_0x1149f3){const _0x58d6e2=a51_0x4a70d5;if(['index',_0x58d6e2(0x224),_0x58d6e2(0x1f8)]['includes'](_0x1149f3[_0x58d6e2(0x208)]))return![];const {showOverflowTooltip:_0x598d4b}=_0x1149f3[_0x58d6e2(0x1e6)]||_0x1149f3;return _0x598d4b!==![];}export function handleSearch(_0x2825fa){const _0x5b141c=a51_0x4a70d5;this['params']=_0x2825fa,this[_0x5b141c(0x1f0)](_0x5b141c(0x1d0),_0x2825fa);}export function handleResetSettings(){const _0x1e091f=a51_0x4a70d5;this[_0x1e091f(0x22e)]({}),this[_0x1e091f(0x22c)]();}export function handleHeaderDragend(_0x327c5d,_0x78d46e,_0x4e4ed3,_0x45f310){const _0xe201e0=a51_0x4a70d5,_0x396f4a=this[_0xe201e0(0x1c7)][_0xe201e0(0x242)][_0xe201e0(0x218)](_0x581a22=>_0x581a22[_0xe201e0(0x25b)]===_0x4e4ed3[_0xe201e0(0x1e2)]);_0x396f4a&&(_0x396f4a[_0xe201e0(0x201)]=_0x327c5d,this[_0xe201e0(0x22e)](this[_0xe201e0(0x1c7)])),this[_0xe201e0(0x216)]&&this[_0xe201e0(0x216)](_0x327c5d,_0x78d46e,_0x4e4ed3,_0x45f310);}export function handleSelectionChange(_0x4b24d9){const _0xe0e9eb=a51_0x4a70d5;this[_0xe0e9eb(0x255)]&&(this[_0xe0e9eb(0x255)][_0xe0e9eb(0x1e7)](0x0),this[_0xe0e9eb(0x255)][_0xe0e9eb(0x24b)](..._0x4b24d9)),this['onSelectionChange']&&this[_0xe0e9eb(0x20b)](_0x4b24d9);}export function handleSortChange(_0x499b9a){const _0x247cb9=a51_0x4a70d5;if(this[_0x247cb9(0x1ed)])this[_0x247cb9(0x1ed)](_0x499b9a);else{if(Array[_0x247cb9(0x249)](_0x499b9a))this[_0x247cb9(0x251)]?.[_0x247cb9(0x257)]?.(_0x499b9a);else _0x499b9a[_0x247cb9(0x220)]['sortable']===_0x247cb9(0x21b)&&this[_0x247cb9(0x251)]?.[_0x247cb9(0x257)]?.(_0x499b9a);}}export function handleCheckedChange(_0x2d43c0){const _0x28fc5c=a51_0x4a70d5;this['checked']=_0x2d43c0['target']['value']*0x1;const _0x28c855=this['_data'][this[_0x28fc5c(0x230)]];this[_0x28fc5c(0x261)]&&(this['table'][_0x28fc5c(0x230)]=_0x28c855),this['onCheckedChange']&&this[_0x28fc5c(0x21d)](_0x28c855);}export function handleCollapseChange(_0x432d60){const _0x3d6410=a51_0x4a70d5;_0x432d60['length']&&(this[_0x3d6410(0x259)]=![],!this[_0x3d6410(0x1de)]&&(this[_0x3d6410(0x1ff)]=![]));}export function handleMinus(){const _0x30a794=a51_0x4a70d5;this[_0x30a794(0x259)]=!this['isMinus'],this[_0x30a794(0x259)]?(this[_0x30a794(0x1ff)]=!![],this[_0x30a794(0x254)]=[]):(this[_0x30a794(0x1ff)]=this[_0x30a794(0x1de)],this[_0x30a794(0x254)]=[_0x30a794(0x244)]);}export function handleToggleFullscreen(){const _0x257403=a51_0x4a70d5;this[_0x257403(0x1d1)]=!this['isFullscreen'],this['isFullscreen']?(this[_0x257403(0x213)]=document[_0x257403(0x256)][_0x257403(0x1fd)][_0x257403(0x213)],document[_0x257403(0x256)]['style']['zoom']=0x1):document[_0x257403(0x256)][_0x257403(0x1fd)][_0x257403(0x213)]=this[_0x257403(0x213)];}export function cellClassName(_0x594976){const _0x1c514e=a51_0x4a70d5;let _0x833bff=this[_0x1c514e(0x265)][_0x1c514e(0x206)]?this['_attrs']['cell-class-name'](_0x594976):'';const _0x485e2b=this[_0x1c514e(0x226)][_0x594976[_0x1c514e(0x243)]];if(_0x485e2b?.[_0x1c514e(0x1e6)]?.[_0x1c514e(0x1ec)]){const _0x14e066=_0x485e2b['tableAttrs'][_0x1c514e(0x1ec)];if(typeof _0x14e066==='function')_0x833bff+='\x20'+_0x14e066(_0x594976);else typeof _0x14e066==='string'&&(_0x833bff+='\x20'+_0x14e066);}return!_0x833bff?'':[...new Set(_0x833bff['split']('\x20'))][_0x1c514e(0x1f4)]('\x20');}export function cellStyle(_0x4b5174){const _0x1d9fa2=a51_0x4a70d5,_0x2e762f=this['_attrs']['cell-style']?this[_0x1d9fa2(0x265)][_0x1d9fa2(0x25a)](_0x4b5174):{},_0x526897=this[_0x1d9fa2(0x226)][_0x4b5174[_0x1d9fa2(0x243)]];if(_0x526897?.[_0x1d9fa2(0x1e6)]?.[_0x1d9fa2(0x1fd)]){const _0x25e4f8=_0x526897[_0x1d9fa2(0x1e6)][_0x1d9fa2(0x1fd)];if(typeof _0x25e4f8==='function')Object[_0x1d9fa2(0x248)](_0x2e762f,_0x25e4f8(_0x4b5174));else typeof _0x25e4f8===_0x1d9fa2(0x23d)&&Object[_0x1d9fa2(0x248)](_0x2e762f,_0x25e4f8);}return Object[_0x1d9fa2(0x1dc)](_0x2e762f)?_0x2e762f:null;}export function calcTagType(_0x1ba1a0,_0x4357c8){const _0x739fb2=a51_0x4a70d5,{tagTypes:_0x218b19,prop:_0x39dfd4,options:_0x5349e3}=_0x4357c8,_0x123d5d=_0x1ba1a0['row'][_0x39dfd4];if(_0x218b19){if(typeof _0x218b19===_0x739fb2(0x223))return _0x218b19(_0x123d5d,_0x1ba1a0,_0x4357c8);else{if(typeof _0x218b19===_0x739fb2(0x23d))return _0x218b19[_0x123d5d];}}else{if(_0x5349e3){const _0x3c780c=_0x5349e3[_0x739fb2(0x218)](_0x50ebc8=>_0x50ebc8[_0x4357c8[_0x739fb2(0x236)]||'value']===_0x123d5d);if(_0x3c780c?.['tagType'])return _0x3c780c['tagType'];}}return _0x123d5d?_0x739fb2(0x231):_0x739fb2(0x253);}export function calcTagValue(_0x2972d7,_0x2f75d9){const _0x463d87=a51_0x4a70d5,{tagValues:_0x1d1719,prop:_0x3d677a,options:_0x2921b6}=_0x2f75d9,_0x4cdd93=_0x2972d7[_0x463d87(0x1f2)][_0x3d677a];if(_0x1d1719){if(typeof _0x1d1719===_0x463d87(0x223))return _0x1d1719(_0x4cdd93,_0x2972d7,_0x2f75d9);else{if(typeof _0x1d1719===_0x463d87(0x23d))return _0x1d1719[_0x4cdd93];}}else{if(_0x2921b6){const _0x463b1d=_0x2921b6[_0x463d87(0x218)](_0xd8ff5a=>_0xd8ff5a[_0x2f75d9['value']||'value']===_0x4cdd93);if(_0x463b1d)return _0x463b1d[_0x2f75d9[_0x463d87(0x258)]||_0x463d87(0x258)];}}return _0x4cdd93;}export function canEdit(_0xef0ea7){const _0x292978=a51_0x4a70d5;return!!(this[_0x292978(0x233)]||this[_0x292978(0x200)]['edit'])&&_0xef0ea7[_0x292978(0x24e)]!==![]&&!_0xef0ea7[_0x292978(0x203)];}export function canSave(_0x505afe){const _0x7adb6a=a51_0x4a70d5;return!!(this[_0x7adb6a(0x24f)]||this[_0x7adb6a(0x200)]['row-edit'])&&this[_0x7adb6a(0x261)][_0x7adb6a(0x1fb)]&&_0x505afe[_0x7adb6a(0x203)];}export function canRowEdit(_0x24f610){const _0x4ccb22=a51_0x4a70d5;return!!(this[_0x4ccb22(0x24f)]||this['_listen'][_0x4ccb22(0x214)])&&this[_0x4ccb22(0x261)][_0x4ccb22(0x1fb)]&&_0x24f610[_0x4ccb22(0x203)];}export function canCancelEdit(_0x3f9a1f){const _0x184263=a51_0x4a70d5;return!!(this['onCancelEdit']||this[_0x184263(0x200)][_0x184263(0x241)])&&this[_0x184263(0x261)][_0x184263(0x1fb)]&&_0x3f9a1f[_0x184263(0x203)];}export function canDelete(_0x5c6118){const _0x1abf22=a51_0x4a70d5;return!!(this[_0x1abf22(0x1cb)]||this[_0x1abf22(0x200)][_0x1abf22(0x23e)])&&_0x5c6118[_0x1abf22(0x24d)]!==![];}export function calcImages(_0x404979,_0x3c231c){const _0x21a065=a51_0x4a70d5,_0x475eb4=_0x404979[_0x21a065(0x1f2)][_0x3c231c[_0x21a065(0x25b)]];let _0x4ed238=[];return _0x3c231c[_0x21a065(0x1c9)]?_0x4ed238=_0x3c231c[_0x21a065(0x1c9)](_0x475eb4,_0x404979['row']):_0x4ed238=Array['isArray'](_0x475eb4)?_0x475eb4:[_0x475eb4],_0x4ed238=_0x4ed238['filter'](_0x1b0066=>_0x1b0066)['map'](_0x20c49f=>{const _0x5563ce=_0x21a065;return typeof _0x20c49f!==_0x5563ce(0x23d)&&(_0x20c49f={'url':_0x20c49f,'name':_0x20c49f[_0x5563ce(0x24c)]('/')[_0x5563ce(0x22b)]()}),_0x20c49f['type']||=getUrlType(_0x20c49f[_0x5563ce(0x205)]),_0x20c49f['icon']=_0x3c231c[_0x5563ce(0x1d9)]?.[_0x20c49f[_0x5563ce(0x208)]]??getFiletypeIcon(_0x20c49f[_0x5563ce(0x208)]),_0x20c49f;}),_0x404979[_0x21a065(0x1d6)]=_0x4ed238,_0x404979[_0x21a065(0x246)]=_0x4ed238[_0x21a065(0x1e5)](_0x555559=>_0x555559[_0x21a065(0x205)]),_0x404979['_image_urls']=_0x4ed238[_0x21a065(0x20d)](_0x171ed1=>_0x171ed1[_0x21a065(0x208)]===_0x21a065(0x209))[_0x21a065(0x1e5)](_0x1034b7=>_0x1034b7[_0x21a065(0x205)]),_0x4ed238;}export function _emit(_0xb52116,_0x36481c){const _0x582c6d=a51_0x4a70d5,_0x263ec2='on'+_0xb52116[_0x582c6d(0x24c)]('-')[_0x582c6d(0x1e5)](_0x580441=>_0x580441[0x0][_0x582c6d(0x221)]()+_0x580441[_0x582c6d(0x211)](0x1))['join']('');if(this[_0x263ec2])this[_0x263ec2](_0x36481c);else this[_0x582c6d(0x200)][_0xb52116]?this['_listen'][_0xb52116](_0x36481c):this['$emit'](_0xb52116,_0x36481c);}export function $route(){const _0x3d70c4=a51_0x4a70d5;this['zoom']!==0x1&&(document['documentElement'][_0x3d70c4(0x1fd)]['zoom']=this[_0x3d70c4(0x213)]);}export default{'props':props,'emits':emits,'computed':{'_attrs':_attrs,'domids':domids,'elTableAttrs':elTableAttrs,'_loading':_loading,'_data':_data,'_columns':_columns,'_doms':_doms,'_query':_query,'_total':_total,'_finished':_finished,'_selection':_selection,'_actions':_actions,'_chartHeight':_chartHeight,'_chartOption':_chartOption,'_onKeywordsSearch':_onKeywordsSearch,'_onSearch':_onSearch,'_onAdd':_onAdd,'_onExport':_onExport,'_onSearchExport':_onSearchExport,'_onImport':_onImport,'_onMultiDelete':_onMultiDelete,'_onLoad':_onLoad,'_listen':_listen,'_visibleColumns':_visibleColumns,'_uid':_uid,'plain':plain,'hideHeader':hideHeader,'hideTools':hideTools,'hideSearcher':hideSearcher,'hideChart':hideChart,'hideSettings':hideSettings,'hideOperates':hideOperates,'hidePagination':hidePagination,'operatesWidth':operatesWidth,'operatesDropdown':operatesDropdown,'searcherColumns':searcherColumns,'searcherConfig':searcherConfig},'watch':{'$route':$route},'methods':{'initSettings':initSettings,'saveSettings':saveSettings,'calcValue':calcValue,'calcLink':calcLink,'calcOverflowTooltip':calcOverflowTooltip,'handleSearch':handleSearch,'handleResetSettings':handleResetSettings,'handleHeaderDragend':handleHeaderDragend,'handleSelectionChange':handleSelectionChange,'handleSortChange':handleSortChange,'handleCheckedChange':handleCheckedChange,'handleCollapseChange':handleCollapseChange,'handleMinus':handleMinus,'handleToggleFullscreen':handleToggleFullscreen,'cellClassName':cellClassName,'cellStyle':cellStyle,'calcTagType':calcTagType,'calcTagValue':calcTagValue,'canEdit':canEdit,'canSave':canSave,'canRowEdit':canRowEdit,'canCancelEdit':canCancelEdit,'canDelete':canDelete,'calcImages':calcImages,'_emit':_emit}};