vxe-table 3.4.13 → 3.4.14-beta.3
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 -2
- package/README.zh-TW.md +2 -2
- package/lib/export/style/style.css +2 -0
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/src/mixin.js +24 -13
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/filter/style/style.css +2 -0
- package/lib/filter/style/style.min.css +1 -1
- package/lib/form/src/form.js +4 -0
- package/lib/form/src/form.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +490 -349
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/date.js +54 -0
- package/lib/input/src/date.min.js +1 -0
- package/lib/input/src/input.js +12 -59
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/src/number.js +23 -0
- package/lib/input/src/number.min.js +1 -0
- package/lib/pager/src/pager.js +15 -1
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +36 -10
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +5 -6
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +365 -301
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +2 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/style/style.css +2 -0
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/src/dom.js +14 -1
- package/lib/tools/src/dom.min.js +1 -1
- package/lib/validator/src/mixin.js +2 -0
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +1 -1
- package/packages/filter/src/mixin.js +17 -10
- package/packages/form/src/form.js +4 -3
- package/packages/input/src/date.js +38 -0
- package/packages/input/src/input.js +4 -46
- package/packages/input/src/number.js +12 -0
- package/packages/pager/src/pager.js +15 -1
- package/packages/table/src/body.js +32 -11
- package/packages/table/src/cell.js +4 -6
- package/packages/table/src/methods.js +71 -20
- package/packages/tools/src/dom.js +13 -1
- package/packages/validator/src/mixin.js +11 -1
- package/styles/base/checked.scss +5 -0
- package/types/all.d.ts +1 -0
- package/types/column.d.ts +7 -1
- package/types/form.d.ts +2 -1
- package/types/table.d.ts +6 -2
|
@@ -3,7 +3,7 @@ import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
|
3
3
|
import VXETable from '../../v-x-e-table'
|
|
4
4
|
import { UtilTools, DomTools, isEnableConf } from '../../tools'
|
|
5
5
|
import { getOffsetSize, calcTreeLine, mergeBodyMethod, removeScrollListener, restoreScrollListener } from './util'
|
|
6
|
-
import { browse } from '../../tools/src/dom'
|
|
6
|
+
import { browse, setScrollLeftAndTop } from '../../tools/src/dom'
|
|
7
7
|
|
|
8
8
|
const renderType = 'body'
|
|
9
9
|
|
|
@@ -401,7 +401,7 @@ function renderRows (h, _vm, $xetable, fixedType, tableData, tableColumn) {
|
|
|
401
401
|
* 同步滚动条
|
|
402
402
|
*/
|
|
403
403
|
let scrollProcessTimeout
|
|
404
|
-
function syncBodyScroll (scrollTop, elem1, elem2) {
|
|
404
|
+
function syncBodyScroll (_vm, fixedType, scrollTop, elem1, elem2) {
|
|
405
405
|
if (elem1 || elem2) {
|
|
406
406
|
if (elem1) {
|
|
407
407
|
removeScrollListener(elem1)
|
|
@@ -412,9 +412,30 @@ function syncBodyScroll (scrollTop, elem1, elem2) {
|
|
|
412
412
|
elem2.scrollTop = scrollTop
|
|
413
413
|
}
|
|
414
414
|
clearTimeout(scrollProcessTimeout)
|
|
415
|
-
scrollProcessTimeout = setTimeout(
|
|
415
|
+
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
|
|
416
420
|
restoreScrollListener(elem1)
|
|
417
421
|
restoreScrollListener(elem2)
|
|
422
|
+
// 检查滚动条是的同步
|
|
423
|
+
let targetTop = bodyElem.scrollTop
|
|
424
|
+
let targetLeft = bodyElem.scrollLeft
|
|
425
|
+
if (fixedType === 'left') {
|
|
426
|
+
if (leftElem) {
|
|
427
|
+
targetTop = leftElem.scrollTop
|
|
428
|
+
targetLeft = leftElem.scrollLeft
|
|
429
|
+
}
|
|
430
|
+
} else if (fixedType === 'right') {
|
|
431
|
+
if (rightElem) {
|
|
432
|
+
targetTop = rightElem.scrollTop
|
|
433
|
+
targetLeft = rightElem.scrollLeft
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
setScrollLeftAndTop(bodyElem, targetLeft, targetTop)
|
|
437
|
+
setScrollLeftAndTop(leftElem, targetLeft, targetTop)
|
|
438
|
+
setScrollLeftAndTop(rightElem, targetLeft, targetTop)
|
|
418
439
|
}, 300)
|
|
419
440
|
}
|
|
420
441
|
}
|
|
@@ -621,10 +642,10 @@ export default {
|
|
|
621
642
|
}
|
|
622
643
|
if (leftElem && fixedType === 'left') {
|
|
623
644
|
scrollTop = leftElem.scrollTop
|
|
624
|
-
syncBodyScroll(scrollTop, bodyElem, rightElem)
|
|
645
|
+
syncBodyScroll($xetable, fixedType, scrollTop, bodyElem, rightElem)
|
|
625
646
|
} else if (rightElem && fixedType === 'right') {
|
|
626
647
|
scrollTop = rightElem.scrollTop
|
|
627
|
-
syncBodyScroll(scrollTop, bodyElem, leftElem)
|
|
648
|
+
syncBodyScroll($xetable, fixedType, scrollTop, bodyElem, leftElem)
|
|
628
649
|
} else {
|
|
629
650
|
if (isRollX) {
|
|
630
651
|
if (headerElem) {
|
|
@@ -637,7 +658,7 @@ export default {
|
|
|
637
658
|
if (leftElem || rightElem) {
|
|
638
659
|
$xetable.checkScrolling()
|
|
639
660
|
if (isRollY) {
|
|
640
|
-
syncBodyScroll(scrollTop, leftElem, rightElem)
|
|
661
|
+
syncBodyScroll($xetable, fixedType, scrollTop, leftElem, rightElem)
|
|
641
662
|
}
|
|
642
663
|
}
|
|
643
664
|
}
|
|
@@ -689,15 +710,15 @@ export default {
|
|
|
689
710
|
wheelYInterval = wheelYInterval - (wheelYTotal - wheelYSize)
|
|
690
711
|
}
|
|
691
712
|
const { scrollTop, clientHeight, scrollHeight } = bodyElem
|
|
692
|
-
const
|
|
693
|
-
bodyElem.scrollTop =
|
|
713
|
+
const targetTop = scrollTop + (wheelYInterval * (isTopWheel ? -1 : 1))
|
|
714
|
+
bodyElem.scrollTop = targetTop
|
|
694
715
|
if (leftElem) {
|
|
695
|
-
leftElem.scrollTop =
|
|
716
|
+
leftElem.scrollTop = targetTop
|
|
696
717
|
}
|
|
697
718
|
if (rightElem) {
|
|
698
|
-
rightElem.scrollTop =
|
|
719
|
+
rightElem.scrollTop = targetTop
|
|
699
720
|
}
|
|
700
|
-
if (isTopWheel ?
|
|
721
|
+
if (isTopWheel ? targetTop < scrollHeight - clientHeight : targetTop >= 0) {
|
|
701
722
|
this.wheelTime = setTimeout(handleSmooth, 10)
|
|
702
723
|
}
|
|
703
724
|
this.wheelYTotal = wheelYTotal
|
|
@@ -352,25 +352,23 @@ export const Cell = {
|
|
|
352
352
|
*/
|
|
353
353
|
renderCheckboxHeader (h, params) {
|
|
354
354
|
const { $table, column, isHidden } = params
|
|
355
|
-
const { isIndeterminate: isAllCheckboxIndeterminate, isAllCheckboxDisabled } = $table
|
|
355
|
+
const { isAllSelected: isAllCheckboxSelected, isIndeterminate: isAllCheckboxIndeterminate, isAllCheckboxDisabled } = $table
|
|
356
356
|
const { slots } = column
|
|
357
357
|
const headerSlot = slots ? slots.header : null
|
|
358
358
|
const titleSlot = slots ? slots.title : null
|
|
359
359
|
const checkboxOpts = $table.checkboxOpts
|
|
360
360
|
const headerTitle = column.getTitle()
|
|
361
|
-
let isChecked = false
|
|
362
361
|
let on
|
|
363
362
|
if (!isHidden) {
|
|
364
|
-
isChecked = isAllCheckboxDisabled ? false : $table.isAllSelected
|
|
365
363
|
on = {
|
|
366
364
|
click (evnt) {
|
|
367
365
|
if (!isAllCheckboxDisabled) {
|
|
368
|
-
$table.triggerCheckAllEvent(evnt, !
|
|
366
|
+
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected)
|
|
369
367
|
}
|
|
370
368
|
}
|
|
371
369
|
}
|
|
372
370
|
}
|
|
373
|
-
const checkboxParams = { ...params, checked:
|
|
371
|
+
const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate }
|
|
374
372
|
if (headerSlot) {
|
|
375
373
|
return renderTitleContent(h, checkboxParams, $table.callSlot(headerSlot, checkboxParams, h))
|
|
376
374
|
}
|
|
@@ -384,7 +382,7 @@ export const Cell = {
|
|
|
384
382
|
return renderTitleContent(h, checkboxParams, [
|
|
385
383
|
h('span', {
|
|
386
384
|
class: ['vxe-cell--checkbox', {
|
|
387
|
-
'is--checked':
|
|
385
|
+
'is--checked': isAllCheckboxSelected,
|
|
388
386
|
'is--disabled': isAllCheckboxDisabled,
|
|
389
387
|
'is--indeterminate': isAllCheckboxIndeterminate
|
|
390
388
|
}],
|
|
@@ -9,7 +9,7 @@ import { browse, getPaddingTopBottomSize, setScrollTop, setScrollLeft } from '..
|
|
|
9
9
|
import { formats } from '../../v-x-e-table/src/formats'
|
|
10
10
|
|
|
11
11
|
const { getRowid, getRowkey, setCellValue, hasChildrenList, getColumnList } = UtilTools
|
|
12
|
-
const { calcHeight, hasClass, addClass, removeClass, getEventTargetNode } = DomTools
|
|
12
|
+
const { calcHeight, hasClass, addClass, removeClass, getEventTargetNode, isNodeElement } = DomTools
|
|
13
13
|
|
|
14
14
|
const isWebkit = browse['-webkit'] && !browse.edge
|
|
15
15
|
const debounceScrollYDuration = browse.msie ? 80 : 20
|
|
@@ -294,11 +294,30 @@ const Methods = {
|
|
|
294
294
|
})
|
|
295
295
|
},
|
|
296
296
|
/**
|
|
297
|
-
*
|
|
297
|
+
* 手动处理数据,用于手动排序与筛选
|
|
298
298
|
* 对于手动更改了排序、筛选...等条件后需要重新处理数据时可能会用到
|
|
299
299
|
*/
|
|
300
300
|
updateData () {
|
|
301
|
-
|
|
301
|
+
const { scrollXLoad, scrollYLoad } = this
|
|
302
|
+
return this.handleTableData(true).then(() => {
|
|
303
|
+
this.updateFooter()
|
|
304
|
+
this.checkSelectionStatus()
|
|
305
|
+
if (scrollXLoad || scrollYLoad) {
|
|
306
|
+
if (scrollXLoad) {
|
|
307
|
+
this.updateScrollXSpace()
|
|
308
|
+
}
|
|
309
|
+
if (scrollYLoad) {
|
|
310
|
+
this.updateScrollYSpace()
|
|
311
|
+
}
|
|
312
|
+
return this.refreshScroll()
|
|
313
|
+
}
|
|
314
|
+
}).then(() => {
|
|
315
|
+
this.updateCellAreas()
|
|
316
|
+
return this.recalculate(true)
|
|
317
|
+
}).then(() => {
|
|
318
|
+
// 存在滚动行为未结束情况
|
|
319
|
+
setTimeout(() => this.recalculate(), 50)
|
|
320
|
+
})
|
|
302
321
|
},
|
|
303
322
|
handleTableData (force) {
|
|
304
323
|
const { scrollYLoad, scrollYStore, fullDataRowIdData, afterFullData } = this
|
|
@@ -1688,15 +1707,22 @@ const Methods = {
|
|
|
1688
1707
|
const leftBodyElem = leftBody ? leftBody.$el : null
|
|
1689
1708
|
const rightBodyElem = rightBody ? rightBody.$el : null
|
|
1690
1709
|
const tableFooterElem = tableFooter ? tableFooter.$el : null
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1710
|
+
return new Promise(resolve => {
|
|
1711
|
+
// 还原滚动条位置
|
|
1712
|
+
if (lastScrollLeft || lastScrollTop) {
|
|
1713
|
+
return restoreScrollLocation(this, lastScrollLeft, lastScrollTop).then(() => {
|
|
1714
|
+
// 存在滚动行为未结束情况
|
|
1715
|
+
setTimeout(resolve, 30)
|
|
1716
|
+
})
|
|
1717
|
+
}
|
|
1718
|
+
// 重置
|
|
1719
|
+
setScrollTop(tableBodyElem, lastScrollTop)
|
|
1720
|
+
setScrollTop(leftBodyElem, lastScrollTop)
|
|
1721
|
+
setScrollTop(rightBodyElem, lastScrollTop)
|
|
1722
|
+
setScrollLeft(tableFooterElem, lastScrollLeft)
|
|
1723
|
+
// 存在滚动行为未结束情况
|
|
1724
|
+
setTimeout(resolve, 30)
|
|
1725
|
+
})
|
|
1700
1726
|
},
|
|
1701
1727
|
/**
|
|
1702
1728
|
* 计算单元格列宽,动态分配可用剩余空间
|
|
@@ -1965,7 +1991,7 @@ const Methods = {
|
|
|
1965
1991
|
}
|
|
1966
1992
|
} else if (layout === 'body') {
|
|
1967
1993
|
const emptyBlockElem = elemStore[`${name}-${layout}-emptyBlock`]
|
|
1968
|
-
if (wrapperElem) {
|
|
1994
|
+
if (isNodeElement(wrapperElem)) {
|
|
1969
1995
|
if (customMaxHeight) {
|
|
1970
1996
|
wrapperElem.style.maxHeight = `${fixedType ? customMaxHeight - headerHeight - (showFooter ? 0 : scrollbarHeight) : customMaxHeight - headerHeight}px`
|
|
1971
1997
|
} else {
|
|
@@ -1981,7 +2007,7 @@ const Methods = {
|
|
|
1981
2007
|
if (fixedWrapperElem) {
|
|
1982
2008
|
const isRightFixed = fixedType === 'right'
|
|
1983
2009
|
const fixedColumn = columnStore[`${fixedType}List`]
|
|
1984
|
-
if (wrapperElem) {
|
|
2010
|
+
if (isNodeElement(wrapperElem)) {
|
|
1985
2011
|
wrapperElem.style.top = `${headerHeight}px`
|
|
1986
2012
|
}
|
|
1987
2013
|
fixedWrapperElem.style.height = `${(customHeight > 0 ? customHeight - headerHeight - footerHeight : tableHeight) + headerHeight + footerHeight - scrollbarHeight * (showFooter ? 2 : 1)}px`
|
|
@@ -2045,7 +2071,7 @@ const Methods = {
|
|
|
2045
2071
|
}
|
|
2046
2072
|
tWidth = tableColumn.reduce((previous, column) => previous + column.renderWidth, 0)
|
|
2047
2073
|
|
|
2048
|
-
if (wrapperElem) {
|
|
2074
|
+
if (isNodeElement(wrapperElem)) {
|
|
2049
2075
|
// 如果是固定列
|
|
2050
2076
|
if (fixedWrapperElem) {
|
|
2051
2077
|
wrapperElem.style.top = `${customHeight > 0 ? customHeight - footerHeight : tableHeight + headerHeight}px`
|
|
@@ -2964,14 +2990,28 @@ const Methods = {
|
|
|
2964
2990
|
const { afterFullData, selection, treeIndeterminates, checkboxOpts, treeConfig } = this
|
|
2965
2991
|
const { checkField, halfField, checkStrictly, checkMethod } = checkboxOpts
|
|
2966
2992
|
if (!checkStrictly) {
|
|
2993
|
+
const disableRows = []
|
|
2994
|
+
const checkRows = []
|
|
2995
|
+
let isAllResolve = false
|
|
2967
2996
|
let isAllSelected = false
|
|
2968
2997
|
let isIndeterminate = false
|
|
2969
2998
|
if (checkField) {
|
|
2970
|
-
|
|
2999
|
+
isAllResolve = afterFullData.every(
|
|
2971
3000
|
checkMethod
|
|
2972
|
-
? (row) =>
|
|
3001
|
+
? (row) => {
|
|
3002
|
+
if (!checkMethod({ row })) {
|
|
3003
|
+
disableRows.push(row)
|
|
3004
|
+
return true
|
|
3005
|
+
}
|
|
3006
|
+
if (XEUtils.get(row, checkField)) {
|
|
3007
|
+
checkRows.push(row)
|
|
3008
|
+
return true
|
|
3009
|
+
}
|
|
3010
|
+
return false
|
|
3011
|
+
}
|
|
2973
3012
|
: row => XEUtils.get(row, checkField)
|
|
2974
3013
|
)
|
|
3014
|
+
isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
|
|
2975
3015
|
if (treeConfig) {
|
|
2976
3016
|
if (halfField) {
|
|
2977
3017
|
isIndeterminate = !isAllSelected && afterFullData.some(row => XEUtils.get(row, checkField) || XEUtils.get(row, halfField) || treeIndeterminates.indexOf(row) > -1)
|
|
@@ -2986,11 +3026,22 @@ const Methods = {
|
|
|
2986
3026
|
}
|
|
2987
3027
|
}
|
|
2988
3028
|
} else {
|
|
2989
|
-
|
|
3029
|
+
isAllResolve = afterFullData.every(
|
|
2990
3030
|
checkMethod
|
|
2991
|
-
? (row) =>
|
|
3031
|
+
? (row) => {
|
|
3032
|
+
if (!checkMethod({ row })) {
|
|
3033
|
+
disableRows.push(row)
|
|
3034
|
+
return true
|
|
3035
|
+
}
|
|
3036
|
+
if (selection.indexOf(row) > -1) {
|
|
3037
|
+
checkRows.push(row)
|
|
3038
|
+
return true
|
|
3039
|
+
}
|
|
3040
|
+
return false
|
|
3041
|
+
}
|
|
2992
3042
|
: row => selection.indexOf(row) > -1
|
|
2993
3043
|
)
|
|
3044
|
+
isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
|
|
2994
3045
|
if (treeConfig) {
|
|
2995
3046
|
isIndeterminate = !isAllSelected && afterFullData.some(row => treeIndeterminates.indexOf(row) > -1 || selection.indexOf(row) > -1)
|
|
2996
3047
|
} else {
|
|
@@ -4585,7 +4636,7 @@ const Methods = {
|
|
|
4585
4636
|
}
|
|
4586
4637
|
|
|
4587
4638
|
// Module methods
|
|
4588
|
-
const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',')
|
|
4639
|
+
const funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',')
|
|
4589
4640
|
|
|
4590
4641
|
funcs.forEach(name => {
|
|
4591
4642
|
Methods[name] = function (...args) {
|
|
@@ -80,6 +80,17 @@ export function setScrollLeft (elem, scrollLeft) {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
export function setScrollLeftAndTop (elem, scrollLeft, scrollTop) {
|
|
84
|
+
if (elem) {
|
|
85
|
+
elem.scrollLeft = scrollLeft
|
|
86
|
+
elem.scrollTop = scrollTop
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function isNodeElement (elem) {
|
|
91
|
+
return elem && elem.nodeType === 1
|
|
92
|
+
}
|
|
93
|
+
|
|
83
94
|
export const DomTools = {
|
|
84
95
|
browse,
|
|
85
96
|
isPx (val) {
|
|
@@ -225,7 +236,8 @@ export const DomTools = {
|
|
|
225
236
|
}
|
|
226
237
|
}
|
|
227
238
|
return num
|
|
228
|
-
}
|
|
239
|
+
},
|
|
240
|
+
isNodeElement
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
export default DomTools
|
|
@@ -127,7 +127,16 @@ export default {
|
|
|
127
127
|
colVailds.push(
|
|
128
128
|
this.validCellRules('all', row, column)
|
|
129
129
|
.catch(({ rule, rules }) => {
|
|
130
|
-
const rest = {
|
|
130
|
+
const rest = {
|
|
131
|
+
rule,
|
|
132
|
+
rules,
|
|
133
|
+
rowIndex: this.getRowIndex(row),
|
|
134
|
+
row,
|
|
135
|
+
columnIndex: this.getColumnIndex(column),
|
|
136
|
+
column,
|
|
137
|
+
field: column.property,
|
|
138
|
+
$table: this
|
|
139
|
+
}
|
|
131
140
|
if (!validRest[column.property]) {
|
|
132
141
|
validRest[column.property] = []
|
|
133
142
|
}
|
|
@@ -250,6 +259,7 @@ export default {
|
|
|
250
259
|
rowIndex: this.getRowIndex(row),
|
|
251
260
|
column,
|
|
252
261
|
columnIndex: this.getColumnIndex(column),
|
|
262
|
+
field: column.property,
|
|
253
263
|
$table: this
|
|
254
264
|
})
|
|
255
265
|
if (customValid) {
|
package/styles/base/checked.scss
CHANGED
package/types/all.d.ts
CHANGED
package/types/column.d.ts
CHANGED
|
@@ -306,6 +306,13 @@ export interface ColumnOptions {
|
|
|
306
306
|
* 列对象
|
|
307
307
|
*/
|
|
308
308
|
export class ColumnInfo {
|
|
309
|
+
/**
|
|
310
|
+
* 该属性已废弃,该属性被 field 替换
|
|
311
|
+
* @deprecated
|
|
312
|
+
*/
|
|
313
|
+
property: string;
|
|
314
|
+
|
|
315
|
+
field: string;
|
|
309
316
|
title: string;
|
|
310
317
|
width: number | string;
|
|
311
318
|
minWidth: number | string;
|
|
@@ -314,7 +321,6 @@ export class ColumnInfo {
|
|
|
314
321
|
align: ColumnAlign;
|
|
315
322
|
headerAlign: ColumnAlign;
|
|
316
323
|
footerAlign: ColumnAlign;
|
|
317
|
-
property: string;
|
|
318
324
|
type: string;
|
|
319
325
|
sortable: boolean;
|
|
320
326
|
treeNode: boolean;
|
package/types/form.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class Form extends VXETableComponent {
|
|
|
33
33
|
* 对表单执行项进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
34
34
|
* @param callback 回调函数
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
validateField(callback?: (errMap?: FormValidErrMapParams) => void): Promise<any>;
|
|
37
37
|
/**
|
|
38
38
|
* 手动清除校验状态,如果指定 field 则清除指定的项,否则清除整个表单
|
|
39
39
|
* @param field 字段名
|
|
@@ -108,6 +108,7 @@ export interface FormValidErrParams {
|
|
|
108
108
|
rules: FormRule[];
|
|
109
109
|
data: any;
|
|
110
110
|
property: string;
|
|
111
|
+
field: string;
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
export interface FormValidErrMapParams {
|
package/types/table.d.ts
CHANGED
|
@@ -983,13 +983,17 @@ export declare class Table extends VXETableComponent {
|
|
|
983
983
|
*/
|
|
984
984
|
openPrint(options?: TablePrintConfig): Promise<any>;
|
|
985
985
|
/**
|
|
986
|
-
*
|
|
986
|
+
* 打开单元格查找窗口
|
|
987
987
|
*/
|
|
988
988
|
openFind(): Promise<any>;
|
|
989
989
|
/**
|
|
990
|
-
*
|
|
990
|
+
* 打开单元格替换窗口
|
|
991
991
|
*/
|
|
992
992
|
openReplace(): Promise<any>;
|
|
993
|
+
/**
|
|
994
|
+
* 手动关闭查找与替换窗口
|
|
995
|
+
*/
|
|
996
|
+
closeFNR(): Promise<any>;
|
|
993
997
|
/**
|
|
994
998
|
* 连接工具栏
|
|
995
999
|
* @param toolbar 工具栏组件实例
|