vxe-table 3.21.12 → 3.21.13
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/menu/panel.js +5 -5
- package/es/table/src/methods.js +6 -2
- package/es/table/src/table.js +1 -1
- package/es/table/style.css +11 -7
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +11 -7
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +10 -10
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/menu/panel.js +5 -5
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/methods.js +2 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +11 -7
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +11 -7
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/menu/panel.ts +5 -5
- package/packages/table/src/methods.ts +6 -2
- package/packages/table/src/table.ts +1 -1
- package/styles/components/table-module/menu.scss +5 -2
- /package/es/{iconfont.1781140842818.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/es/{iconfont.1781140842818.woff → iconfont.1781229212834.woff} +0 -0
- /package/es/{iconfont.1781140842818.woff2 → iconfont.1781229212834.woff2} +0 -0
- /package/lib/{iconfont.1781140842818.ttf → iconfont.1781229212834.ttf} +0 -0
- /package/lib/{iconfont.1781140842818.woff → iconfont.1781229212834.woff} +0 -0
- /package/lib/{iconfont.1781140842818.woff2 → iconfont.1781229212834.woff2} +0 -0
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.13";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -4074,7 +4074,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
4074
4074
|
const {
|
|
4075
4075
|
log: log_log
|
|
4076
4076
|
} = core_.VxeUI;
|
|
4077
|
-
const log_version = `table v${"3.21.
|
|
4077
|
+
const log_version = `table v${"3.21.13"}`;
|
|
4078
4078
|
const warnLog = log_log.create('warn', log_version);
|
|
4079
4079
|
const errLog = log_log.create('error', log_version);
|
|
4080
4080
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -7716,7 +7716,7 @@ if(isCustomSort&&sortData){allCols.forEach(column=>{const colKey=column.getKey()
|
|
|
7716
7716
|
// }
|
|
7717
7717
|
}if(htmlColumn){if(!columnOpts.useKey){errLog('vxe.error.notSupportProp',['column.type=html','column-config.useKey=false','column-config.useKey=true']);}if(!rowOpts.useKey){errLog('vxe.error.notSupportProp',['column.type=html','row-config.useKey=false','row-config.useKey=true']);}}reactData.isGroup=isGroup;reactData.rowGroupColumn=rowGroupColumn;reactData.treeNodeColumn=treeNodeColumn;reactData.expandColumn=expandColumn;reactData.checkboxColumn=checkboxColumn;reactData.radioColumn=radioColumn;reactData.isAllOverflow=isAllOverflow;}function updateScrollXStatus($xeTable,fullColumn){const reactData=$xeTable;const internalData=$xeTable;const virtualXOpts=$xeTable.computeVirtualXOpts;const allCols=fullColumn||internalData.tableFullColumn;// 如果gt为0,则总是启用
|
|
7718
7718
|
const scrollXLoad=!!virtualXOpts.enabled&&virtualXOpts.gt>-1&&(virtualXOpts.gt===0||virtualXOpts.gt<allCols.length);reactData.scrollXLoad=scrollXLoad;return scrollXLoad;}function syncGanttScrollYStatus($xeTable){const reactData=$xeTable;const internalData=$xeTable;const $xeGanttView=internalData.xeGanttView;if($xeGanttView&&$xeGanttView.handleUpdateSYStatus){$xeGanttView.handleUpdateSYStatus(reactData.scrollYLoad);}}function updateScrollYStatus($xeTable,fullData){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const virtualYOpts=$xeTable.computeVirtualYOpts;const treeOpts=$xeTable.computeTreeOpts;const{transform}=treeOpts;const allList=fullData||internalData.tableFullData;// 如果gt为0,则总是启用
|
|
7719
|
-
|
|
7719
|
+
let scrollYLoad=!!virtualYOpts.enabled&&virtualYOpts.gt>-1&&(virtualYOpts.gt===0||virtualYOpts.gt<allList.length);if(scrollYLoad&&treeConfig&&!transform){errLog('vxe.error.notSupportProp',['[table] virtual-y-config.enabled=true','tree-config.transform=false','tree-config.transform=true']);scrollYLoad=false;}reactData.scrollYLoad=scrollYLoad;syncGanttScrollYStatus($xeTable);return scrollYLoad;}/**
|
|
7720
7720
|
* 展开与收起树节点
|
|
7721
7721
|
* @param rows
|
|
7722
7722
|
* @param expanded
|
|
@@ -8002,7 +8002,7 @@ if(virtualXOpts.scrollToLeftOnChange){targetScrollLeft=0;}if(virtualYOpts.scroll
|
|
|
8002
8002
|
* 更新数据行的 Map
|
|
8003
8003
|
*/cacheRowMap(isReset){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const{isRowGroupStatus}=reactData;const{currKeyField,fullAllDataRowIdData,tableFullData,tableFullTreeData,tableFullGroupData,treeExpandedMaps,rowExpandedMaps,selectCheckboxMaps}=internalData;const fullAllDataRowIdMaps=isReset?{}:{...fullAllDataRowIdData};// 存在已删除数据
|
|
8004
8004
|
const fullDataRowIdMaps={};const idMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(idMaps[rowid]){errLog('vxe.error.repeatKey',[currKeyField,rowid]);}if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,_tIndex:-1,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;// 更新缓存
|
|
8005
|
-
if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=$xeTable.computeTreeOpts;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(
|
|
8005
|
+
if(selectCheckboxMaps[rowid]){selectCheckboxMaps[rowid]=row;}if(rowExpandedMaps[rowid]){rowExpandedMaps[rowid]=row;}idMaps[rowid]=true;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=$xeTable.computeTreeOpts;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const aggregateOpts=$xeTable.computeAggregateOpts;const{mapChildrenField}=aggregateOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{treeConfig}=props;const treeOpts=$xeTable.computeTreeOpts;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
|
|
8006
8006
|
if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},getParams(){const $xeTable=this;const props=$xeTable;return props.params;},loadTreeChildren(row,childRecords){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{keepSource}=props;const{tableSourceData,fullDataRowIdData,fullAllDataRowIdData,sourceDataRowIdData}=internalData;const treeOpts=$xeTable.computeTreeOpts;const{transform,mapChildrenField}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const parentRest=fullAllDataRowIdData[getRowid($xeTable,row)];const parentLevel=parentRest?parentRest.level:0;return this.createData(childRecords).then(rows=>{if(keepSource){const rowid=getRowid(this,row);const matchObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(tableSourceData,item=>rowid===getRowid(this,item),{children:childrenField});if(matchObj){matchObj.item[childrenField]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows,true);}rows.forEach(childRow=>{const rowid=getRowid(this,childRow);sourceDataRowIdData[rowid]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(childRow,true);});}external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(rows,(childRow,index,items,path,parentItem,nodes)=>{const rowid=getRowid($xeTable,childRow);const parentRow=parentItem||parentRest.row;const rest={row:childRow,rowid,seq:-1,index,_index:-1,$index:-1,treeIndex:-1,_tIndex:-1,items,parent:parentRow,level:parentLevel+nodes.length,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdData[rowid]=rest;fullAllDataRowIdData[rowid]=rest;},{children:childrenField});row[childrenField]=rows;if(transform){row[mapChildrenField]=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(rows,false);}updateAfterDataIndex($xeTable);return rows;});},/**
|
|
8007
8007
|
* 根据 tr 元素获取对应的 row 信息
|
|
8008
8008
|
* @param {Element} tr 元素
|
|
@@ -13554,7 +13554,7 @@ const {
|
|
|
13554
13554
|
style: ctxMenuStore.style
|
|
13555
13555
|
}, (destroyOnClose ? visible : true) ? list.map((options, gIndex) => {
|
|
13556
13556
|
return options.every(item => item.visible === false) ? menu_panel_renderEmptyElement($xeTable) : h('ul', {
|
|
13557
|
-
class: 'vxe-context-menu
|
|
13557
|
+
class: 'vxe-table--context-menu-group-wrapper',
|
|
13558
13558
|
key: gIndex
|
|
13559
13559
|
}, options.map((item, index) => {
|
|
13560
13560
|
const {
|
|
@@ -13568,7 +13568,7 @@ const {
|
|
|
13568
13568
|
const suffixIcon = suffixOpts.icon || item.suffixIcon;
|
|
13569
13569
|
const menuContent = getFuncText(item.name);
|
|
13570
13570
|
return item.visible === false ? menu_panel_renderEmptyElement($xeTable) : h('li', {
|
|
13571
|
-
class: [item.className, {
|
|
13571
|
+
class: ['vxe-table--context-menu--option', item.className, {
|
|
13572
13572
|
'link--loading': loading,
|
|
13573
13573
|
'link--disabled': item.disabled,
|
|
13574
13574
|
'link--active': item === ctxMenuStore.selected
|
|
@@ -13602,11 +13602,11 @@ const {
|
|
|
13602
13602
|
class: ['vxe-context-menu--link-suffix', suffixOpts.className || '']
|
|
13603
13603
|
}, [suffixIcon && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(suffixIcon) ? h('span', {}, getSlotVNs(suffixIcon.call($xeTable, {}))) : h('i', {
|
|
13604
13604
|
class: suffixIcon || (hasChildMenus ? menu_panel_getIcon().TABLE_MENU_OPTIONS : '')
|
|
13605
|
-
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus &&
|
|
13605
|
+
}), suffixOpts.content ? h('span', `${suffixOpts.content}`) : menu_panel_renderEmptyElement($xeTable)])]), hasChildMenus && children ? h('ul', {
|
|
13606
13606
|
class: ['vxe-table--context-menu-clild-wrapper', {
|
|
13607
13607
|
'is--show': item === ctxMenuStore.selected && ctxMenuStore.showChild
|
|
13608
13608
|
}]
|
|
13609
|
-
},
|
|
13609
|
+
}, children.map((child, cIndex) => {
|
|
13610
13610
|
const {
|
|
13611
13611
|
loading: childLoading
|
|
13612
13612
|
} = child;
|
|
@@ -13616,7 +13616,7 @@ const {
|
|
|
13616
13616
|
const childSuffixIcon = childSuffixOpts.icon || child.suffixIcon;
|
|
13617
13617
|
const childMenuContent = getFuncText(child.name);
|
|
13618
13618
|
return child.visible === false ? null : h('li', {
|
|
13619
|
-
class: [child.className, {
|
|
13619
|
+
class: ['vxe-table--context-menu--option', child.className, {
|
|
13620
13620
|
'link--loading': childLoading,
|
|
13621
13621
|
'link--disabled': child.disabled,
|
|
13622
13622
|
'link--active': child === ctxMenuStore.selectChild
|
|
@@ -21868,7 +21868,7 @@ function renderBody(h, $xeTable) {
|
|
|
21868
21868
|
warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod']);
|
|
21869
21869
|
}
|
|
21870
21870
|
if (props.treeConfig && checkboxOpts.isShiftKey) {
|
|
21871
|
-
errLog('vxe.error.
|
|
21871
|
+
errLog('vxe.error.reqSupportProp', ['tree-config', 'checkbox-config.isShiftKey=false']);
|
|
21872
21872
|
}
|
|
21873
21873
|
if (checkboxOpts.halfField) {
|
|
21874
21874
|
warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField']);
|