vxe-table 4.16.0-beta.0 → 4.16.0-beta.2
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 +1 -0
- package/es/style.css +1 -1
- package/es/table/module/custom/hook.js +2 -1
- package/es/table/module/custom/panel.js +4 -0
- package/es/table/module/edit/hook.js +3 -2
- package/es/table/module/export/export-panel.js +3 -0
- package/es/table/module/export/hook.js +45 -24
- package/es/table/module/export/import-panel.js +3 -0
- package/es/table/module/menu/hook.js +2 -1
- package/es/table/module/validator/hook.js +3 -1
- package/es/table/src/body.js +7 -2
- package/es/table/src/column.js +1 -0
- package/es/table/src/columnInfo.js +5 -3
- package/es/table/src/footer.js +2 -0
- package/es/table/src/group.js +1 -0
- package/es/table/src/header.js +2 -0
- package/es/table/src/table.js +32 -26
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +1 -0
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +117 -49
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +2 -1
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +5 -2
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -0
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/hook.js +52 -19
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -0
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/menu/hook.js +2 -0
- package/lib/table/module/menu/hook.min.js +1 -1
- package/lib/table/module/validator/hook.js +3 -1
- package/lib/table/module/validator/hook.min.js +1 -1
- package/lib/table/src/body.js +8 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +1 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -2
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -0
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -0
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +2 -0
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +20 -20
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- 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/package.json +1 -1
- package/packages/grid/src/grid.ts +1 -0
- package/packages/table/module/custom/hook.ts +2 -1
- package/packages/table/module/custom/panel.ts +4 -0
- package/packages/table/module/edit/hook.ts +3 -2
- package/packages/table/module/export/export-panel.ts +3 -0
- package/packages/table/module/export/hook.ts +52 -26
- package/packages/table/module/export/import-panel.ts +3 -0
- package/packages/table/module/menu/hook.ts +2 -1
- package/packages/table/module/validator/hook.ts +3 -1
- package/packages/table/src/body.ts +7 -2
- package/packages/table/src/column.ts +1 -0
- package/packages/table/src/columnInfo.ts +5 -3
- package/packages/table/src/footer.ts +2 -0
- package/packages/table/src/group.ts +1 -0
- package/packages/table/src/header.ts +2 -0
- package/packages/table/src/table.ts +33 -26
- /package/es/{iconfont.1755178488627.ttf → iconfont.1755245648660.ttf} +0 -0
- /package/es/{iconfont.1755178488627.woff → iconfont.1755245648660.woff} +0 -0
- /package/es/{iconfont.1755178488627.woff2 → iconfont.1755245648660.woff2} +0 -0
- /package/lib/{iconfont.1755178488627.ttf → iconfont.1755245648660.ttf} +0 -0
- /package/lib/{iconfont.1755178488627.woff → iconfont.1755245648660.woff} +0 -0
- /package/lib/{iconfont.1755178488627.woff2 → iconfont.1755245648660.woff2} +0 -0
|
@@ -362,13 +362,15 @@ export default defineVxeComponent({
|
|
|
362
362
|
|
|
363
363
|
const $xeGrid = inject<(VxeGridConstructor & VxeGridPrivateMethods) | null>('$xeGrid', null)
|
|
364
364
|
const $xeGantt = inject('$xeGantt', null)
|
|
365
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
366
|
+
|
|
365
367
|
let $xeToolbar: VxeToolbarConstructor
|
|
366
368
|
|
|
367
369
|
const computeTableId = computed(() => {
|
|
368
370
|
const { id } = props
|
|
369
371
|
if (id) {
|
|
370
372
|
if (XEUtils.isFunction(id)) {
|
|
371
|
-
return `${id({ $table: $xeTable, $grid: $xeGrid }) || ''}`
|
|
373
|
+
return `${id({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) || ''}`
|
|
372
374
|
}
|
|
373
375
|
return `${id}`
|
|
374
376
|
}
|
|
@@ -3864,6 +3866,7 @@ export default defineVxeComponent({
|
|
|
3864
3866
|
|
|
3865
3867
|
const updateScrollYStatus = (fullData?: any[]) => {
|
|
3866
3868
|
const { treeConfig } = props
|
|
3869
|
+
const $xeGanttView = internalData.xeGanttView
|
|
3867
3870
|
const virtualYOpts = computeVirtualYOpts.value
|
|
3868
3871
|
const treeOpts = computeTreeOpts.value
|
|
3869
3872
|
const { transform } = treeOpts
|
|
@@ -3871,6 +3874,9 @@ export default defineVxeComponent({
|
|
|
3871
3874
|
// 如果gt为0,则总是启用
|
|
3872
3875
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length)
|
|
3873
3876
|
reactData.scrollYLoad = scrollYLoad
|
|
3877
|
+
if ($xeGanttView) {
|
|
3878
|
+
$xeGanttView.updateScrollYStatus(scrollYLoad)
|
|
3879
|
+
}
|
|
3874
3880
|
return scrollYLoad
|
|
3875
3881
|
}
|
|
3876
3882
|
|
|
@@ -4250,7 +4256,7 @@ export default defineVxeComponent({
|
|
|
4250
4256
|
}
|
|
4251
4257
|
|
|
4252
4258
|
const dispatchEvent = (type: ValueOf<VxeTableEmits>, params: Record<string, any>, evnt: Event | null) => {
|
|
4253
|
-
emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid }, params))
|
|
4259
|
+
emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }, params))
|
|
4254
4260
|
}
|
|
4255
4261
|
|
|
4256
4262
|
const handleScrollToRowColumn = (fieldOrColumn: string | VxeTableDefines.ColumnInfo | null, row?: any) => {
|
|
@@ -6895,7 +6901,7 @@ export default defineVxeComponent({
|
|
|
6895
6901
|
if (showFooter && footerData && footerData.length) {
|
|
6896
6902
|
footData = footerData.slice(0)
|
|
6897
6903
|
} else if (showFooter && footerMethod) {
|
|
6898
|
-
footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid }) : []
|
|
6904
|
+
footData = visibleColumn.length ? footerMethod({ columns: visibleColumn, data: afterFullData, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) : []
|
|
6899
6905
|
}
|
|
6900
6906
|
reactData.footerTableData = footData
|
|
6901
6907
|
$xeTable.handleUpdateFooterMerge()
|
|
@@ -7264,7 +7270,7 @@ export default defineVxeComponent({
|
|
|
7264
7270
|
}
|
|
7265
7271
|
}
|
|
7266
7272
|
} else if (mouseConfig) {
|
|
7267
|
-
if (!getEventTargetNode(evnt, el).flag && !($
|
|
7273
|
+
if (!getEventTargetNode(evnt, el).flag && !($xeGGWrapper && getEventTargetNode(evnt, $xeGGWrapper.getRefMaps().refElem.value).flag) && !(tableMenu && getEventTargetNode(evnt, tableMenu.getRefMaps().refElem.value).flag) && !($xeToolbar && getEventTargetNode(evnt, $xeToolbar.getRefMaps().refElem.value).flag)) {
|
|
7268
7274
|
if ($xeTable.clearSelected) {
|
|
7269
7275
|
$xeTable.clearSelected()
|
|
7270
7276
|
}
|
|
@@ -7288,7 +7294,7 @@ export default defineVxeComponent({
|
|
|
7288
7294
|
$xeTable.closeMenu()
|
|
7289
7295
|
}
|
|
7290
7296
|
}
|
|
7291
|
-
const isActivated = getEventTargetNode(evnt, $
|
|
7297
|
+
const isActivated = getEventTargetNode(evnt, $xeGGWrapper ? $xeGGWrapper.getRefMaps().refElem.value : el).flag
|
|
7292
7298
|
// 如果存在校验,点击了表格之外则清除
|
|
7293
7299
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
7294
7300
|
reactData.validErrorMaps = {}
|
|
@@ -7561,7 +7567,8 @@ export default defineVxeComponent({
|
|
|
7561
7567
|
column: selected.column,
|
|
7562
7568
|
columnIndex: tableMethods.getColumnIndex(selected.column),
|
|
7563
7569
|
$table: $xeTable,
|
|
7564
|
-
$grid: $xeGrid
|
|
7570
|
+
$grid: $xeGrid,
|
|
7571
|
+
$gantt: $xeGantt
|
|
7565
7572
|
}
|
|
7566
7573
|
// 是否被禁用
|
|
7567
7574
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -7586,7 +7593,8 @@ export default defineVxeComponent({
|
|
|
7586
7593
|
column: selected.column,
|
|
7587
7594
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
7588
7595
|
$table: $xeTable,
|
|
7589
|
-
$grid: $xeGrid
|
|
7596
|
+
$grid: $xeGrid,
|
|
7597
|
+
$gantt: $xeGantt
|
|
7590
7598
|
}
|
|
7591
7599
|
// 是否被禁用
|
|
7592
7600
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -7610,7 +7618,8 @@ export default defineVxeComponent({
|
|
|
7610
7618
|
rowIndex: $xeTable.getRowIndex(parentRow),
|
|
7611
7619
|
$rowIndex: $xeTable.getVMRowIndex(parentRow),
|
|
7612
7620
|
$table: $xeTable,
|
|
7613
|
-
$grid: $xeGrid
|
|
7621
|
+
$grid: $xeGrid,
|
|
7622
|
+
$gantt: $xeGantt
|
|
7614
7623
|
}
|
|
7615
7624
|
$xeTable.setTreeExpand(parentRow, false)
|
|
7616
7625
|
.then(() => $xeTable.scrollToRow(parentRow))
|
|
@@ -7631,9 +7640,10 @@ export default defineVxeComponent({
|
|
|
7631
7640
|
column: selected.column,
|
|
7632
7641
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
7633
7642
|
$table: $xeTable,
|
|
7634
|
-
$grid: $xeGrid
|
|
7643
|
+
$grid: $xeGrid,
|
|
7644
|
+
$gantt: $xeGantt
|
|
7635
7645
|
}
|
|
7636
|
-
if (!beforeEditMethod || beforeEditMethod({ ...selected.args, $table: $xeTable, $grid: $xeGrid })) {
|
|
7646
|
+
if (!beforeEditMethod || beforeEditMethod({ ...selected.args, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt })) {
|
|
7637
7647
|
if (editMethod) {
|
|
7638
7648
|
editMethod(params)
|
|
7639
7649
|
} else {
|
|
@@ -7954,8 +7964,8 @@ export default defineVxeComponent({
|
|
|
7954
7964
|
|
|
7955
7965
|
const callSlot = <T>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T): VxeComponentSlotType[] => {
|
|
7956
7966
|
if (slotFunc) {
|
|
7957
|
-
if ($
|
|
7958
|
-
return $
|
|
7967
|
+
if ($xeGGWrapper) {
|
|
7968
|
+
return $xeGGWrapper.callSlot(slotFunc, params)
|
|
7959
7969
|
}
|
|
7960
7970
|
// if (XEUtils.isString(slotFunc)) {
|
|
7961
7971
|
// slotFunc = slots[slotFunc] || null
|
|
@@ -7981,8 +7991,8 @@ export default defineVxeComponent({
|
|
|
7981
7991
|
*/
|
|
7982
7992
|
getParentElem () {
|
|
7983
7993
|
const el = refElem.value
|
|
7984
|
-
if ($
|
|
7985
|
-
const gridEl = $
|
|
7994
|
+
if ($xeGGWrapper) {
|
|
7995
|
+
const gridEl = $xeGGWrapper.getRefMaps().refElem.value
|
|
7986
7996
|
return gridEl ? gridEl.parentNode as HTMLElement : null
|
|
7987
7997
|
}
|
|
7988
7998
|
return el ? el.parentNode as HTMLElement : null
|
|
@@ -7998,8 +8008,8 @@ export default defineVxeComponent({
|
|
|
7998
8008
|
const parentPaddingSize = height === '100%' || height === 'auto' ? getPaddingTopBottomSize(parentElem) : 0
|
|
7999
8009
|
let parentWrapperHeight = 0
|
|
8000
8010
|
if (parentElem) {
|
|
8001
|
-
if ($
|
|
8002
|
-
parentWrapperHeight = $
|
|
8011
|
+
if ($xeGGWrapper && hasClass(parentElem, 'vxe-grid--table-wrapper')) {
|
|
8012
|
+
parentWrapperHeight = $xeGGWrapper.getParentHeight()
|
|
8003
8013
|
} else {
|
|
8004
8014
|
parentWrapperHeight = parentElem.clientHeight
|
|
8005
8015
|
}
|
|
@@ -8014,7 +8024,7 @@ export default defineVxeComponent({
|
|
|
8014
8024
|
* 如果存在表尾合计滚动条,则需要排除滚动条高度
|
|
8015
8025
|
*/
|
|
8016
8026
|
getExcludeHeight () {
|
|
8017
|
-
return $
|
|
8027
|
+
return $xeGGWrapper ? $xeGGWrapper.getExcludeHeight() : 0
|
|
8018
8028
|
},
|
|
8019
8029
|
/**
|
|
8020
8030
|
* 定义行数据中的列属性,如果不存在则定义
|
|
@@ -8671,7 +8681,7 @@ export default defineVxeComponent({
|
|
|
8671
8681
|
let isStop = false
|
|
8672
8682
|
for (let i = 0; i < evntList.length; i++) {
|
|
8673
8683
|
const func = evntList[i]
|
|
8674
|
-
const fnRest = func(Object.assign({ $grid: $xeGrid,
|
|
8684
|
+
const fnRest = func(Object.assign({ $table: $xeTable, $grid: $xeGrid, gantt: $xeGantt, $event: evnt }, args))
|
|
8675
8685
|
if (fnRest === false) {
|
|
8676
8686
|
isStop = true
|
|
8677
8687
|
break
|
|
@@ -10941,7 +10951,6 @@ export default defineVxeComponent({
|
|
|
10941
10951
|
updateScrollXSpace () {
|
|
10942
10952
|
const { scrollXLoad, overflowX, scrollXWidth } = reactData
|
|
10943
10953
|
const { visibleColumn, scrollXStore, elemStore, fullColumnIdData } = internalData
|
|
10944
|
-
const $xeGanttView = internalData.xeGanttView
|
|
10945
10954
|
const mouseOpts = computeMouseOpts.value
|
|
10946
10955
|
const tableBody = refTableBody.value
|
|
10947
10956
|
const tableBodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
|
|
@@ -11014,9 +11023,6 @@ export default defineVxeComponent({
|
|
|
11014
11023
|
if (isScrollXBig && mouseOpts.area) {
|
|
11015
11024
|
errLog('vxe.error.notProp', ['mouse-config.area'])
|
|
11016
11025
|
}
|
|
11017
|
-
if ($xeGanttView) {
|
|
11018
|
-
$xeGanttView.updateScrollXSpace()
|
|
11019
|
-
}
|
|
11020
11026
|
return nextTick().then(() => {
|
|
11021
11027
|
updateStyle()
|
|
11022
11028
|
})
|
|
@@ -11312,7 +11318,7 @@ export default defineVxeComponent({
|
|
|
11312
11318
|
const renderEmptyBody = () => {
|
|
11313
11319
|
const emptyOpts = computeEmptyOpts.value
|
|
11314
11320
|
const emptySlot = slots.empty
|
|
11315
|
-
const emptyParams = { $table: $xeTable, $grid: $xeGrid }
|
|
11321
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, gantt: $xeGantt }
|
|
11316
11322
|
if (emptySlot) {
|
|
11317
11323
|
return emptySlot(emptyParams)
|
|
11318
11324
|
} else {
|
|
@@ -11459,8 +11465,9 @@ export default defineVxeComponent({
|
|
|
11459
11465
|
_columnIndex = colRest._index
|
|
11460
11466
|
}
|
|
11461
11467
|
const expandParams: VxeTableDefines.CellRenderDataParams = {
|
|
11462
|
-
$grid: $xeGrid,
|
|
11463
11468
|
$table: $xeTable,
|
|
11469
|
+
$grid: $xeGrid,
|
|
11470
|
+
$gantt: $xeGantt,
|
|
11464
11471
|
seq,
|
|
11465
11472
|
column: expandColumn,
|
|
11466
11473
|
columnIndex,
|
|
@@ -11784,7 +11791,7 @@ export default defineVxeComponent({
|
|
|
11784
11791
|
text: loadingOpts.text
|
|
11785
11792
|
}, loadingSlot
|
|
11786
11793
|
? {
|
|
11787
|
-
default: () => callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, loading: currLoading })
|
|
11794
|
+
default: () => callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading })
|
|
11788
11795
|
}
|
|
11789
11796
|
: {})
|
|
11790
11797
|
: loadingSlot
|
|
@@ -11792,7 +11799,7 @@ export default defineVxeComponent({
|
|
|
11792
11799
|
class: ['vxe-loading--custom-wrapper', {
|
|
11793
11800
|
'is--visible': currLoading
|
|
11794
11801
|
}]
|
|
11795
|
-
}, callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, loading: currLoading }))
|
|
11802
|
+
}, callSlot(loadingSlot, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt, loading: currLoading }))
|
|
11796
11803
|
: renderEmptyElement($xeTable),
|
|
11797
11804
|
/**
|
|
11798
11805
|
* 自定义列
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|