vxe-table 3.14.0-beta.7 → 3.14.0-beta.8

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.
@@ -165,9 +165,17 @@ export function getCellHeight (height: number | 'unset' | undefined | null) {
165
165
  return height || 0
166
166
  }
167
167
 
168
- export function handleFieldOrColumn (_vm: any, fieldOrColumn: any) {
168
+ export function handleFieldOrColumn ($xeTable: VxeTableConstructor, fieldOrColumn: any) {
169
169
  if (fieldOrColumn) {
170
- return XEUtils.isString(fieldOrColumn) || XEUtils.isNumber(fieldOrColumn) ? _vm.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn
170
+ return XEUtils.isString(fieldOrColumn) || XEUtils.isNumber(fieldOrColumn) ? $xeTable.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn
171
+ }
172
+ return null
173
+ }
174
+
175
+ export const handleRowidOrRow = ($xeTable: VxeTableConstructor, rowidOrRow: any) => {
176
+ if (rowidOrRow) {
177
+ const rowid = XEUtils.isString(rowidOrRow) || XEUtils.isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow)
178
+ return $xeTable.getRowById(rowid)
171
179
  }
172
180
  return null
173
181
  }