Skip to content

Commit f8c4b23

Browse files
committed
releases 3.21.18
1 parent 6c26aac commit f8c4b23

6 files changed

Lines changed: 30 additions & 34 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vxe-table",
3-
"version": "3.21.17",
3+
"version": "3.21.18",
44
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
55
"scripts": {
66
"update": "npm install --legacy-peer-deps",
@@ -68,7 +68,7 @@
6868
"vue-i18n": "^8.15.1",
6969
"vue-router": "^3.5.1",
7070
"vue-template-compiler": "2.6.14",
71-
"vxe-pc-ui": "3.15.4"
71+
"vxe-pc-ui": "3.15.9"
7272
},
7373
"vetur": {
7474
"tags": "helper/vetur/tags.json",

packages/table/module/custom/panel.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,8 +1247,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
12471247
const resizeParams = {
12481248
$table: $xeTable,
12491249
column,
1250-
columnIndex: index,
1251-
$columnIndex: index,
1250+
columnIndex: $xeTable.getColumnIndex(column),
1251+
$columnIndex: $xeTable.getVMColumnIndex(column),
1252+
_columnIndex: $xeTable.getVTColumnIndex(column),
1253+
rowIndex: -1,
1254+
_rowIndex: -1,
12521255
$rowIndex: -1
12531256
}
12541257
if (reMinWidth) {

packages/table/src/footer.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,18 @@ function renderHeads (h: CreateElement, _vm: any, isOptimizeMode: boolean, rende
208208

209209
const { footerRowClassName, footerRowStyle } = tableProps
210210

211-
return (footerTableData as any[][]).map((row, $rowIndex) => {
212-
const _rowIndex = $rowIndex
213-
const rowParams = { $table: $xeTable, row, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
211+
return (footerTableData as any[][]).map((row, _rowIndex) => {
212+
const $rowIndex = _rowIndex
213+
const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType }
214214

215215
return h('tr', {
216-
key: $rowIndex,
216+
key: _rowIndex,
217217
class: [
218218
'vxe-footer--row',
219219
footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''
220220
],
221221
style: footerRowStyle ? (XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle) as VxeComponentStyleType : undefined
222-
}, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex))
222+
}, renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex))
223223
})
224224
}
225225

packages/table/src/header.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { renderer, renderEmptyElement } = VxeUI
1313
const sourceType = 'table'
1414
const renderType = 'header'
1515

16-
function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][], $rowIndex: number, cols: VxeTableDefines.ColumnInfo[]) {
16+
function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMode: boolean, headerGroups: VxeTableDefines.ColumnInfo[][], _rowIndex: number, cols: VxeTableDefines.ColumnInfo[]) {
1717
const props = _vm
1818
const $xeTable = _vm.$parent as VxeTableConstructor & VxeTablePrivateMethods
1919
const $xeGrid = $xeTable.$xeGrid
@@ -34,7 +34,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
3434
const headerCellOpts = $xeTable.computeHeaderCellOpts
3535
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight
3636
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts
37-
const isLastRow = $rowIndex === headerGroups.length - 1
37+
const isLastRow = _rowIndex === headerGroups.length - 1
3838

3939
return cols.map((column, $columnIndex) => {
4040
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column
@@ -66,7 +66,9 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
6666
$table: $xeTable,
6767
$grid: $xeGrid,
6868
$gantt: $xeGantt,
69-
$rowIndex,
69+
rowIndex: _rowIndex,
70+
_rowIndex,
71+
$rowIndex: _rowIndex,
7072
column,
7173
columnIndex,
7274
$columnIndex,
@@ -88,7 +90,7 @@ function renderRows (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMod
8890
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null
8991
}
9092
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
91-
const spanRest = mergeHeaderCellMaps[`${$rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`]
93+
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`]
9294
if (spanRest) {
9395
const { rowspan, colspan } = spanRest
9496
if (!rowspan || !colspan) {
@@ -339,16 +341,16 @@ function renderHeads (h: CreateElement, _vm: any, isGroup: boolean, isOptimizeMo
339341

340342
const { headerRowClassName, headerRowStyle } = tableProps
341343
const floatingFilterOpts = $xeTable.computeFloatingFilterOpts
342-
const rowVNs = headerGroups.map((cols, $rowIndex) => {
343-
const params = { $table: $xeTable, $rowIndex, fixed: fixedType, type: renderType }
344+
const rowVNs = headerGroups.map((cols, _rowIndex) => {
345+
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType }
344346
return h('tr', {
345-
key: $rowIndex,
347+
key: _rowIndex,
346348
class: [
347349
'vxe-header--row',
348350
headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ''
349351
],
350352
style: headerRowStyle ? (XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle) as VxeComponentStyleType : undefined
351-
}, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, $rowIndex, cols))
353+
}, renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols))
352354
})
353355

354356
if (floatingFilterOpts.enabled) {

packages/table/src/methods.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9829,7 +9829,12 @@ const tableMethods: any = {
98299829
}
98309830
if (editOpts.trigger === 'manual') {
98319831
if (actived.args && actived.row === row && column !== actived.column) {
9832-
handleChangeCell($xeTable, evnt, params)
9832+
if (editOpts.mode === 'row') {
9833+
handleChangeCell($xeTable, evnt, params)
9834+
} else {
9835+
checkValidate($xeTable, 'blur')
9836+
.catch((e: any) => e)
9837+
}
98339838
}
98349839
} else if (!actived.args || row !== actived.row || column !== actived.column) {
98359840
if (editOpts.trigger === 'click') {

packages/table/src/util.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -802,14 +802,7 @@ export function toFilters (filters: any, colid?: string | number) {
802802
/**
803803
* 列宽拖动最大宽度
804804
*/
805-
export function getColReMaxWidth (params: {
806-
$table: VxeTableConstructor & VxeTablePrivateMethods;
807-
column: VxeTableDefines.ColumnInfo;
808-
columnIndex: number;
809-
$columnIndex: number;
810-
$rowIndex: number;
811-
cell: HTMLTableCellElement;
812-
}) {
805+
export function getColReMaxWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
813806
const { $table, column, cell } = params
814807
const internalData = $table as unknown as TableInternalData
815808
const { elemStore } = internalData
@@ -846,14 +839,7 @@ export function getColReMaxWidth (params: {
846839
/**
847840
* 列宽拖动最小宽度
848841
*/
849-
export function getColReMinWidth (params: {
850-
$table: VxeTableConstructor & VxeTablePrivateMethods;
851-
column: VxeTableDefines.ColumnInfo;
852-
columnIndex: number;
853-
$columnIndex: number;
854-
$rowIndex: number;
855-
cell: HTMLTableCellElement;
856-
}) {
842+
export function getColReMinWidth (params: (VxeTableDefines.CellRenderHeaderParams| VxeTableDefines.CellRenderBodyParams | VxeTableDefines.CellRenderFooterParams) & { cell: HTMLTableCellElement }) {
857843
const { $table, column, cell } = params
858844
const tableProps = $table
859845
const internalData = $table as unknown as TableInternalData

0 commit comments

Comments
 (0)