vxe-table 3.9.0-rc.2 → 3.9.0-rc.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/es/grid/src/grid.js +120 -66
- package/es/locale/lang/en-US.js +2 -8
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +497 -501
- package/es/locale/lang/ja-JP.js +2 -8
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +2 -8
- package/es/locale/lang/pt-BR.js +2 -8
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +497 -503
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +667 -0
- package/es/locale/lang/vi-VN.js +2 -8
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +667 -0
- package/es/locale/lang/zh-CN.js +2 -8
- package/es/locale/lang/zh-HK.js +2 -2
- package/es/locale/lang/zh-MO.js +2 -2
- package/es/locale/lang/zh-TC.js +2 -673
- package/es/locale/lang/zh-TW.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/index.js +29 -3
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +33 -24
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +24 -5
- package/es/table/module/export/mixin.js +11 -11
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/render/index.js +23 -38
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +48 -40
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +161 -55
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -23
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/ui/index.js +5 -4
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +24 -1
- package/es/vxe-table/style.css +37 -23
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +115 -68
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +632 -330
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -8
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +497 -501
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +687 -0
- package/lib/locale/lang/ja-JP.js +2 -8
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -8
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +2 -8
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +687 -0
- package/lib/locale/lang/pt-BR.js +2 -8
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -8
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +497 -503
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +687 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +673 -0
- package/lib/locale/lang/uk-UA.min.js +1 -0
- package/lib/locale/lang/uk-UA.umd.js +687 -0
- package/lib/locale/lang/vi-VN.js +2 -8
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +673 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -0
- package/lib/locale/lang/zh-CHT.umd.js +687 -0
- package/lib/locale/lang/zh-CN.js +2 -8
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -8
- package/lib/locale/lang/zh-HK.js +2 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -677
- package/lib/locale/lang/zh-MO.js +2 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -677
- package/lib/locale/lang/zh-TC.js +3 -673
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -677
- package/lib/locale/lang/zh-TW.js +2 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -677
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +30 -3
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -7
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +32 -23
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +31 -4
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +23 -5
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +11 -11
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +27 -41
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +47 -40
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +7 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +147 -48
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +3 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -23
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +21 -7
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -5
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/vn.js +26 -1
- package/lib/ui/src/vn.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -23
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +127 -65
- package/packages/locale/lang/en-US.ts +2 -10
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +497 -503
- package/packages/locale/lang/ja-JP.ts +2 -10
- package/packages/locale/lang/ko-KR.ts +2 -10
- package/packages/locale/lang/pt-BR.ts +2 -10
- package/packages/locale/lang/ru-RU.ts +497 -505
- package/packages/locale/lang/uk-UA.ts +667 -0
- package/packages/locale/lang/vi-VN.ts +2 -10
- package/packages/locale/lang/zh-CHT.ts +667 -0
- package/packages/locale/lang/zh-CN.ts +2 -10
- package/packages/locale/lang/zh-HK.ts +2 -2
- package/packages/locale/lang/zh-MO.ts +2 -2
- package/packages/locale/lang/zh-TC.ts +2 -674
- package/packages/locale/lang/zh-TW.ts +2 -2
- package/packages/table/index.ts +28 -5
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +32 -23
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +28 -5
- package/packages/table/module/export/mixin.ts +11 -11
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/render/index.ts +26 -40
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +47 -40
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +167 -56
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -2
- package/packages/ui/src/vn.ts +26 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +2 -2
- /package/es/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/es/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/es/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
- /package/lib/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/lib/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/lib/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
|
@@ -9,13 +9,20 @@ import tableComponentProps from '../../table/src/props'
|
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
import type { VxeFormComponent, VxePagerComponent } from 'vxe-pc-ui'
|
|
13
|
+
|
|
14
|
+
const { getConfig, getI18n, commands, globalEvents, globalMixins, renderEmptyElement } = VxeUI
|
|
13
15
|
|
|
14
16
|
const methods: any = {}
|
|
15
17
|
const propKeys = Object.keys(tableComponentProps)
|
|
16
18
|
|
|
17
|
-
function renderDefaultForm (h: CreateElement,
|
|
18
|
-
const
|
|
19
|
+
function renderDefaultForm (h: CreateElement, $xeGrid: any) {
|
|
20
|
+
const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
|
|
21
|
+
const props = $xeGrid
|
|
22
|
+
const slots = $xeGrid.$scopedSlots
|
|
23
|
+
|
|
24
|
+
const { proxyConfig, formConfig } = props
|
|
25
|
+
const { proxyOpts, formData, formOpts } = $xeGrid
|
|
19
26
|
if (isEnableConf(formConfig) && formOpts.items && formOpts.items.length) {
|
|
20
27
|
const formSlots: any = {}
|
|
21
28
|
if (!formOpts.inited) {
|
|
@@ -23,7 +30,7 @@ function renderDefaultForm (h: CreateElement, _vm: any) {
|
|
|
23
30
|
const beforeItem = proxyOpts.beforeItem
|
|
24
31
|
if (proxyOpts && beforeItem) {
|
|
25
32
|
formOpts.items.forEach((item: any) => {
|
|
26
|
-
beforeItem.call(
|
|
33
|
+
beforeItem.call($xeGrid, { $grid: $xeGrid, item })
|
|
27
34
|
})
|
|
28
35
|
}
|
|
29
36
|
}
|
|
@@ -31,39 +38,42 @@ function renderDefaultForm (h: CreateElement, _vm: any) {
|
|
|
31
38
|
formOpts.items.forEach((item: any) => {
|
|
32
39
|
XEUtils.each(item.slots, (func) => {
|
|
33
40
|
if (!XEUtils.isFunction(func)) {
|
|
34
|
-
if (
|
|
35
|
-
formSlots[func] =
|
|
41
|
+
if (slots[func]) {
|
|
42
|
+
formSlots[func] = slots[func]
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
})
|
|
39
46
|
})
|
|
40
47
|
return [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
VxeUIFormComponent
|
|
49
|
+
? h(VxeUIFormComponent, {
|
|
50
|
+
props: Object.assign({}, formOpts, {
|
|
51
|
+
data: proxyConfig && proxyOpts.form ? formData : formOpts.data
|
|
52
|
+
}),
|
|
53
|
+
on: {
|
|
54
|
+
submit: $xeGrid.submitEvent,
|
|
55
|
+
reset: $xeGrid.resetEvent,
|
|
56
|
+
collapse: $xeGrid.collapseEvent,
|
|
57
|
+
'submit-invalid': $xeGrid.submitInvalidEvent
|
|
58
|
+
},
|
|
59
|
+
scopedSlots: formSlots
|
|
60
|
+
})
|
|
61
|
+
: renderEmptyElement($xeGrid)
|
|
53
62
|
]
|
|
54
63
|
}
|
|
55
64
|
return []
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
function getFuncSlot (
|
|
59
|
-
const
|
|
67
|
+
function getFuncSlot ($xeGrid: any, optSlots: any, slotKey: any) {
|
|
68
|
+
const slots = $xeGrid.$scopedSlots
|
|
69
|
+
|
|
60
70
|
const funcSlot = optSlots[slotKey]
|
|
61
71
|
if (funcSlot) {
|
|
62
72
|
if (XEUtils.isString(funcSlot)) {
|
|
63
|
-
if (
|
|
64
|
-
return
|
|
73
|
+
if (slots[funcSlot]) {
|
|
74
|
+
return slots[funcSlot]
|
|
65
75
|
} else {
|
|
66
|
-
if (process.env.
|
|
76
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
67
77
|
errLog('vxe.error.notSlot', [funcSlot])
|
|
68
78
|
}
|
|
69
79
|
}
|
|
@@ -80,7 +90,7 @@ function getToolbarSlots (_vm: any) {
|
|
|
80
90
|
let buttonsSlot
|
|
81
91
|
let toolsSlot
|
|
82
92
|
const slots: any = {}
|
|
83
|
-
if (process.env.
|
|
93
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
84
94
|
if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
|
|
85
95
|
warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons'])
|
|
86
96
|
}
|
|
@@ -260,8 +270,12 @@ function renderBottom (h: CreateElement, _vm: any) {
|
|
|
260
270
|
/**
|
|
261
271
|
* 渲染分页
|
|
262
272
|
*/
|
|
263
|
-
function renderPager (h: CreateElement,
|
|
264
|
-
const
|
|
273
|
+
function renderPager (h: CreateElement, $xeGrid: any) {
|
|
274
|
+
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
275
|
+
const props = $xeGrid
|
|
276
|
+
|
|
277
|
+
const { pagerConfig, proxyConfig } = props
|
|
278
|
+
const { $scopedSlots, tablePage } = $xeGrid
|
|
265
279
|
const pagerSlot = $scopedSlots.pager
|
|
266
280
|
const hasPager = !!(pagerSlot || isEnableConf(pagerConfig))
|
|
267
281
|
|
|
@@ -271,19 +285,21 @@ function renderPager (h: CreateElement, _vm: any) {
|
|
|
271
285
|
ref: 'pagerWrapper',
|
|
272
286
|
class: 'vxe-grid--pager-wrapper'
|
|
273
287
|
}, pagerSlot
|
|
274
|
-
? pagerSlot.call(
|
|
288
|
+
? pagerSlot.call($xeGrid, { $grid: $xeGrid }, h)
|
|
275
289
|
: [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
290
|
+
VxeUIPagerComponent
|
|
291
|
+
? h(VxeUIPagerComponent, {
|
|
292
|
+
props: { ...$xeGrid.pagerOpts, ...(proxyConfig ? tablePage : {}) },
|
|
293
|
+
on: {
|
|
294
|
+
'page-change': $xeGrid.pageChangeEvent
|
|
295
|
+
},
|
|
296
|
+
scopedSlots: getPagerSlots($xeGrid)
|
|
297
|
+
})
|
|
298
|
+
: renderEmptyElement($xeGrid)
|
|
283
299
|
]
|
|
284
300
|
)
|
|
285
301
|
}
|
|
286
|
-
return
|
|
302
|
+
return renderEmptyElement($xeGrid)
|
|
287
303
|
}
|
|
288
304
|
|
|
289
305
|
const defaultLayouts = ['Form', 'Toolbar', 'Top', 'Table', 'Bottom', 'Pager']
|
|
@@ -322,7 +338,7 @@ function renderLayout (h: CreateElement, _vm: any) {
|
|
|
322
338
|
vns.push(renderPager(h, _vm))
|
|
323
339
|
break
|
|
324
340
|
default:
|
|
325
|
-
if (process.env.
|
|
341
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
326
342
|
errLog('vxe.error.notProp', [`layouts -> ${name}`])
|
|
327
343
|
}
|
|
328
344
|
break
|
|
@@ -371,7 +387,7 @@ export default {
|
|
|
371
387
|
tZindex: 0,
|
|
372
388
|
tablePage: {
|
|
373
389
|
total: 0,
|
|
374
|
-
pageSize: getConfig().pager
|
|
390
|
+
pageSize: getConfig().pager?.pageSize || 10,
|
|
375
391
|
currentPage: 1
|
|
376
392
|
}
|
|
377
393
|
}
|
|
@@ -385,19 +401,34 @@ export default {
|
|
|
385
401
|
return this.proxyOpts.showActiveMsg
|
|
386
402
|
},
|
|
387
403
|
proxyOpts () {
|
|
388
|
-
return
|
|
404
|
+
return this.computeProxyOpts
|
|
405
|
+
},
|
|
406
|
+
computeProxyOpts () {
|
|
407
|
+
return XEUtils.merge({}, XEUtils.clone(getConfig().grid.proxyConfig, true), this.proxyConfig)
|
|
389
408
|
},
|
|
390
409
|
pagerOpts () {
|
|
391
|
-
return
|
|
410
|
+
return this.computePagerOpts
|
|
411
|
+
},
|
|
412
|
+
computePagerOpts () {
|
|
413
|
+
return Object.assign({}, XEUtils.clone(getConfig().grid.pagerConfig, true), this.pagerConfig)
|
|
392
414
|
},
|
|
393
415
|
formOpts () {
|
|
394
|
-
return
|
|
416
|
+
return this.computeFormOpts
|
|
417
|
+
},
|
|
418
|
+
computeFormOpts () {
|
|
419
|
+
return Object.assign({}, XEUtils.clone(getConfig().grid.formConfig, true), this.formConfig)
|
|
395
420
|
},
|
|
396
421
|
toolbarOpts () {
|
|
397
|
-
return
|
|
422
|
+
return this.computeToolbarOpts
|
|
423
|
+
},
|
|
424
|
+
computeToolbarOpts () {
|
|
425
|
+
return Object.assign({}, XEUtils.clone(getConfig().grid.toolbarConfig, true), this.toolbarConfig || this.toolbar)
|
|
398
426
|
},
|
|
399
427
|
zoomOpts () {
|
|
400
|
-
return
|
|
428
|
+
return this.computeZoomOpts
|
|
429
|
+
},
|
|
430
|
+
computeZoomOpts () {
|
|
431
|
+
return Object.assign({}, XEUtils.clone(getConfig().grid.zoomConfig, true), this.zoomConfig)
|
|
401
432
|
},
|
|
402
433
|
renderStyle () {
|
|
403
434
|
return this.isZMax ? { zIndex: this.tZindex } : null
|
|
@@ -454,12 +485,15 @@ export default {
|
|
|
454
485
|
}
|
|
455
486
|
} as any,
|
|
456
487
|
created (this: any) {
|
|
488
|
+
const $xeGrid = this
|
|
489
|
+
const props = $xeGrid
|
|
490
|
+
|
|
457
491
|
// const { data, formOpts, proxyOpts, proxyConfig } = this
|
|
458
492
|
// if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
|
|
459
493
|
// errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
460
494
|
// }
|
|
461
495
|
|
|
462
|
-
if (process.env.
|
|
496
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
463
497
|
if (this.toolbar) {
|
|
464
498
|
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config'])
|
|
465
499
|
}
|
|
@@ -470,6 +504,26 @@ export default {
|
|
|
470
504
|
// warnLog('vxe.error.delProp', ['proxy-config.props', 'proxy-config.response'])
|
|
471
505
|
// }
|
|
472
506
|
}
|
|
507
|
+
|
|
508
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
509
|
+
// 使用已安装的组件,如果未安装则不渲染
|
|
510
|
+
const VxeUIFormComponent = VxeUI.getComponent<VxeFormComponent>('VxeForm')
|
|
511
|
+
const VxeUIPagerComponent = VxeUI.getComponent<VxePagerComponent>('VxePager')
|
|
512
|
+
|
|
513
|
+
$xeGrid.$nextTick(() => {
|
|
514
|
+
if (props.formConfig) {
|
|
515
|
+
if (!VxeUIFormComponent) {
|
|
516
|
+
errLog('vxe.error.reqComp', ['vxe-form'])
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (props.pagerConfig) {
|
|
520
|
+
if (!VxeUIPagerComponent) {
|
|
521
|
+
errLog('vxe.error.reqComp', ['vxe-pager'])
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
})
|
|
525
|
+
}
|
|
526
|
+
|
|
473
527
|
this.initPages()
|
|
474
528
|
globalEvents.on(this, 'keydown', this.handleGlobalKeydownEvent)
|
|
475
529
|
},
|
|
@@ -484,7 +538,8 @@ export default {
|
|
|
484
538
|
globalEvents.off(this, 'keydown')
|
|
485
539
|
},
|
|
486
540
|
render (this: any, h: CreateElement) {
|
|
487
|
-
const {
|
|
541
|
+
const { computeSize, isZMax } = this
|
|
542
|
+
const vSize = computeSize
|
|
488
543
|
return h('div', {
|
|
489
544
|
class: ['vxe-grid', {
|
|
490
545
|
[`size--${vSize}`]: vSize,
|
|
@@ -652,8 +707,11 @@ export default {
|
|
|
652
707
|
}
|
|
653
708
|
}
|
|
654
709
|
if (isInited) {
|
|
655
|
-
|
|
656
|
-
|
|
710
|
+
let defaultSort = null
|
|
711
|
+
if ($xetable) {
|
|
712
|
+
const { sortOpts } = $xetable
|
|
713
|
+
defaultSort = sortOpts.defaultSort
|
|
714
|
+
}
|
|
657
715
|
// 如果使用默认排序
|
|
658
716
|
if (defaultSort) {
|
|
659
717
|
if (!XEUtils.isArray(defaultSort)) {
|
|
@@ -667,14 +725,18 @@ export default {
|
|
|
667
725
|
}
|
|
668
726
|
})
|
|
669
727
|
}
|
|
670
|
-
|
|
671
|
-
} else {
|
|
672
|
-
if (isReload) {
|
|
673
|
-
$xetable.clearAll()
|
|
674
|
-
} else {
|
|
675
|
-
sortList = $xetable.getSortColumns()
|
|
728
|
+
if ($xetable) {
|
|
676
729
|
filterList = $xetable.getCheckedFilters()
|
|
677
730
|
}
|
|
731
|
+
} else {
|
|
732
|
+
if ($xetable) {
|
|
733
|
+
if (isReload) {
|
|
734
|
+
$xetable.clearAll()
|
|
735
|
+
} else {
|
|
736
|
+
sortList = $xetable.getSortColumns()
|
|
737
|
+
filterList = $xetable.getCheckedFilters()
|
|
738
|
+
}
|
|
739
|
+
}
|
|
678
740
|
}
|
|
679
741
|
const commitParams = {
|
|
680
742
|
code,
|
|
@@ -730,7 +792,7 @@ export default {
|
|
|
730
792
|
return { status: false }
|
|
731
793
|
})
|
|
732
794
|
} else {
|
|
733
|
-
if (process.env.
|
|
795
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
734
796
|
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
735
797
|
}
|
|
736
798
|
}
|
|
@@ -758,7 +820,7 @@ export default {
|
|
|
758
820
|
$xetable.setPendingRow(removeRecords, false)
|
|
759
821
|
if (isRespMsg) {
|
|
760
822
|
// 检测弹窗模块
|
|
761
|
-
if (process.env.
|
|
823
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
762
824
|
if (!VxeUI.modal) {
|
|
763
825
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
764
826
|
}
|
|
@@ -779,7 +841,7 @@ export default {
|
|
|
779
841
|
this.tableLoading = false
|
|
780
842
|
if (isRespMsg) {
|
|
781
843
|
// 检测弹窗模块
|
|
782
|
-
if (process.env.
|
|
844
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
783
845
|
if (!VxeUI.modal) {
|
|
784
846
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
785
847
|
}
|
|
@@ -795,7 +857,7 @@ export default {
|
|
|
795
857
|
} else {
|
|
796
858
|
if (isActiveMsg) {
|
|
797
859
|
// 检测弹窗模块
|
|
798
|
-
if (process.env.
|
|
860
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
799
861
|
if (!VxeUI.modal) {
|
|
800
862
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
801
863
|
}
|
|
@@ -804,7 +866,7 @@ export default {
|
|
|
804
866
|
}
|
|
805
867
|
}
|
|
806
868
|
} else {
|
|
807
|
-
if (process.env.
|
|
869
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
808
870
|
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
809
871
|
}
|
|
810
872
|
}
|
|
@@ -845,7 +907,7 @@ export default {
|
|
|
845
907
|
$xetable.clearPendingRow()
|
|
846
908
|
if (isRespMsg) {
|
|
847
909
|
// 检测弹窗模块
|
|
848
|
-
if (process.env.
|
|
910
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
849
911
|
if (!VxeUI.modal) {
|
|
850
912
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
851
913
|
}
|
|
@@ -866,7 +928,7 @@ export default {
|
|
|
866
928
|
this.tableLoading = false
|
|
867
929
|
if (isRespMsg) {
|
|
868
930
|
// 检测弹窗模块
|
|
869
|
-
if (process.env.
|
|
931
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
870
932
|
if (!VxeUI.modal) {
|
|
871
933
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
872
934
|
}
|
|
@@ -881,7 +943,7 @@ export default {
|
|
|
881
943
|
} else {
|
|
882
944
|
if (isActiveMsg) {
|
|
883
945
|
// 检测弹窗模块
|
|
884
|
-
if (process.env.
|
|
946
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
885
947
|
if (!VxeUI.modal) {
|
|
886
948
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
887
949
|
}
|
|
@@ -891,7 +953,7 @@ export default {
|
|
|
891
953
|
}
|
|
892
954
|
})
|
|
893
955
|
} else {
|
|
894
|
-
if (process.env.
|
|
956
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
895
957
|
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
896
958
|
}
|
|
897
959
|
}
|
|
@@ -903,7 +965,7 @@ export default {
|
|
|
903
965
|
if (gCommandOpts.commandMethod) {
|
|
904
966
|
gCommandOpts.commandMethod({ code, button, $grid: this, $table: $xetable }, ...args)
|
|
905
967
|
} else {
|
|
906
|
-
if (process.env.
|
|
968
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
907
969
|
errLog('vxe.error.notCommands', [code])
|
|
908
970
|
}
|
|
909
971
|
}
|
|
@@ -932,7 +994,7 @@ export default {
|
|
|
932
994
|
})
|
|
933
995
|
} else {
|
|
934
996
|
// 检测弹窗模块
|
|
935
|
-
if (process.env.
|
|
997
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
936
998
|
if (!VxeUI.modal) {
|
|
937
999
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
938
1000
|
}
|
|
@@ -983,7 +1045,7 @@ export default {
|
|
|
983
1045
|
} else {
|
|
984
1046
|
if (isActiveMsg) {
|
|
985
1047
|
// 检测弹窗模块
|
|
986
|
-
if (process.env.
|
|
1048
|
+
if (process.env.VUE_APP_VXE_ENV === 'development') {
|
|
987
1049
|
if (!VxeUI.modal) {
|
|
988
1050
|
errLog('vxe.error.reqModule', ['Modal'])
|
|
989
1051
|
}
|
|
@@ -1102,7 +1164,7 @@ export default {
|
|
|
1102
1164
|
return null
|
|
1103
1165
|
},
|
|
1104
1166
|
// 检查插槽
|
|
1105
|
-
...(process.env.
|
|
1167
|
+
...(process.env.VUE_APP_VXE_ENV === 'development'
|
|
1106
1168
|
? {
|
|
1107
1169
|
loadColumn (columns: any[]) {
|
|
1108
1170
|
const { $scopedSlots } = this
|
|
@@ -200,7 +200,8 @@ export default {
|
|
|
200
200
|
zoomIn: 'Maximize',
|
|
201
201
|
zoomOut: 'Reduction',
|
|
202
202
|
close: 'Close',
|
|
203
|
-
miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
|
|
203
|
+
miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
|
|
204
|
+
footPropErr: '"show-footer" is only used to enable table tails and needs to be used in conjunction with "show-confirm-button" | "show-cancel-button" | slots'
|
|
204
205
|
},
|
|
205
206
|
drawer: {
|
|
206
207
|
close: 'Close'
|
|
@@ -472,10 +473,6 @@ export default {
|
|
|
472
473
|
ss: 'Second'
|
|
473
474
|
}
|
|
474
475
|
},
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* 扩展插件
|
|
478
|
-
*/
|
|
479
476
|
plugins: {
|
|
480
477
|
extendCellArea: {
|
|
481
478
|
area: {
|
|
@@ -580,11 +577,6 @@ export default {
|
|
|
580
577
|
notData: 'No data'
|
|
581
578
|
}
|
|
582
579
|
},
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* 以下废弃
|
|
586
|
-
* @deprecated
|
|
587
|
-
*/
|
|
588
580
|
renderer: {
|
|
589
581
|
search: 'Search',
|
|
590
582
|
cases: {
|
|
@@ -200,7 +200,8 @@ export default {
|
|
|
200
200
|
zoomIn: 'Maximize',
|
|
201
201
|
zoomOut: 'Reducir',
|
|
202
202
|
close: 'Cerrar',
|
|
203
|
-
miniMaxSize: 'The number of minimized Windows cannot exceed {0}.'
|
|
203
|
+
miniMaxSize: 'The number of minimized Windows cannot exceed {0}.',
|
|
204
|
+
footPropErr: '"show-footer" is only used to enable table tails and needs to be used in conjunction with "show-confirm-button" | "show-cancel-button" | slots'
|
|
204
205
|
},
|
|
205
206
|
drawer: {
|
|
206
207
|
close: 'Cerrar'
|