vxe-table 3.4.15 → 3.5.0-beta.0
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/README.md +1 -1
- package/lib/button/src/button.js +19 -9
- package/lib/button/src/button.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +2 -2
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/edit/src/mixin.js +26 -18
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/src/export-panel.js +2 -2
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/import-panel.js +2 -2
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/mixin.js +26 -24
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/filter/src/mixin.js +4 -4
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/filter/src/panel.js +2 -2
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/footer/src/footer.js +7 -4
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form-gather.js +2 -2
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +3 -3
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +17 -11
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +5 -5
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +2 -2
- package/lib/form/src/util.min.js +1 -1
- package/lib/grid/src/grid.js +44 -34
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/header/src/header.js +10 -8
- package/lib/header/src/header.min.js +1 -1
- package/lib/index.umd.js +1963 -1083
- package/lib/index.umd.min.js +1 -2
- package/lib/input/src/input.js +30 -18
- package/lib/input/src/input.min.js +1 -1
- package/lib/keyboard/src/mixin.js +12 -8
- package/lib/keyboard/src/mixin.min.js +1 -1
- package/lib/list/src/list.js +7 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/menu/src/mixin.js +24 -14
- package/lib/menu/src/mixin.min.js +1 -1
- package/lib/menu/src/panel.js +3 -3
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/modal/src/modal.js +24 -12
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +16 -12
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +2 -2
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +2 -2
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/select.js +26 -16
- package/lib/select/src/select.min.js +1 -1
- package/lib/switch/src/switch.js +4 -4
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/body.js +34 -33
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +19 -11
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +3 -3
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +201 -0
- package/lib/table/src/columnInfo.min.js +1 -0
- package/lib/table/src/methods.js +85 -85
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +80 -62
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +38 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/textarea/src/textarea.js +2 -2
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +16 -10
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/tools/{src/dom.js → dom.js} +0 -0
- package/lib/tools/{src/dom.min.js → dom.min.js} +0 -0
- package/lib/tools/{src/event.js → event.js} +3 -6
- package/lib/tools/event.min.js +1 -0
- package/lib/tools/log.js +29 -0
- package/lib/tools/log.min.js +1 -0
- package/lib/tools/{src/resize.js → resize.js} +1 -1
- package/lib/tools/resize.min.js +1 -0
- package/lib/tools/utils.js +155 -0
- package/lib/tools/utils.min.js +1 -0
- package/lib/tooltip/src/tooltip.js +8 -6
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +7 -4
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +3 -1
- package/lib/v-x-e-table/src/interceptor.js +4 -4
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +18 -10
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/store.js +3 -3
- package/lib/v-x-e-table/src/store.min.js +1 -1
- package/lib/validator/src/mixin.js +4 -4
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +1 -1
- package/packages/button/src/button.js +4 -2
- package/packages/checkbox/src/checkbox.js +2 -2
- package/packages/edit/src/mixin.js +7 -6
- package/packages/export/src/export-panel.js +1 -1
- package/packages/export/src/import-panel.js +1 -1
- package/packages/export/src/mixin.js +20 -19
- package/packages/filter/src/mixin.js +3 -3
- package/packages/filter/src/panel.js +1 -1
- package/packages/footer/src/footer.js +4 -2
- package/packages/form/src/form-gather.js +2 -2
- package/packages/form/src/form-item.js +2 -2
- package/packages/form/src/form.js +7 -7
- package/packages/form/src/render.js +4 -4
- package/packages/form/src/util.js +2 -2
- package/packages/grid/src/grid.js +22 -20
- package/packages/header/src/header.js +3 -2
- package/packages/input/src/input.js +6 -3
- package/packages/keyboard/src/mixin.js +1 -2
- package/packages/list/src/list.js +3 -2
- package/packages/menu/src/mixin.js +5 -3
- package/packages/menu/src/panel.js +3 -3
- package/packages/modal/src/modal.js +7 -4
- package/packages/pulldown/src/pulldown.js +3 -1
- package/packages/radio/src/button.js +2 -2
- package/packages/radio/src/radio.js +2 -2
- package/packages/select/src/select.js +5 -3
- package/packages/switch/src/switch.js +4 -4
- package/packages/table/src/body.js +23 -22
- package/packages/table/src/cell.js +5 -4
- package/packages/table/src/column.js +1 -1
- package/packages/table/src/columnInfo.js +148 -0
- package/packages/table/src/methods.js +50 -50
- package/packages/table/src/table.js +56 -41
- package/packages/table/src/util.js +19 -1
- package/packages/textarea/src/textarea.js +2 -2
- package/packages/toolbar/src/toolbar.js +7 -4
- package/packages/tools/{src/dom.js → dom.js} +0 -0
- package/packages/tools/{src/event.js → event.js} +1 -3
- package/packages/tools/log.js +16 -0
- package/packages/tools/{src/resize.js → resize.js} +1 -1
- package/packages/tools/utils.js +108 -0
- package/packages/tooltip/src/tooltip.js +2 -1
- package/packages/v-x-e-table/index.js +4 -2
- package/packages/v-x-e-table/src/conf.js +3 -1
- package/packages/v-x-e-table/src/interceptor.js +3 -3
- package/packages/v-x-e-table/src/renderer.js +4 -3
- package/packages/v-x-e-table/src/store.js +2 -2
- package/packages/validator/src/mixin.js +3 -3
- package/types/v-x-e-table/index.d.ts +8 -0
- package/lib/tools/index.js +0 -76
- package/lib/tools/index.min.js +0 -1
- package/lib/tools/src/event.min.js +0 -1
- package/lib/tools/src/resize.min.js +0 -1
- package/lib/tools/src/utils.js +0 -365
- package/lib/tools/src/utils.min.js +0 -1
- package/packages/tools/index.js +0 -14
- package/packages/tools/src/utils.js +0 -272
|
@@ -2,11 +2,11 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import vSize from '../../mixins/size'
|
|
4
4
|
import VXETable from '../../v-x-e-table'
|
|
5
|
-
import {
|
|
5
|
+
import { isEnableConf, eqEmptyValue, getFuncText } from '../../tools/utils'
|
|
6
|
+
import DomTools, { browse } from '../../tools/dom'
|
|
6
7
|
import { createItem, handleFieldOrItem } from './util'
|
|
7
8
|
import { renderTitle } from './render'
|
|
8
|
-
import {
|
|
9
|
-
import { browse } from '../../tools/src/dom'
|
|
9
|
+
import { errLog } from '../../tools/log'
|
|
10
10
|
|
|
11
11
|
class Rule {
|
|
12
12
|
constructor (rule) {
|
|
@@ -24,7 +24,7 @@ class Rule {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
get content () {
|
|
27
|
-
return
|
|
27
|
+
return getFuncText(this.$options.content || this.$options.message)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
get message () {
|
|
@@ -136,7 +136,7 @@ function renderItems (h, _vm, itemList) {
|
|
|
136
136
|
width: isNaN(titleWidth) ? titleWidth : `${titleWidth}px`
|
|
137
137
|
} : null,
|
|
138
138
|
attrs: {
|
|
139
|
-
title: showTitle ?
|
|
139
|
+
title: showTitle ? getFuncText(title) : null
|
|
140
140
|
},
|
|
141
141
|
on: ons
|
|
142
142
|
}, renderTitle(h, _vm, item)) : null,
|
|
@@ -239,7 +239,7 @@ export default {
|
|
|
239
239
|
const { items } = this
|
|
240
240
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
241
241
|
if (this.customLayout && this.items) {
|
|
242
|
-
|
|
242
|
+
errLog('vxe.error.errConflicts', ['custom-layout', 'items'])
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
if (items) {
|
|
@@ -308,7 +308,7 @@ export default {
|
|
|
308
308
|
XEUtils.each(item.slots, (func) => {
|
|
309
309
|
if (!XEUtils.isFunction(func)) {
|
|
310
310
|
if (!$scopedSlots[func]) {
|
|
311
|
-
|
|
311
|
+
errLog('vxe.error.notSlot', [func])
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
2
2
|
import VXETable from '../../v-x-e-table'
|
|
3
|
-
import {
|
|
3
|
+
import { isEnableConf, getFuncText } from '../../tools/utils'
|
|
4
4
|
|
|
5
5
|
function renderPrefixIcon (h, titlePrefix) {
|
|
6
6
|
return h('span', {
|
|
@@ -34,7 +34,7 @@ export function renderTitle (h, _vm, item) {
|
|
|
34
34
|
(titlePrefix.content || titlePrefix.message)
|
|
35
35
|
? h('vxe-tooltip', {
|
|
36
36
|
props: {
|
|
37
|
-
content:
|
|
37
|
+
content: getFuncText(titlePrefix.content || titlePrefix.message),
|
|
38
38
|
enterable: titlePrefix.enterable,
|
|
39
39
|
theme: titlePrefix.theme
|
|
40
40
|
}
|
|
@@ -47,7 +47,7 @@ export function renderTitle (h, _vm, item) {
|
|
|
47
47
|
titVNs.push(
|
|
48
48
|
h('span', {
|
|
49
49
|
class: 'vxe-form--item-title-label'
|
|
50
|
-
}, compConf && compConf.renderItemTitle ? compConf.renderItemTitle(itemRender, params) : (slots && slots.title ? _vm.callSlot(slots.title, params, h) :
|
|
50
|
+
}, compConf && compConf.renderItemTitle ? compConf.renderItemTitle(itemRender, params) : (slots && slots.title ? _vm.callSlot(slots.title, params, h) : getFuncText(item.title)))
|
|
51
51
|
)
|
|
52
52
|
contVNs.push(
|
|
53
53
|
h('div', {
|
|
@@ -60,7 +60,7 @@ export function renderTitle (h, _vm, item) {
|
|
|
60
60
|
(titleSuffix.content || titleSuffix.message)
|
|
61
61
|
? h('vxe-tooltip', {
|
|
62
62
|
props: {
|
|
63
|
-
content:
|
|
63
|
+
content: getFuncText(titleSuffix.content || titleSuffix.message),
|
|
64
64
|
enterable: titleSuffix.enterable,
|
|
65
65
|
theme: titleSuffix.theme
|
|
66
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import VXETable from '../../v-x-e-table'
|
|
3
|
-
import {
|
|
3
|
+
import { warnLog } from '../../tools/log'
|
|
4
4
|
|
|
5
5
|
class ItemConfig {
|
|
6
6
|
constructor ($xeform, item) {
|
|
@@ -31,7 +31,7 @@ class ItemConfig {
|
|
|
31
31
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
32
32
|
const compConf = item.itemRender ? VXETable.renderer.get(item.itemRender.name) : null
|
|
33
33
|
if (compConf && !compConf.renderItemContent && compConf.renderItem) {
|
|
34
|
-
|
|
34
|
+
warnLog('vxe.error.delProp', ['item-render.renderItem', 'item-render.renderItemContent'])
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -3,8 +3,10 @@ import XEUtils from 'xe-utils'
|
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
4
4
|
import vSize from '../../mixins/size'
|
|
5
5
|
import VXETable from '../../v-x-e-table'
|
|
6
|
-
import
|
|
7
|
-
import { getOffsetHeight, getPaddingTopBottomSize } from '../../tools/
|
|
6
|
+
import UtilTools, { isEnableConf } from '../../tools/utils'
|
|
7
|
+
import DomTools, { getOffsetHeight, getPaddingTopBottomSize } from '../../tools/dom'
|
|
8
|
+
import { GlobalEvent } from '../../tools/event'
|
|
9
|
+
import { warnLog, errLog } from '../../tools/log'
|
|
8
10
|
|
|
9
11
|
const methods = {}
|
|
10
12
|
const propKeys = Object.keys(Table.props)
|
|
@@ -59,7 +61,7 @@ function getFuncSlot (_vm, optSlots, slotKey) {
|
|
|
59
61
|
return $scopedSlots[funcSlot]
|
|
60
62
|
} else {
|
|
61
63
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
62
|
-
|
|
64
|
+
errLog('vxe.error.notSlot', [funcSlot])
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
} else {
|
|
@@ -77,10 +79,10 @@ function getToolbarSlots (_vm) {
|
|
|
77
79
|
const slots = {}
|
|
78
80
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
79
81
|
if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
|
|
80
|
-
|
|
82
|
+
warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons'])
|
|
81
83
|
}
|
|
82
84
|
if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
|
|
83
|
-
|
|
85
|
+
warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools'])
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
if (toolbarOptSlots) {
|
|
@@ -253,15 +255,15 @@ export default {
|
|
|
253
255
|
created () {
|
|
254
256
|
const { data, formOpts, proxyOpts, proxyConfig } = this
|
|
255
257
|
if (proxyConfig && (data || (proxyOpts.form && formOpts.data))) {
|
|
256
|
-
|
|
258
|
+
errLog('vxe.error.errConflicts', ['grid.data', 'grid.proxy-config'])
|
|
257
259
|
}
|
|
258
260
|
|
|
259
261
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
260
262
|
if (this.toolbar) {
|
|
261
|
-
|
|
263
|
+
warnLog('vxe.error.delProp', ['grid.toolbar', 'grid.toolbar-config'])
|
|
262
264
|
}
|
|
263
265
|
if (this.toolbarConfig && !XEUtils.isObject(this.toolbarConfig)) {
|
|
264
|
-
|
|
266
|
+
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}'])
|
|
265
267
|
}
|
|
266
268
|
}
|
|
267
269
|
|
|
@@ -588,7 +590,7 @@ export default {
|
|
|
588
590
|
})
|
|
589
591
|
} else {
|
|
590
592
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
591
|
-
|
|
593
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.query'])
|
|
592
594
|
}
|
|
593
595
|
}
|
|
594
596
|
break
|
|
@@ -614,7 +616,7 @@ export default {
|
|
|
614
616
|
// 检测弹窗模块
|
|
615
617
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
616
618
|
if (!VXETable.modal) {
|
|
617
|
-
|
|
619
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
618
620
|
}
|
|
619
621
|
}
|
|
620
622
|
VXETable.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.delSuccess'), status: 'success' })
|
|
@@ -631,7 +633,7 @@ export default {
|
|
|
631
633
|
// 检测弹窗模块
|
|
632
634
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
633
635
|
if (!VXETable.modal) {
|
|
634
|
-
|
|
636
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
635
637
|
}
|
|
636
638
|
}
|
|
637
639
|
VXETable.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
@@ -643,7 +645,7 @@ export default {
|
|
|
643
645
|
// 检测弹窗模块
|
|
644
646
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
645
647
|
if (!VXETable.modal) {
|
|
646
|
-
|
|
648
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
647
649
|
}
|
|
648
650
|
}
|
|
649
651
|
VXETable.modal.message({ id: code, content: GlobalConfig.i18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
@@ -651,7 +653,7 @@ export default {
|
|
|
651
653
|
}
|
|
652
654
|
} else {
|
|
653
655
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
654
|
-
|
|
656
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.delete'])
|
|
655
657
|
}
|
|
656
658
|
}
|
|
657
659
|
break
|
|
@@ -690,7 +692,7 @@ export default {
|
|
|
690
692
|
// 检测弹窗模块
|
|
691
693
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
692
694
|
if (!VXETable.modal) {
|
|
693
|
-
|
|
695
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
694
696
|
}
|
|
695
697
|
}
|
|
696
698
|
VXETable.modal.message({ content: this.getRespMsg(rest, 'vxe.grid.saveSuccess'), status: 'success' })
|
|
@@ -707,7 +709,7 @@ export default {
|
|
|
707
709
|
// 检测弹窗模块
|
|
708
710
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
709
711
|
if (!VXETable.modal) {
|
|
710
|
-
|
|
712
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
711
713
|
}
|
|
712
714
|
}
|
|
713
715
|
VXETable.modal.message({ id: code, content: this.getRespMsg(rest, 'vxe.grid.operError'), status: 'error' })
|
|
@@ -718,7 +720,7 @@ export default {
|
|
|
718
720
|
// 检测弹窗模块
|
|
719
721
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
720
722
|
if (!VXETable.modal) {
|
|
721
|
-
|
|
723
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
722
724
|
}
|
|
723
725
|
}
|
|
724
726
|
VXETable.modal.message({ id: code, content: GlobalConfig.i18n('vxe.grid.dataUnchanged'), status: 'info' })
|
|
@@ -727,7 +729,7 @@ export default {
|
|
|
727
729
|
})
|
|
728
730
|
} else {
|
|
729
731
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
730
|
-
|
|
732
|
+
errLog('vxe.error.notFunc', ['proxy-config.ajax.save'])
|
|
731
733
|
}
|
|
732
734
|
}
|
|
733
735
|
break
|
|
@@ -762,7 +764,7 @@ export default {
|
|
|
762
764
|
// 检测弹窗模块
|
|
763
765
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
764
766
|
if (!VXETable.modal) {
|
|
765
|
-
|
|
767
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
766
768
|
}
|
|
767
769
|
}
|
|
768
770
|
VXETable.modal.message({ id: `msg_${code}`, content: GlobalConfig.i18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
@@ -817,7 +819,7 @@ export default {
|
|
|
817
819
|
// 检测弹窗模块
|
|
818
820
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
819
821
|
if (!VXETable.modal) {
|
|
820
|
-
|
|
822
|
+
errLog('vxe.error.reqModule', ['Modal'])
|
|
821
823
|
}
|
|
822
824
|
}
|
|
823
825
|
VXETable.modal.message({ id: code, content: GlobalConfig.i18n('vxe.grid.selectOneRecord'), status: 'warning' })
|
|
@@ -931,7 +933,7 @@ export default {
|
|
|
931
933
|
XEUtils.each(column.slots, (func) => {
|
|
932
934
|
if (!XEUtils.isFunction(func)) {
|
|
933
935
|
if (!$scopedSlots[func]) {
|
|
934
|
-
|
|
936
|
+
errLog('vxe.error.notSlot', [func])
|
|
935
937
|
}
|
|
936
938
|
}
|
|
937
939
|
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
|
-
import
|
|
2
|
+
import UtilTools from '../../tools/utils'
|
|
3
|
+
import DomTools from '../../tools/dom'
|
|
3
4
|
import { convertToRows } from './util'
|
|
4
5
|
import { getColMinWidth } from '../../table/src/util'
|
|
5
6
|
|
|
@@ -163,7 +164,7 @@ export default {
|
|
|
163
164
|
},
|
|
164
165
|
style: headerCellStyle ? (XEUtils.isFunction(headerCellStyle) ? headerCellStyle(params) : headerCellStyle) : null,
|
|
165
166
|
on: thOns,
|
|
166
|
-
key: columnKey || isColGroup ? column.id : $columnIndex
|
|
167
|
+
key: columnKey || columnOpts.useKey || isColGroup ? column.id : $columnIndex
|
|
167
168
|
}, [
|
|
168
169
|
h('div', {
|
|
169
170
|
class: ['vxe-cell', {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import vSize from '../../mixins/size'
|
|
4
|
-
import
|
|
4
|
+
import UtilTools, { getFuncText } from '../../tools/utils'
|
|
5
|
+
import DomTools from '../../tools/dom'
|
|
6
|
+
import { GlobalEvent } from '../../tools/event'
|
|
5
7
|
import { toStringTimeDate, getDateQuarter } from './date'
|
|
6
8
|
import { handleNumber, toFloatValueFixed } from './number'
|
|
9
|
+
import { warnLog } from '../../tools/log'
|
|
7
10
|
|
|
8
11
|
const yearSize = 20
|
|
9
12
|
const monthSize = 20
|
|
@@ -962,7 +965,7 @@ export default {
|
|
|
962
965
|
inpPlaceholder () {
|
|
963
966
|
const { placeholder } = this
|
|
964
967
|
if (placeholder) {
|
|
965
|
-
return
|
|
968
|
+
return getFuncText(placeholder)
|
|
966
969
|
}
|
|
967
970
|
return ''
|
|
968
971
|
},
|
|
@@ -1017,7 +1020,7 @@ export default {
|
|
|
1017
1020
|
},
|
|
1018
1021
|
mounted () {
|
|
1019
1022
|
if (this.dateConfig) {
|
|
1020
|
-
|
|
1023
|
+
warnLog('vxe.error.removeProp', ['date-config'])
|
|
1021
1024
|
}
|
|
1022
1025
|
if (this.isDatePickerType) {
|
|
1023
1026
|
if (this.transfer) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import vSize from '../../mixins/size'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { createResizeEvent } from '../../tools/resize'
|
|
5
|
+
import { GlobalEvent } from '../../tools/event'
|
|
6
|
+
import { browse } from '../../tools/dom'
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
name: 'VxeList',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
|
-
import
|
|
2
|
+
import UtilTools, { isEnableConf } from '../../tools/utils'
|
|
3
|
+
import DomTools from '../../tools/dom'
|
|
3
4
|
import VXETable from '../../v-x-e-table'
|
|
5
|
+
import { warnLog } from '../../tools/log'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
methods: {
|
|
@@ -104,7 +106,7 @@ export default {
|
|
|
104
106
|
// 在 v4 中废弃事件 cell-context-menu、header-cell-context-menu、footer-cell-context-menu
|
|
105
107
|
if (this.$listeners[`${typePrefix}cell-context-menu`]) {
|
|
106
108
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
107
|
-
|
|
109
|
+
warnLog('vxe.error.delEvent', [`${typePrefix}cell-context-menu`, `${typePrefix}cell-menu`])
|
|
108
110
|
}
|
|
109
111
|
this.emitEvent(`${typePrefix}cell-context-menu`, params, evnt)
|
|
110
112
|
} else {
|
|
@@ -255,7 +257,7 @@ export default {
|
|
|
255
257
|
// 在 v4 中废弃事件 context-menu-click
|
|
256
258
|
if (this.$listeners['context-menu-click']) {
|
|
257
259
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
258
|
-
|
|
260
|
+
warnLog('vxe.error.delEvent', ['context-menu-click', 'menu-click'])
|
|
259
261
|
}
|
|
260
262
|
this.emitEvent('context-menu-click', params, evnt)
|
|
261
263
|
} else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getFuncText } from '../../tools/utils'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
name: 'VxeTableContextMenu',
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
}),
|
|
54
54
|
h('span', {
|
|
55
55
|
class: 'vxe-context-menu--link-content'
|
|
56
|
-
},
|
|
56
|
+
}, getFuncText(item.name)),
|
|
57
57
|
h('i', {
|
|
58
58
|
class: ['vxe-context-menu--link-suffix', hasChildMenus ? item.suffixIcon || 'suffix--haschild' : item.suffixIcon]
|
|
59
59
|
})
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
}),
|
|
90
90
|
h('span', {
|
|
91
91
|
class: 'vxe-context-menu--link-content'
|
|
92
|
-
},
|
|
92
|
+
}, getFuncText(child.name))
|
|
93
93
|
])
|
|
94
94
|
])
|
|
95
95
|
})) : null
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
2
2
|
import vSize from '../../mixins/size'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
|
-
import
|
|
4
|
+
import UtilTools, { getFuncText } from '../../tools/utils'
|
|
5
|
+
import DomTools from '../../tools/dom'
|
|
6
|
+
import { GlobalEvent } from '../../tools/event'
|
|
7
|
+
import { errLog } from '../../tools/log'
|
|
5
8
|
|
|
6
9
|
export const allActivedModals = []
|
|
7
10
|
export const msgQueue = []
|
|
@@ -86,7 +89,7 @@ export default {
|
|
|
86
89
|
},
|
|
87
90
|
created () {
|
|
88
91
|
if (this.storage && !this.id) {
|
|
89
|
-
|
|
92
|
+
errLog('vxe.error.reqProp', ['modal.id'])
|
|
90
93
|
}
|
|
91
94
|
},
|
|
92
95
|
mounted () {
|
|
@@ -167,7 +170,7 @@ export default {
|
|
|
167
170
|
}, headerSlot ? (!inited || (destroyOnClose && !visible) ? [] : headerSlot.call(this, { $modal: this }, h)) : [
|
|
168
171
|
titleSlot ? titleSlot.call(this, { $modal: this }, h) : h('span', {
|
|
169
172
|
class: 'vxe-modal--title'
|
|
170
|
-
}, title ?
|
|
173
|
+
}, title ? getFuncText(title) : GlobalConfig.i18n('vxe.alert.title')),
|
|
171
174
|
showZoom ? h('i', {
|
|
172
175
|
class: ['vxe-modal--zoom-btn', 'trigger--btn', zoomLocat ? GlobalConfig.icon.MODAL_ZOOM_OUT : GlobalConfig.icon.MODAL_ZOOM_IN],
|
|
173
176
|
attrs: {
|
|
@@ -199,7 +202,7 @@ export default {
|
|
|
199
202
|
]) : null,
|
|
200
203
|
h('div', {
|
|
201
204
|
class: 'vxe-modal--content'
|
|
202
|
-
}, defaultSlot ? (!inited || (destroyOnClose && !visible) ? [] : defaultSlot.call(this, { $modal: this }, h)) :
|
|
205
|
+
}, defaultSlot ? (!inited || (destroyOnClose && !visible) ? [] : defaultSlot.call(this, { $modal: this }, h)) : getFuncText(content)),
|
|
203
206
|
!isMsg ? h('div', {
|
|
204
207
|
class: ['vxe-loading', {
|
|
205
208
|
'is--visible': loading
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
2
2
|
import vSize from '../../mixins/size'
|
|
3
|
-
import
|
|
3
|
+
import UtilTools from '../../tools/utils'
|
|
4
|
+
import DomTools from '../../tools/dom'
|
|
5
|
+
import { GlobalEvent } from '../../tools/event'
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
name: 'VxePulldown',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getFuncText } from '../../tools/utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
}),
|
|
61
61
|
h('span', {
|
|
62
62
|
class: 'vxe-radio--label'
|
|
63
|
-
}, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [
|
|
63
|
+
}, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [getFuncText(content)])
|
|
64
64
|
])
|
|
65
65
|
},
|
|
66
66
|
methods: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getFuncText } from '../../tools/utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import vSize from '../../mixins/size'
|
|
4
4
|
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
}),
|
|
64
64
|
h('span', {
|
|
65
65
|
class: 'vxe-radio--label'
|
|
66
|
-
}, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [
|
|
66
|
+
}, $scopedSlots.default ? $scopedSlots.default.call(this, {}) : [getFuncText(content)])
|
|
67
67
|
])
|
|
68
68
|
},
|
|
69
69
|
methods: {
|
|
@@ -2,7 +2,9 @@ import XEUtils from 'xe-utils'
|
|
|
2
2
|
import VxeInput from '../../input/src/input'
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
4
4
|
import vSize from '../../mixins/size'
|
|
5
|
-
import
|
|
5
|
+
import UtilTools, { getFuncText } from '../../tools/utils'
|
|
6
|
+
import DomTools from '../../tools/dom'
|
|
7
|
+
import { GlobalEvent } from '../../tools/event'
|
|
6
8
|
|
|
7
9
|
function isOptionVisible (option) {
|
|
8
10
|
return option.visible !== false
|
|
@@ -146,7 +148,7 @@ export function renderOption (h, _vm, list, group) {
|
|
|
146
148
|
}
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
|
-
}, defaultSlot ? _vm.callSlot(defaultSlot, { option, $select: _vm }, h) : UtilTools.formatText(
|
|
151
|
+
}, defaultSlot ? _vm.callSlot(defaultSlot, { option, $select: _vm }, h) : UtilTools.formatText(getFuncText(option[labelField]))) : null
|
|
150
152
|
})
|
|
151
153
|
}
|
|
152
154
|
|
|
@@ -168,7 +170,7 @@ export function renderOptgroup (h, _vm) {
|
|
|
168
170
|
}, [
|
|
169
171
|
h('div', {
|
|
170
172
|
class: 'vxe-optgroup--title'
|
|
171
|
-
}, defaultSlot ? _vm.callSlot(defaultSlot, { option: group, $select: _vm }, h) :
|
|
173
|
+
}, defaultSlot ? _vm.callSlot(defaultSlot, { option: group, $select: _vm }, h) : getFuncText(group[groupLabelField])),
|
|
172
174
|
h('div', {
|
|
173
175
|
class: 'vxe-optgroup--wrapper'
|
|
174
176
|
}, renderOption(h, _vm, group[groupOptionsField], group))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getFuncText } from '../../tools/utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import vSize from '../../mixins/size'
|
|
4
|
-
import { browse } from '../../tools/
|
|
4
|
+
import { browse } from '../../tools/dom'
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
name: 'VxeSwitch',
|
|
@@ -30,10 +30,10 @@ export default {
|
|
|
30
30
|
return this.value === this.openValue
|
|
31
31
|
},
|
|
32
32
|
onShowLabel () {
|
|
33
|
-
return
|
|
33
|
+
return getFuncText(this.openLabel)
|
|
34
34
|
},
|
|
35
35
|
offShowLabel () {
|
|
36
|
-
return
|
|
36
|
+
return getFuncText(this.closeLabel)
|
|
37
37
|
},
|
|
38
38
|
styles () {
|
|
39
39
|
return browse.msie && this.isChecked ? {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import VXETable from '../../v-x-e-table'
|
|
4
|
-
import
|
|
4
|
+
import UtilTools, { isEnableConf } from '../../tools/utils'
|
|
5
5
|
import { getOffsetSize, calcTreeLine, mergeBodyMethod, removeScrollListener, restoreScrollListener } from './util'
|
|
6
|
-
import
|
|
6
|
+
import DomTools from '../../tools/dom'
|
|
7
7
|
|
|
8
8
|
const renderType = 'body'
|
|
9
9
|
|
|
@@ -83,7 +83,8 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
|
|
|
83
83
|
editStore,
|
|
84
84
|
validStore,
|
|
85
85
|
tooltipConfig,
|
|
86
|
-
rowOpts
|
|
86
|
+
rowOpts,
|
|
87
|
+
columnOpts
|
|
87
88
|
} = $xetable
|
|
88
89
|
const { type, cellRender, editRender, align, showOverflow, className, treeNode } = column
|
|
89
90
|
const { actived } = editStore
|
|
@@ -267,7 +268,7 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
|
|
|
267
268
|
'col--valid-error': hasValidError,
|
|
268
269
|
'col--current': currentColumn === column
|
|
269
270
|
}, UtilTools.getClass(className, params), UtilTools.getClass(cellClassName, params)],
|
|
270
|
-
key: columnKey ? column.id : $columnIndex,
|
|
271
|
+
key: columnKey || columnOpts.useKey ? column.id : $columnIndex,
|
|
271
272
|
attrs,
|
|
272
273
|
style: Object.assign({
|
|
273
274
|
height: hasEllipsis && (scrollYRHeight || rowHeight) ? `${scrollYRHeight || rowHeight}px` : ''
|
|
@@ -343,7 +344,7 @@ function renderRows (h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
343
344
|
rowid: rowid
|
|
344
345
|
},
|
|
345
346
|
style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null,
|
|
346
|
-
key: rowKey || treeConfig ? rowid : $rowIndex,
|
|
347
|
+
key: (rowKey || rowOpts.useKey) || treeConfig ? rowid : $rowIndex,
|
|
347
348
|
on: trOn
|
|
348
349
|
}, tableColumn.map((column, $columnIndex) => {
|
|
349
350
|
return renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData)
|
|
@@ -413,26 +414,26 @@ function syncBodyScroll (_vm, fixedType, scrollTop, elem1, elem2) {
|
|
|
413
414
|
}
|
|
414
415
|
clearTimeout(scrollProcessTimeout)
|
|
415
416
|
scrollProcessTimeout = setTimeout(() => {
|
|
416
|
-
const { tableBody, leftBody, rightBody } = _vm.$refs
|
|
417
|
-
const bodyElem = tableBody.$el
|
|
418
|
-
const leftElem = leftBody ? leftBody.$el : null
|
|
419
|
-
const rightElem = rightBody ? rightBody.$el : null
|
|
417
|
+
// const { tableBody, leftBody, rightBody } = _vm.$refs
|
|
418
|
+
// const bodyElem = tableBody.$el
|
|
419
|
+
// const leftElem = leftBody ? leftBody.$el : null
|
|
420
|
+
// const rightElem = rightBody ? rightBody.$el : null
|
|
420
421
|
restoreScrollListener(elem1)
|
|
421
422
|
restoreScrollListener(elem2)
|
|
422
423
|
// 检查滚动条是的同步
|
|
423
|
-
let targetTop = bodyElem.scrollTop
|
|
424
|
-
if (fixedType === 'left') {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
} else if (fixedType === 'right') {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
setScrollTop(bodyElem, targetTop)
|
|
434
|
-
setScrollTop(leftElem, targetTop)
|
|
435
|
-
setScrollTop(rightElem, targetTop)
|
|
424
|
+
// let targetTop = bodyElem.scrollTop
|
|
425
|
+
// if (fixedType === 'left') {
|
|
426
|
+
// if (leftElem) {
|
|
427
|
+
// targetTop = leftElem.scrollTop
|
|
428
|
+
// }
|
|
429
|
+
// } else if (fixedType === 'right') {
|
|
430
|
+
// if (rightElem) {
|
|
431
|
+
// targetTop = rightElem.scrollTop
|
|
432
|
+
// }
|
|
433
|
+
// }
|
|
434
|
+
// setScrollTop(bodyElem, targetTop)
|
|
435
|
+
// setScrollTop(leftElem, targetTop)
|
|
436
|
+
// setScrollTop(rightElem, targetTop)
|
|
436
437
|
}, 300)
|
|
437
438
|
}
|
|
438
439
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
3
3
|
import VXETable from '../../v-x-e-table'
|
|
4
|
-
import
|
|
5
|
-
import { eqEmptyValue, isEnableConf } from '../../tools/
|
|
4
|
+
import DomTools from '../../tools/dom'
|
|
5
|
+
import UtilTools, { eqEmptyValue, isEnableConf, getFuncText } from '../../tools/utils'
|
|
6
|
+
import { getColumnConfig } from './util'
|
|
6
7
|
|
|
7
8
|
function renderHelpIcon (h, params) {
|
|
8
9
|
const { $table, column } = params
|
|
@@ -136,7 +137,7 @@ export const Cell = {
|
|
|
136
137
|
renMaps.renderHeader = this.renderFilterHeader
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
return
|
|
140
|
+
return getColumnConfig($xetable, _vm, renMaps)
|
|
140
141
|
},
|
|
141
142
|
/**
|
|
142
143
|
* 单元格
|
|
@@ -182,7 +183,7 @@ export const Cell = {
|
|
|
182
183
|
// 如果设置占位符
|
|
183
184
|
h('span', {
|
|
184
185
|
class: 'vxe-cell--placeholder'
|
|
185
|
-
}, UtilTools.formatText(
|
|
186
|
+
}, UtilTools.formatText(getFuncText(cellPlaceholder), 1))
|
|
186
187
|
] : UtilTools.formatText(cellValue, 1))
|
|
187
188
|
]
|
|
188
189
|
},
|