vxe-table 3.4.14-beta.2 → 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 +2 -6
- 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 +28 -21
- 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 +8 -3
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +48 -38
- 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 +13 -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 +2322 -2170
- 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 +46 -22
- 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 +339 -307
- 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} +12 -1
- package/lib/tools/dom.min.js +1 -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 +89 -50
- 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 +4 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -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 +3 -3
- 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 +18 -14
- 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 +7 -2
- package/packages/form/src/form.js +29 -23
- package/packages/form/src/render.js +4 -4
- package/packages/form/src/util.js +9 -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 +36 -17
- 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 +100 -75
- 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} +13 -1
- 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 +49 -24
- package/packages/v-x-e-table/index.js +4 -2
- package/packages/v-x-e-table/src/conf.js +4 -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/README.en.md +0 -170
- package/README.zh-TW.md +0 -174
- package/lib/tools/index.js +0 -76
- package/lib/tools/index.min.js +0 -1
- package/lib/tools/src/dom.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 {
|
|
6
|
-
import {
|
|
5
|
+
import { isEnableConf, eqEmptyValue, getFuncText } from '../../tools/utils'
|
|
6
|
+
import DomTools, { browse } from '../../tools/dom'
|
|
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
|
})
|
|
@@ -325,6 +325,10 @@ export default {
|
|
|
325
325
|
}, { children: 'children' })
|
|
326
326
|
return itemList
|
|
327
327
|
},
|
|
328
|
+
getItemByField (field) {
|
|
329
|
+
const rest = XEUtils.findTree(this.formItems, item => item.field === field, { children: 'children' })
|
|
330
|
+
return rest ? rest.item : null
|
|
331
|
+
},
|
|
328
332
|
toggleCollapse () {
|
|
329
333
|
const status = !this.collapseAll
|
|
330
334
|
this.collapseAll = status
|
|
@@ -416,11 +420,15 @@ export default {
|
|
|
416
420
|
},
|
|
417
421
|
handleTargetLeaveEvent () {
|
|
418
422
|
const { tooltipOpts } = this
|
|
423
|
+
let $tooltip = this.$refs.tooltip
|
|
419
424
|
this.tooltipActive = false
|
|
425
|
+
if ($tooltip) {
|
|
426
|
+
$tooltip.setActived(false)
|
|
427
|
+
}
|
|
420
428
|
if (tooltipOpts.enterable) {
|
|
421
429
|
this.tooltipTimeout = setTimeout(() => {
|
|
422
|
-
|
|
423
|
-
if ($tooltip && !$tooltip.
|
|
430
|
+
$tooltip = this.$refs.tooltip
|
|
431
|
+
if ($tooltip && !$tooltip.isActived()) {
|
|
424
432
|
this.closeTooltip()
|
|
425
433
|
}
|
|
426
434
|
}, tooltipOpts.leaveDelay)
|
|
@@ -428,15 +436,14 @@ export default {
|
|
|
428
436
|
this.closeTooltip()
|
|
429
437
|
}
|
|
430
438
|
},
|
|
431
|
-
clearValidate (
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
const item = itemList.find(item => item.field === field)
|
|
439
|
+
clearValidate (fieldOrItem) {
|
|
440
|
+
if (fieldOrItem) {
|
|
441
|
+
const item = handleFieldOrItem(this, fieldOrItem)
|
|
435
442
|
if (item) {
|
|
436
443
|
item.showError = false
|
|
437
444
|
}
|
|
438
445
|
} else {
|
|
439
|
-
|
|
446
|
+
this.getItems().forEach(item => {
|
|
440
447
|
item.showError = false
|
|
441
448
|
})
|
|
442
449
|
}
|
|
@@ -446,8 +453,9 @@ export default {
|
|
|
446
453
|
this.clearValidate()
|
|
447
454
|
return this.beginValidate(this.getItems(), '', callback)
|
|
448
455
|
},
|
|
449
|
-
validateField (
|
|
450
|
-
|
|
456
|
+
validateField (fieldOrItem, callback) {
|
|
457
|
+
const item = handleFieldOrItem(this, fieldOrItem)
|
|
458
|
+
return this.beginValidate(item ? [item] : [], '', callback)
|
|
451
459
|
},
|
|
452
460
|
beginValidate (itemList, type, callback) {
|
|
453
461
|
const { data, rules: formRules, validOpts } = this
|
|
@@ -480,7 +488,7 @@ export default {
|
|
|
480
488
|
callback()
|
|
481
489
|
}
|
|
482
490
|
}).catch(() => {
|
|
483
|
-
return new Promise((resolve
|
|
491
|
+
return new Promise((resolve) => {
|
|
484
492
|
this.showErrTime = setTimeout(() => {
|
|
485
493
|
itemList.forEach(item => {
|
|
486
494
|
if (item.errRule) {
|
|
@@ -497,7 +505,7 @@ export default {
|
|
|
497
505
|
callback(validRest)
|
|
498
506
|
resolve()
|
|
499
507
|
} else {
|
|
500
|
-
|
|
508
|
+
resolve(validRest)
|
|
501
509
|
}
|
|
502
510
|
})
|
|
503
511
|
})
|
|
@@ -574,9 +582,8 @@ export default {
|
|
|
574
582
|
},
|
|
575
583
|
handleFocus (fields) {
|
|
576
584
|
const { $el } = this
|
|
577
|
-
const itemList = this.getItems()
|
|
578
585
|
fields.some((property, index) => {
|
|
579
|
-
const item =
|
|
586
|
+
const item = this.getItemByField(property)
|
|
580
587
|
if (item && isEnableConf(item.itemRender)) {
|
|
581
588
|
const { itemRender } = item
|
|
582
589
|
const compConf = VXETable.renderer.get(itemRender.name)
|
|
@@ -619,8 +626,7 @@ export default {
|
|
|
619
626
|
this.clearValidate(property)
|
|
620
627
|
})
|
|
621
628
|
.catch(({ rule }) => {
|
|
622
|
-
const
|
|
623
|
-
const item = itemList.find(item => item.field === property)
|
|
629
|
+
const item = this.getItemByField(property)
|
|
624
630
|
if (item) {
|
|
625
631
|
item.showError = true
|
|
626
632
|
item.errRule = rule
|
|
@@ -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
|
}
|
|
@@ -49,6 +49,13 @@ export function getItemConfig ($xeform, _vm, options) {
|
|
|
49
49
|
return isItem(_vm) ? _vm : new ItemConfig($xeform, _vm, options)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export const handleFieldOrItem = ($xeform, fieldOrItem) => {
|
|
53
|
+
if (fieldOrItem) {
|
|
54
|
+
return XEUtils.isString(fieldOrItem) ? $xeform.getItemByField(fieldOrItem) : fieldOrItem
|
|
55
|
+
}
|
|
56
|
+
return null
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
export function createItem ($xeform, _vm) {
|
|
53
60
|
return getItemConfig($xeform, _vm)
|
|
54
61
|
}
|
|
@@ -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 ? {
|