vxe-table 3.19.36 → 3.19.38

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.
Files changed (47) hide show
  1. package/es/index.esm.js +1 -2
  2. package/es/style.css +1 -1
  3. package/es/table/src/cell.js +7 -5
  4. package/es/table/src/methods.js +36 -0
  5. package/es/table/style.css +48 -18
  6. package/es/ui/index.js +1 -1
  7. package/es/ui/src/log.js +1 -1
  8. package/es/vxe-table/style.css +48 -18
  9. package/lib/index.common.js +1 -2
  10. package/lib/index.umd.js +2306 -966
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/style.css +1 -1
  13. package/lib/table/src/cell.js +9 -7
  14. package/lib/table/src/cell.min.js +1 -1
  15. package/lib/table/src/methods.js +44 -0
  16. package/lib/table/src/methods.min.js +1 -1
  17. package/lib/table/style/style.css +48 -18
  18. package/lib/ui/index.js +1 -1
  19. package/lib/ui/index.min.js +1 -1
  20. package/lib/ui/src/log.js +1 -1
  21. package/lib/ui/src/log.min.js +1 -1
  22. package/lib/v-x-e-table/index.js +1 -2
  23. package/lib/v-x-e-table/index.min.js +1 -1
  24. package/lib/vxe-colgroup/index.js +1 -2
  25. package/lib/vxe-colgroup/index.min.js +1 -1
  26. package/lib/vxe-column/index.js +1 -2
  27. package/lib/vxe-column/index.min.js +1 -1
  28. package/lib/vxe-grid/index.js +1 -2
  29. package/lib/vxe-grid/index.min.js +1 -1
  30. package/lib/vxe-table/index.js +1 -2
  31. package/lib/vxe-table/index.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +48 -18
  33. package/lib/vxe-toolbar/index.js +1 -2
  34. package/lib/vxe-toolbar/index.min.js +1 -1
  35. package/lib/vxe-ui/index.js +1 -2
  36. package/lib/vxe-ui/index.min.js +1 -1
  37. package/lib/vxe-v-x-e-table/index.js +1 -2
  38. package/lib/vxe-v-x-e-table/index.min.js +1 -1
  39. package/package.json +1 -1
  40. package/packages/table/src/cell.ts +7 -5
  41. package/packages/table/src/methods.ts +40 -0
  42. /package/es/{iconfont.1766978388668.ttf → iconfont.1767095196567.ttf} +0 -0
  43. /package/es/{iconfont.1766978388668.woff → iconfont.1767095196567.woff} +0 -0
  44. /package/es/{iconfont.1766978388668.woff2 → iconfont.1767095196567.woff2} +0 -0
  45. /package/lib/{iconfont.1766978388668.ttf → iconfont.1767095196567.ttf} +0 -0
  46. /package/lib/{iconfont.1766978388668.woff → iconfont.1767095196567.woff} +0 -0
  47. /package/lib/{iconfont.1766978388668.woff2 → iconfont.1767095196567.woff2} +0 -0
@@ -467,9 +467,11 @@ export const Cell = {
467
467
  // formatter > (renderTableCell | renderTableDefault)
468
468
  if (renderOpts && !formatter) {
469
469
  const compConf = renderer.get(renderOpts.name)
470
- const renderFn = editRenderOpts ? (compConf.renderTableCell || compConf.renderCell) : (compConf.renderTableDefault || compConf.renderDefault)
471
- if (renderFn) {
472
- return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRenderOpts ? 'edit' : 'cell' }, params))))
470
+ if (compConf) {
471
+ const renderFn = editRenderOpts ? (compConf.renderTableCell || compConf.renderCell) : (compConf.renderTableDefault || compConf.renderDefault)
472
+ if (renderFn) {
473
+ return renderCellBaseVNs(h, params, getSlotVNs(renderFn.call($table, h, renderOpts, Object.assign({ $type: editRenderOpts ? 'edit' : 'cell' }, params))))
474
+ }
473
475
  }
474
476
  }
475
477
  cellValue = $table.getCellLabel(row, column)
@@ -1228,7 +1230,7 @@ export const Cell = {
1228
1230
  renderDeepCellEdit (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }) {
1229
1231
  return Cell.renderDeepNodeBtn(h, params, Cell.renderCellEdit(h, params))
1230
1232
  },
1231
- runRenderer (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, _vm: any, isEdit: boolean) {
1233
+ runRenderer (h: CreateElement, params: VxeTableDefines.CellRenderBodyParams & { $table: VxeTableConstructor & VxeTablePrivateMethods }, isEdit: boolean) {
1232
1234
  const { $table, row, column } = params
1233
1235
  const tableProps = $table
1234
1236
  const tableReactData = $table as unknown as TableReactData
@@ -1276,7 +1278,7 @@ export const Cell = {
1276
1278
  }, [getDefaultCellLabel(cellParams)])
1277
1279
  ])
1278
1280
  }
1279
- return Cell.renderDefaultCell.call(_vm, h, cellParams)
1281
+ return Cell.renderDefaultCell.call($table, h, cellParams)
1280
1282
  }
1281
1283
  } as any
1282
1284
 
@@ -12178,6 +12178,26 @@ const tableMethods: any = {
12178
12178
  }
12179
12179
  })
12180
12180
  },
12181
+ /**
12182
+ * 如果有滚动条,则滚动到第一行
12183
+ */
12184
+ scrollToStartRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo) {
12185
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
12186
+ const internalData = $xeTable as unknown as TableInternalData
12187
+
12188
+ const { afterFullData } = internalData
12189
+ return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn)
12190
+ },
12191
+ /**
12192
+ * 如果有滚动条,则滚动到最后一行
12193
+ */
12194
+ scrollToEndRow (fieldOrColumn?: string | VxeTableDefines.ColumnInfo) {
12195
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
12196
+ const internalData = $xeTable as unknown as TableInternalData
12197
+
12198
+ const { afterFullData } = internalData
12199
+ return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn)
12200
+ },
12181
12201
  /**
12182
12202
  * 如果有滚动条,则滚动到对应的列
12183
12203
  * @param {ColumnInfo} column 列配置
@@ -12187,6 +12207,26 @@ const tableMethods: any = {
12187
12207
 
12188
12208
  return handleScrollToRowColumn($xeTable, fieldOrColumn)
12189
12209
  },
12210
+ /**
12211
+ * 如果有滚动条,则滚动到第一列
12212
+ */
12213
+ scrollToStartColumn () {
12214
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
12215
+ const internalData = $xeTable as unknown as TableInternalData
12216
+
12217
+ const { visibleColumn } = internalData
12218
+ return $xeTable.scrollToColumn(visibleColumn[0])
12219
+ },
12220
+ /**
12221
+ * 如果有滚动条,则滚动到最后一列
12222
+ */
12223
+ scrollToEndColumn () {
12224
+ const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
12225
+ const internalData = $xeTable as unknown as TableInternalData
12226
+
12227
+ const { visibleColumn } = internalData
12228
+ return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1])
12229
+ },
12190
12230
  /**
12191
12231
  * 对于树形结构中,可以直接滚动到指定深层节点中
12192
12232
  * 对于某些特定的场景可能会用到,比如定位到某一节点