vxe-table 4.17.26 → 4.17.28
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/locale/lang/ar-EG.js +16 -11
- package/es/locale/lang/de-DE.js +16 -11
- package/es/locale/lang/en-US.js +19 -14
- package/es/locale/lang/es-ES.js +16 -11
- package/es/locale/lang/fr-FR.js +16 -11
- package/es/locale/lang/hu-HU.js +16 -11
- package/es/locale/lang/hy-AM.js +16 -11
- package/es/locale/lang/id-ID.js +16 -11
- package/es/locale/lang/it-IT.js +16 -11
- package/es/locale/lang/ja-JP.js +16 -11
- package/es/locale/lang/ko-KR.js +16 -11
- package/es/locale/lang/ms-MY.js +16 -11
- package/es/locale/lang/nb-NO.js +16 -11
- package/es/locale/lang/pt-BR.js +16 -11
- package/es/locale/lang/ru-RU.js +16 -11
- package/es/locale/lang/th-TH.js +16 -11
- package/es/locale/lang/ug-CN.js +16 -11
- package/es/locale/lang/uk-UA.js +16 -11
- package/es/locale/lang/uz-UZ.js +16 -11
- package/es/locale/lang/vi-VN.js +16 -11
- package/es/locale/lang/zh-CHT.js +16 -11
- package/es/locale/lang/zh-CN.js +15 -12
- package/es/style.css +1 -1
- package/es/table/src/table.js +40 -28
- package/es/ui/index.js +1 -1
- package/es/{table → ui}/src/anime.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +33 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +16 -11
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +16 -11
- package/lib/locale/lang/de-DE.js +16 -11
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +16 -11
- package/lib/locale/lang/en-US.js +19 -14
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +19 -14
- package/lib/locale/lang/es-ES.js +16 -11
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +16 -11
- package/lib/locale/lang/fr-FR.js +16 -11
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +16 -11
- package/lib/locale/lang/hu-HU.js +16 -11
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +16 -11
- package/lib/locale/lang/hy-AM.js +16 -11
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +16 -11
- package/lib/locale/lang/id-ID.js +16 -11
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +16 -11
- package/lib/locale/lang/it-IT.js +16 -11
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +16 -11
- package/lib/locale/lang/ja-JP.js +16 -11
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +16 -11
- package/lib/locale/lang/ko-KR.js +16 -11
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +16 -11
- package/lib/locale/lang/ms-MY.js +16 -11
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +16 -11
- package/lib/locale/lang/nb-NO.js +16 -11
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +16 -11
- package/lib/locale/lang/pt-BR.js +16 -11
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +16 -11
- package/lib/locale/lang/ru-RU.js +16 -11
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +16 -11
- package/lib/locale/lang/th-TH.js +16 -11
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +16 -11
- package/lib/locale/lang/ug-CN.js +16 -11
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +16 -11
- package/lib/locale/lang/uk-UA.js +16 -11
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +16 -11
- package/lib/locale/lang/uz-UZ.js +16 -11
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +16 -11
- package/lib/locale/lang/vi-VN.js +16 -11
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +16 -11
- package/lib/locale/lang/zh-CHT.js +16 -11
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +16 -11
- package/lib/locale/lang/zh-CN.js +15 -12
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +15 -12
- package/lib/style.css +1 -1
- package/lib/table/src/table.js +16 -16
- 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/{table → ui}/src/anime.js +1 -1
- package/lib/ui/src/anime.min.js +1 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/locale/lang/ar-EG.ts +16 -11
- package/packages/locale/lang/de-DE.ts +16 -11
- package/packages/locale/lang/en-US.ts +19 -14
- package/packages/locale/lang/es-ES.ts +16 -11
- package/packages/locale/lang/fr-FR.ts +16 -11
- package/packages/locale/lang/hu-HU.ts +16 -11
- package/packages/locale/lang/hy-AM.ts +16 -11
- package/packages/locale/lang/id-ID.ts +16 -11
- package/packages/locale/lang/it-IT.ts +16 -11
- package/packages/locale/lang/ja-JP.ts +16 -11
- package/packages/locale/lang/ko-KR.ts +16 -11
- package/packages/locale/lang/ms-MY.ts +16 -11
- package/packages/locale/lang/nb-NO.ts +16 -11
- package/packages/locale/lang/pt-BR.ts +16 -11
- package/packages/locale/lang/ru-RU.ts +16 -11
- package/packages/locale/lang/th-TH.ts +16 -11
- package/packages/locale/lang/ug-CN.ts +16 -11
- package/packages/locale/lang/uk-UA.ts +16 -11
- package/packages/locale/lang/uz-UZ.ts +16 -11
- package/packages/locale/lang/vi-VN.ts +16 -11
- package/packages/locale/lang/zh-CHT.ts +16 -11
- package/packages/locale/lang/zh-CN.ts +15 -12
- package/packages/table/src/table.ts +40 -29
- package/packages/{table → ui}/src/anime.ts +1 -1
- package/lib/table/src/anime.min.js +0 -1
- /package/es/{iconfont.1764834414498.ttf → iconfont.1765353166500.ttf} +0 -0
- /package/es/{iconfont.1764834414498.woff → iconfont.1765353166500.woff} +0 -0
- /package/es/{iconfont.1764834414498.woff2 → iconfont.1765353166500.woff2} +0 -0
- /package/lib/{iconfont.1764834414498.ttf → iconfont.1765353166500.ttf} +0 -0
- /package/lib/{iconfont.1764834414498.woff → iconfont.1765353166500.woff} +0 -0
- /package/lib/{iconfont.1764834414498.woff2 → iconfont.1765353166500.woff2} +0 -0
|
@@ -6,7 +6,7 @@ import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf,
|
|
|
6
6
|
import { VxeUI } from '../../ui'
|
|
7
7
|
import { createInternalData, getRowUniqueId, clearTableAllStatus, getColumnList, toFilters, hasDeepKey, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getRefElem, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getCalcHeight, getCellRestHeight, getLastChildColumn } from './util'
|
|
8
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
9
|
-
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '
|
|
9
|
+
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime'
|
|
10
10
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
11
11
|
import { getCrossTableDragRowInfo } from './store'
|
|
12
12
|
import Cell from './cell'
|
|
@@ -527,10 +527,10 @@ export default defineVxeComponent({
|
|
|
527
527
|
const cellOpts = computeCellOpts.value
|
|
528
528
|
let headCellHeight = XEUtils.toNumber(getCalcHeight(headerCellOpts.height || cellOpts.height))
|
|
529
529
|
if ($xeGantt) {
|
|
530
|
-
const {
|
|
531
|
-
const
|
|
532
|
-
if (
|
|
533
|
-
const ganttMinHeadCellHeight = defaultRowHeight / 2 *
|
|
530
|
+
const { computeTaskViewScales } = $xeGantt.getComputeMaps()
|
|
531
|
+
const taskViewScales = computeTaskViewScales.value
|
|
532
|
+
if (taskViewScales && taskViewScales.length > 2) {
|
|
533
|
+
const ganttMinHeadCellHeight = defaultRowHeight / 2 * taskViewScales.length
|
|
534
534
|
headCellHeight = Math.max(ganttMinHeadCellHeight, headCellHeight)
|
|
535
535
|
}
|
|
536
536
|
}
|
|
@@ -4719,20 +4719,28 @@ export default defineVxeComponent({
|
|
|
4719
4719
|
$xeTable.analyColumnWidth()
|
|
4720
4720
|
$xeTable.recalculate().then(() => {
|
|
4721
4721
|
$xeTable.saveCustomStore('update:width')
|
|
4722
|
-
$xeTable.
|
|
4722
|
+
$xeTable.refreshScroll().then(() => {
|
|
4723
|
+
$xeTable.updateCellAreas()
|
|
4724
|
+
})
|
|
4723
4725
|
$xeTable.dispatchEvent('column-resizable-change', params, evnt)
|
|
4724
4726
|
// 已废弃 resizable-change
|
|
4725
4727
|
$xeTable.dispatchEvent('resizable-change', params, evnt)
|
|
4726
|
-
setTimeout(() =>
|
|
4728
|
+
setTimeout(() => {
|
|
4729
|
+
$xeTable.recalculate(true)
|
|
4730
|
+
}, 300)
|
|
4727
4731
|
})
|
|
4728
4732
|
}
|
|
4729
4733
|
|
|
4730
4734
|
const handleUpdateRowResize = (evnt: MouseEvent, params: any) => {
|
|
4731
4735
|
reactData.resizeHeightFlag++
|
|
4732
4736
|
$xeTable.recalculate().then(() => {
|
|
4733
|
-
$xeTable.
|
|
4737
|
+
$xeTable.refreshScroll().then(() => {
|
|
4738
|
+
$xeTable.updateCellAreas()
|
|
4739
|
+
})
|
|
4734
4740
|
$xeTable.dispatchEvent('row-resizable-change', params, evnt)
|
|
4735
|
-
setTimeout(() =>
|
|
4741
|
+
setTimeout(() => {
|
|
4742
|
+
$xeTable.recalculate(true)
|
|
4743
|
+
}, 300)
|
|
4736
4744
|
})
|
|
4737
4745
|
}
|
|
4738
4746
|
|
|
@@ -5455,7 +5463,7 @@ export default defineVxeComponent({
|
|
|
5455
5463
|
cellLabel = `${formatter(formatParams)}`
|
|
5456
5464
|
}
|
|
5457
5465
|
} else if (renderOpts && tcFormatter) {
|
|
5458
|
-
cellLabel =
|
|
5466
|
+
cellLabel = tcFormatter(renderOpts, formatParams)
|
|
5459
5467
|
}
|
|
5460
5468
|
if (formatData) {
|
|
5461
5469
|
formatData[colid] = { value: cellValue, label: cellLabel }
|
|
@@ -10534,8 +10542,6 @@ export default defineVxeComponent({
|
|
|
10534
10542
|
const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild
|
|
10535
10543
|
return Promise.resolve(dEndMethod ? dEndMethod(dragParams) : true).then((status) => {
|
|
10536
10544
|
if (!status) {
|
|
10537
|
-
clearRowDragData()
|
|
10538
|
-
clearCrossTableDragStatus()
|
|
10539
10545
|
return errRest
|
|
10540
10546
|
}
|
|
10541
10547
|
|
|
@@ -10703,6 +10709,7 @@ export default defineVxeComponent({
|
|
|
10703
10709
|
return nextTick().then(() => {
|
|
10704
10710
|
if (animation) {
|
|
10705
10711
|
const { tableData } = reactData
|
|
10712
|
+
const { fullAllDataRowIdData } = internalData
|
|
10706
10713
|
const dragRowRest = fullAllDataRowIdData[dragRowid]
|
|
10707
10714
|
const _newRowIndex = dragRowRest._index
|
|
10708
10715
|
const firstRow = tableData[0]
|
|
@@ -10783,6 +10790,10 @@ export default defineVxeComponent({
|
|
|
10783
10790
|
})
|
|
10784
10791
|
}).catch(() => {
|
|
10785
10792
|
return errRest
|
|
10793
|
+
}).then((rest) => {
|
|
10794
|
+
clearRowDragData()
|
|
10795
|
+
clearCrossTableDragStatus()
|
|
10796
|
+
return rest
|
|
10786
10797
|
})
|
|
10787
10798
|
}
|
|
10788
10799
|
clearRowDragData()
|
|
@@ -11070,12 +11081,10 @@ export default defineVxeComponent({
|
|
|
11070
11081
|
const isControlKey = hasControlKey(evnt)
|
|
11071
11082
|
const trEl = evnt.currentTarget as HTMLElement
|
|
11072
11083
|
const rowid = trEl.getAttribute('rowid') || ''
|
|
11073
|
-
const
|
|
11074
|
-
if (
|
|
11084
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
11085
|
+
if (rowRest) {
|
|
11075
11086
|
evnt.preventDefault()
|
|
11076
|
-
const row =
|
|
11077
|
-
const rowid = getRowid($xeTable, row)
|
|
11078
|
-
const rowRest = fullAllDataRowIdData[rowid]
|
|
11087
|
+
const row = rowRest.row
|
|
11079
11088
|
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y
|
|
11080
11089
|
const dragPos = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom'
|
|
11081
11090
|
internalData.prevDragToChild = !!(treeConfig && transform && (isCrossDrag && isToChildDrag) && isControlKey)
|
|
@@ -11108,7 +11117,7 @@ export default defineVxeComponent({
|
|
|
11108
11117
|
}
|
|
11109
11118
|
if ($xeTable.eqRow(dragRow, row) ||
|
|
11110
11119
|
(isControlKey && treeConfig && lazy && row[hasChildField] && rowRest && !rowRest.treeLoaded) ||
|
|
11111
|
-
(!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] :
|
|
11120
|
+
(!isCrossDrag && treeConfig && transform && (isPeerDrag ? dragRow[parentField] !== row[parentField] : rowRest.level))
|
|
11112
11121
|
) {
|
|
11113
11122
|
showDropTip(evnt, trEl, null, false, dragPos)
|
|
11114
11123
|
return
|
|
@@ -11198,8 +11207,6 @@ export default defineVxeComponent({
|
|
|
11198
11207
|
const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild
|
|
11199
11208
|
return Promise.resolve(dragEndMethod ? dragEndMethod(dragParams) : true).then((status) => {
|
|
11200
11209
|
if (!status) {
|
|
11201
|
-
clearColDragData()
|
|
11202
|
-
clearCrossTableDragStatus()
|
|
11203
11210
|
return errRest
|
|
11204
11211
|
}
|
|
11205
11212
|
|
|
@@ -11349,9 +11356,6 @@ export default defineVxeComponent({
|
|
|
11349
11356
|
}
|
|
11350
11357
|
}
|
|
11351
11358
|
|
|
11352
|
-
clearColDragData()
|
|
11353
|
-
clearCrossTableDragStatus()
|
|
11354
|
-
|
|
11355
11359
|
if (evnt) {
|
|
11356
11360
|
dispatchEvent('column-dragend', {
|
|
11357
11361
|
oldColumn: dragColumn,
|
|
@@ -11460,6 +11464,10 @@ export default defineVxeComponent({
|
|
|
11460
11464
|
})
|
|
11461
11465
|
}).catch(() => {
|
|
11462
11466
|
return errRest
|
|
11467
|
+
}).then((rest) => {
|
|
11468
|
+
clearColDragData()
|
|
11469
|
+
clearCrossTableDragStatus()
|
|
11470
|
+
return rest
|
|
11463
11471
|
})
|
|
11464
11472
|
}
|
|
11465
11473
|
clearColDragData()
|
|
@@ -12239,12 +12247,15 @@ export default defineVxeComponent({
|
|
|
12239
12247
|
const lastRow = afterFullData[afterFullData.length - 1]
|
|
12240
12248
|
rowid = getRowid($xeTable, lastRow)
|
|
12241
12249
|
rowRest = fullAllDataRowIdData[rowid] || {}
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12250
|
+
if (rowRest) {
|
|
12251
|
+
const rHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight)
|
|
12252
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
12253
|
+
if (rHeight) {
|
|
12254
|
+
sYHeight = (rowRest.oTop || 0) + rHeight
|
|
12255
|
+
// 是否展开行
|
|
12256
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
12257
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0
|
|
12258
|
+
}
|
|
12248
12259
|
}
|
|
12249
12260
|
}
|
|
12250
12261
|
if (sYHeight > maxYHeight) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearColAnimate=clearColAnimate,exports.clearRowAnimate=clearRowAnimate,exports.moveColAnimateToLr=moveColAnimateToLr,exports.moveRowAnimateToTb=moveRowAnimateToTb;var _xeUtils=_interopRequireDefault(require("xe-utils")),_dom=require("../../ui/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let rowMoveCls="row--drag-move",colMoveClass="col--drag-move";function moveRowAnimateToTb(e,o){_xeUtils.default.arrayEach(e,e=>{e.style.transform=`translateY(${o}px)`}),requestAnimationFrame(()=>{_xeUtils.default.arrayEach(e,e=>{(0,_dom.addClass)(e,rowMoveCls),e.style.transform=""})})}function clearRowAnimate(e,o){setTimeout(()=>{e&&_xeUtils.default.arrayEach(e.querySelectorAll(o.map(e=>e+"."+rowMoveCls).join(",")),e=>(0,_dom.removeClass)(e,rowMoveCls))},500)}function moveColAnimateToLr(e,o){_xeUtils.default.arrayEach(e,e=>{e.style.transform=`translateX(${o}px)`}),requestAnimationFrame(()=>{_xeUtils.default.arrayEach(e,e=>{(0,_dom.addClass)(e,colMoveClass),e.style.transform=""})})}function clearColAnimate(e,o){setTimeout(()=>{e&&_xeUtils.default.arrayEach(e.querySelectorAll(o.map(e=>e+"."+rowMoveCls).join(",")),e=>(0,_dom.removeClass)(e,colMoveClass))},500)}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|