vxe-table 3.20.9 → 3.20.10

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.
@@ -319,6 +319,16 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
319
319
  if (treeConfig) {
320
320
  tdVNs.push(...renderLine(h, $xeTable, rowid, cellParams, cellHeight));
321
321
  }
322
+ const clVNs = [];
323
+ if (!isVNPreEmptyStatus) {
324
+ clVNs.push(h('div', {
325
+ attrs: {
326
+ colid,
327
+ rowid
328
+ },
329
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
330
+ }, column.renderCell(h, cellParams)));
331
+ }
322
332
  tdVNs.push(h('div', {
323
333
  key: 'tc',
324
334
  class: ['vxe-cell', {
@@ -330,17 +340,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
330
340
  attrs: {
331
341
  title: showTitle ? $xeTable.getCellLabel(row, column) : null
332
342
  }
333
- }, isVNPreEmptyStatus
334
- ? []
335
- : [
336
- h('div', {
337
- attrs: {
338
- colid,
339
- rowid
340
- },
341
- class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
342
- }, column.renderCell(h, cellParams))
343
- ]));
343
+ }, clVNs));
344
344
  if (showValidTip && errorValidItem) {
345
345
  const errRule = errorValidItem.rule;
346
346
  const validSlot = slots ? slots.valid : null;
@@ -440,7 +440,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
440
440
  const $xeGrid = $xeTable.$xeGrid;
441
441
  const $xeGantt = $xeTable.$xeGantt;
442
442
  const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
443
- const { hasFixedColumn, treeExpandedFlag, scrollXLoad, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
443
+ const { hasFixedColumn, treeExpandedFlag, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
444
444
  const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps } = tableInternalData;
445
445
  const checkboxOpts = $xeTable.computeCheckboxOpts;
446
446
  const radioOpts = $xeTable.computeRadioOpts;
@@ -546,7 +546,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
546
546
  rowid
547
547
  },
548
548
  style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : undefined,
549
- key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
549
+ key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
550
550
  on: trOn
551
551
  }, tdVNs));
552
552
  // 如果行被展开了
@@ -11989,17 +11989,26 @@ const tableMethods = {
11989
11989
  },
11990
11990
  /**
11991
11991
  * 如果有滚动条,则滚动到对应的行
11992
- * @param {Row} row 行对象
11993
- * @param {ColumnInfo} column 列配置
11994
11992
  */
11995
- scrollToRow(row, fieldOrColumn, options) {
11993
+ scrollToRow(rowOrRowid, fieldOrColumn, options) {
11996
11994
  const $xeTable = this;
11997
11995
  const props = $xeTable;
11998
11996
  const reactData = $xeTable;
11999
11997
  const internalData = $xeTable;
12000
11998
  const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
12001
- const { _sToTime } = internalData;
11999
+ const { fullAllDataRowIdData, _sToTime } = internalData;
12002
12000
  const rest = [];
12001
+ let row;
12002
+ if (XEUtils.isString(rowOrRowid) || XEUtils.isNumber(rowOrRowid)) {
12003
+ const rowid = rowOrRowid;
12004
+ const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
12005
+ if (rowRest) {
12006
+ row = rowRest.row;
12007
+ }
12008
+ }
12009
+ else {
12010
+ row = rowOrRowid;
12011
+ }
12003
12012
  if (row) {
12004
12013
  if (props.treeConfig) {
12005
12014
  rest.push($xeTable.scrollToTreeRow(row));
@@ -2301,7 +2301,10 @@ export default {
2301
2301
  minWidth: tableTipConfig.minWidth,
2302
2302
  minHeight: tableTipConfig.minHeight,
2303
2303
  maxWidth: tableTipConfig.maxWidth,
2304
- maxHeight: tableTipConfig.maxHeight
2304
+ maxHeight: tableTipConfig.maxHeight,
2305
+ placement: tableTipConfig.placement,
2306
+ defaultPlacement: tableTipConfig.defaultPlacement,
2307
+ popupClassName: tableTipConfig.popupClassName
2305
2308
  },
2306
2309
  scopedSlots: currTooltipSlot
2307
2310
  ? {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.20.9";
3
+ export const version = "3.20.10";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
@@ -67,7 +67,8 @@ VxeUI.setConfig({
67
67
  strict: true
68
68
  },
69
69
  tooltipConfig: {
70
- enterable: true
70
+ enterable: true,
71
+ defaultPlacement: 'top'
71
72
  },
72
73
  headerTooltipConfig: {
73
74
  enterable: true
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.20.9"}`;
3
+ const version = `table v${"3.20.10"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
package/lib/index.umd.js CHANGED
@@ -2005,7 +2005,7 @@ function getClass(property, params) {
2005
2005
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2006
2006
 
2007
2007
 
2008
- const version = "3.20.8";
2008
+ const version = "3.20.10";
2009
2009
  core_.VxeUI.version = version;
2010
2010
  core_.VxeUI.tableVersion = version;
2011
2011
  core_.VxeUI.setConfig({
@@ -2072,7 +2072,8 @@ core_.VxeUI.setConfig({
2072
2072
  strict: true
2073
2073
  },
2074
2074
  tooltipConfig: {
2075
- enterable: true
2075
+ enterable: true,
2076
+ defaultPlacement: 'top'
2076
2077
  },
2077
2078
  headerTooltipConfig: {
2078
2079
  enterable: true
@@ -2746,7 +2747,7 @@ function wheelScrollTopTo(diffNum, cb) {
2746
2747
  const {
2747
2748
  log: log_log
2748
2749
  } = core_.VxeUI;
2749
- const log_version = `table v${"3.20.8"}`;
2750
+ const log_version = `table v${"3.20.10"}`;
2750
2751
  const warnLog = log_log.create('warn', log_version);
2751
2752
  const errLog = log_log.create('error', log_version);
2752
2753
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -7026,9 +7027,7 @@ if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHei
7026
7027
  * 如果有滚动条,则滚动到对应的位置
7027
7028
  */scrollTo(scrollLeft,scrollTop){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;const{elemStore}=internalData;const headerScrollElem=getRefElem(elemStore['main-header-scroll']);const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);const footerScrollElem=getRefElem(elemStore['main-footer-scroll']);const leftScrollElem=getRefElem(elemStore['left-body-scroll']);const rightScrollElem=getRefElem(elemStore['right-body-scroll']);const xHandleEl=$xeTable.$refs.refScrollXHandleElem;const yHandleEl=$xeTable.$refs.refScrollYHandleElem;internalData.intoRunScroll=true;if(scrollLeft){if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)){scrollTop=scrollLeft.top;scrollLeft=scrollLeft.left;}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollLeft)){setScrollLeft(xHandleEl,scrollLeft);setScrollLeft(bodyScrollElem,scrollLeft);setScrollLeft(headerScrollElem,scrollLeft);setScrollLeft(footerScrollElem,scrollLeft);if(reactData.scrollXLoad){loadScrollXData($xeTable);}}if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(scrollTop)){setScrollTop(yHandleEl,scrollTop);setScrollTop(bodyScrollElem,scrollTop);setScrollTop(leftScrollElem,scrollTop);setScrollTop(rightScrollElem,scrollTop);if(reactData.scrollYLoad){loadScrollYData($xeTable);}}return new Promise(resolve=>{setTimeout(()=>{$xeTable.$nextTick(()=>{internalData.intoRunScroll=false;resolve();});},reactData.scrollXLoad||reactData.scrollYLoad?30:0);});},/**
7028
7029
  * 如果有滚动条,则滚动到对应的行
7029
- * @param {Row} row 行对象
7030
- * @param {ColumnInfo} column 列配置
7031
- */scrollToRow(row,fieldOrColumn,options){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{_sToTime}=internalData;const rest=[];if(row){if(props.treeConfig){rest.push($xeTable.scrollToTreeRow(row));}else{rest.push(rowToVisible($xeTable,row));}}if(fieldOrColumn){rest.push(handleScrollToRowColumn($xeTable,fieldOrColumn,row,options));}if(_sToTime){clearTimeout(_sToTime);}return Promise.all(rest).then(()=>{if(row){if(!isAllOverflow&&(scrollYLoad||scrollXLoad)){calcCellHeight($xeTable);calcCellWidth($xeTable);// 可视区被渲染后位置被偏移
7030
+ */scrollToRow(rowOrRowid,fieldOrColumn,options){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{isAllOverflow,scrollYLoad,scrollXLoad}=reactData;const{fullAllDataRowIdData,_sToTime}=internalData;const rest=[];let row;if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrRowid)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrRowid)){const rowid=rowOrRowid;const rowRest=rowid?fullAllDataRowIdData[rowid]:null;if(rowRest){row=rowRest.row;}}else{row=rowOrRowid;}if(row){if(props.treeConfig){rest.push($xeTable.scrollToTreeRow(row));}else{rest.push(rowToVisible($xeTable,row));}}if(fieldOrColumn){rest.push(handleScrollToRowColumn($xeTable,fieldOrColumn,row,options));}if(_sToTime){clearTimeout(_sToTime);}return Promise.all(rest).then(()=>{if(row){if(!isAllOverflow&&(scrollYLoad||scrollXLoad)){calcCellHeight($xeTable);calcCellWidth($xeTable);// 可视区被渲染后位置被偏移
7032
7031
  internalData._sToTime=setTimeout(()=>{internalData._sToTime=undefined;if(scrollYLoad){if(props.treeConfig){$xeTable.scrollToTreeRow(row);}else{rowToVisible($xeTable,row);}}if(scrollXLoad&&fieldOrColumn){handleScrollToRowColumn($xeTable,fieldOrColumn,row,options);}},350);}return $xeTable.$nextTick();}});},/**
7033
7032
  * 如果有滚动条,则滚动到第一行
7034
7033
  */scrollToStartRow(fieldOrColumn,options){const $xeTable=this;const internalData=$xeTable;const{afterFullData}=internalData;return $xeTable.scrollToRow(afterFullData[0],fieldOrColumn,options);},/**
@@ -7515,6 +7514,16 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
7515
7514
  if (treeConfig) {
7516
7515
  tdVNs.push(...renderLine(h, $xeTable, rowid, cellParams, cellHeight));
7517
7516
  }
7517
+ const clVNs = [];
7518
+ if (!isVNPreEmptyStatus) {
7519
+ clVNs.push(h('div', {
7520
+ attrs: {
7521
+ colid,
7522
+ rowid
7523
+ },
7524
+ class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
7525
+ }, column.renderCell(h, cellParams)));
7526
+ }
7518
7527
  tdVNs.push(h('div', {
7519
7528
  key: 'tc',
7520
7529
  class: ['vxe-cell', {
@@ -7526,13 +7535,7 @@ function renderTdColumn(h, $xeTable, seq, rowid, fixedType, isOptimizeMode, rowL
7526
7535
  attrs: {
7527
7536
  title: showTitle ? $xeTable.getCellLabel(row, column) : null
7528
7537
  }
7529
- }, isVNPreEmptyStatus ? [] : [h('div', {
7530
- attrs: {
7531
- colid,
7532
- rowid
7533
- },
7534
- class: 'vxe-cell--wrapper vxe-body-cell--wrapper'
7535
- }, column.renderCell(h, cellParams))]));
7538
+ }, clVNs));
7536
7539
  if (showValidTip && errorValidItem) {
7537
7540
  const errRule = errorValidItem.rule;
7538
7541
  const validSlot = slots ? slots.valid : null;
@@ -7627,7 +7630,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7627
7630
  const {
7628
7631
  hasFixedColumn,
7629
7632
  treeExpandedFlag,
7630
- scrollXLoad,
7631
7633
  scrollYLoad,
7632
7634
  isAllOverflow,
7633
7635
  rowExpandedFlag,
@@ -7750,7 +7752,7 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
7750
7752
  rowid
7751
7753
  },
7752
7754
  style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : undefined,
7753
- key: rowKey || scrollXLoad || scrollYLoad || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
7755
+ key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
7754
7756
  on: trOn
7755
7757
  }, tdVNs));
7756
7758
  // 如果行被展开了
@@ -20315,7 +20317,10 @@ function renderBody(h, $xeTable) {
20315
20317
  minWidth: tableTipConfig.minWidth,
20316
20318
  minHeight: tableTipConfig.minHeight,
20317
20319
  maxWidth: tableTipConfig.maxWidth,
20318
- maxHeight: tableTipConfig.maxHeight
20320
+ maxHeight: tableTipConfig.maxHeight,
20321
+ placement: tableTipConfig.placement,
20322
+ defaultPlacement: tableTipConfig.defaultPlacement,
20323
+ popupClassName: tableTipConfig.popupClassName
20319
20324
  },
20320
20325
  scopedSlots: currTooltipSlot ? {
20321
20326
  content: () => {