vxe-table 3.21.23 → 3.21.24
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/style.css +1 -1
- package/es/table/src/cell.js +2 -2
- package/es/table/src/methods.js +2 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +5 -4
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +1 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/methods.ts +2 -1
- /package/es/{iconfont.1783046294821.ttf → iconfont.1783331230583.ttf} +0 -0
- /package/es/{iconfont.1783046294821.woff → iconfont.1783331230583.woff} +0 -0
- /package/es/{iconfont.1783046294821.woff2 → iconfont.1783331230583.woff2} +0 -0
- /package/lib/{iconfont.1783046294821.ttf → iconfont.1783331230583.ttf} +0 -0
- /package/lib/{iconfont.1783046294821.woff → iconfont.1783331230583.woff} +0 -0
- /package/lib/{iconfont.1783046294821.woff2 → iconfont.1783331230583.woff2} +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -533,7 +533,7 @@ export const Cell = {
|
|
|
533
533
|
const treeOpts = $table.computeTreeOpts;
|
|
534
534
|
const { row, column, level } = params;
|
|
535
535
|
const { slots } = column;
|
|
536
|
-
const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
536
|
+
const { padding, indent, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
537
537
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
538
538
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
539
539
|
const rowChilds = row[childrenField];
|
|
@@ -573,7 +573,7 @@ export const Cell = {
|
|
|
573
573
|
}
|
|
574
574
|
: undefined
|
|
575
575
|
}, [
|
|
576
|
-
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
|
|
576
|
+
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild) && (!visibleMethod || visibleMethod(params))
|
|
577
577
|
? [
|
|
578
578
|
h('div', {
|
|
579
579
|
class: 'vxe-cell--tree-btn',
|
package/es/table/src/methods.js
CHANGED
|
@@ -446,8 +446,9 @@ function handleBaseTreeExpand($xeTable, rows, expanded) {
|
|
|
446
446
|
const result = [];
|
|
447
447
|
const columnIndex = $xeTable.getColumnIndex(treeNodeColumn);
|
|
448
448
|
const $columnIndex = $xeTable.getVMColumnIndex(treeNodeColumn);
|
|
449
|
+
const _columnIndex = $xeTable.getVTColumnIndex(treeNodeColumn);
|
|
449
450
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
450
|
-
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
|
|
451
|
+
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, _columnIndex, row })) : rows;
|
|
451
452
|
if (accordion) {
|
|
452
453
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
453
454
|
// 同一级只能展开一个
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"3.21.
|
|
3
|
+
const tableVersion = `table v${"3.21.24"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.24";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -4086,7 +4086,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
4086
4086
|
const {
|
|
4087
4087
|
log: log_log
|
|
4088
4088
|
} = core_.VxeUI;
|
|
4089
|
-
const tableVersion = `table v${"3.21.
|
|
4089
|
+
const tableVersion = `table v${"3.21.24"}`;
|
|
4090
4090
|
function createComponentLog(name) {
|
|
4091
4091
|
const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
|
|
4092
4092
|
const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
|
|
@@ -6207,6 +6207,7 @@ const Cell = {
|
|
|
6207
6207
|
indent,
|
|
6208
6208
|
lazy,
|
|
6209
6209
|
trigger,
|
|
6210
|
+
visibleMethod,
|
|
6210
6211
|
iconLoaded,
|
|
6211
6212
|
showIcon,
|
|
6212
6213
|
iconOpen,
|
|
@@ -6247,7 +6248,7 @@ const Cell = {
|
|
|
6247
6248
|
style: padding && indent ? {
|
|
6248
6249
|
paddingLeft: `${level * indent}px`
|
|
6249
6250
|
} : undefined
|
|
6250
|
-
}, [showIcon && (lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild) ? [h('div', {
|
|
6251
|
+
}, [showIcon && (lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild) && (!visibleMethod || visibleMethod(params)) ? [h('div', {
|
|
6251
6252
|
class: 'vxe-cell--tree-btn',
|
|
6252
6253
|
on: ons
|
|
6253
6254
|
}, [h('i', {
|
|
@@ -7800,7 +7801,7 @@ let scrollYLoad=!!virtualYOpts.enabled&&virtualYOpts.gt>-1&&(virtualYOpts.gt===0
|
|
|
7800
7801
|
* @param rows
|
|
7801
7802
|
* @param expanded
|
|
7802
7803
|
* @returns
|
|
7803
|
-
*/function handleBaseTreeExpand($xeTable,rows,expanded){const reactData=$xeTable;const internalData=$xeTable;const{treeNodeColumn}=reactData;const{fullAllDataRowIdData,tableFullTreeData,treeExpandedMaps,treeExpandLazyLoadedMaps}=internalData;const treeOpts=$xeTable.computeTreeOpts;const{reserve,lazy,accordion,toggleMethod}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;const result=[];const columnIndex=$xeTable.getColumnIndex(treeNodeColumn);const $columnIndex=$xeTable.getVMColumnIndex(treeNodeColumn);const{handleGetRowId}=createHandleGetRowId($xeTable);let validRows=toggleMethod?rows.filter(row=>toggleMethod({$table:$xeTable,expanded,column:treeNodeColumn,columnIndex,$columnIndex,row})):rows;if(accordion){validRows=validRows.length?[validRows[validRows.length-1]]:[];// 同一级只能展开一个
|
|
7804
|
+
*/function handleBaseTreeExpand($xeTable,rows,expanded){const reactData=$xeTable;const internalData=$xeTable;const{treeNodeColumn}=reactData;const{fullAllDataRowIdData,tableFullTreeData,treeExpandedMaps,treeExpandLazyLoadedMaps}=internalData;const treeOpts=$xeTable.computeTreeOpts;const{reserve,lazy,accordion,toggleMethod}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;const result=[];const columnIndex=$xeTable.getColumnIndex(treeNodeColumn);const $columnIndex=$xeTable.getVMColumnIndex(treeNodeColumn);const _columnIndex=$xeTable.getVTColumnIndex(treeNodeColumn);const{handleGetRowId}=createHandleGetRowId($xeTable);let validRows=toggleMethod?rows.filter(row=>toggleMethod({$table:$xeTable,expanded,column:treeNodeColumn,columnIndex,$columnIndex,_columnIndex,row})):rows;if(accordion){validRows=validRows.length?[validRows[validRows.length-1]]:[];// 同一级只能展开一个
|
|
7804
7805
|
const matchObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableFullTreeData,item=>item===validRows[0],{children:childrenField});if(matchObj){matchObj.items.forEach(item=>{const rowid=handleGetRowId(item);if(treeExpandedMaps[rowid]){delete treeExpandedMaps[rowid];}});}}if(expanded){validRows.forEach(row=>{const rowid=handleGetRowId(row);if(!treeExpandedMaps[rowid]){const rowRest=fullAllDataRowIdData[rowid];if(rowRest){const isLoad=lazy&&row[hasChildField]&&!rowRest.treeLoaded&&!treeExpandLazyLoadedMaps[rowid];// 是否使用懒加载
|
|
7805
7806
|
if(isLoad){result.push(handleAsyncTreeExpandChilds($xeTable,row));}else{if(row[childrenField]&&row[childrenField].length){treeExpandedMaps[rowid]=row;}}}}});}else{validRows.forEach(item=>{const rowid=handleGetRowId(item);if(treeExpandedMaps[rowid]){delete treeExpandedMaps[rowid];}});}if(reserve){validRows.forEach(row=>handleTreeExpandReserve($xeTable,row,expanded));}reactData.treeExpandedFlag++;return Promise.all(result).then(()=>{updateTreeLineStyle($xeTable);return $xeTable.recalculate();});}/**
|
|
7806
7807
|
* 虚拟树的展开与收起
|