vxe-table 3.12.9 → 3.12.10-beta.1
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/grid/src/grid.js +6 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ko-KR.js +515 -515
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +3 -3
- package/es/table/module/filter/mixin.js +3 -3
- package/es/table/module/keyboard/mixin.js +4 -4
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +2 -2
- package/es/table/src/body.js +247 -351
- package/es/table/src/footer.js +135 -154
- package/es/table/src/header.js +120 -100
- package/es/table/src/methods.js +1192 -797
- package/es/table/src/props.js +9 -3
- package/es/table/src/table.js +187 -103
- package/es/table/src/util.js +16 -7
- package/es/table/style.css +146 -63
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +14 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +146 -63
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +4 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +1917 -1550
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ko-KR.js +515 -515
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +515 -515
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +3 -3
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +4 -4
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +5 -5
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +2 -2
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/body.js +185 -365
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +124 -151
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +97 -74
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +1282 -840
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +9 -3
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +171 -90
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +17 -7
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +146 -63
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +14 -4
- 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 +146 -63
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +6 -1
- package/packages/locale/lang/ko-KR.ts +515 -515
- package/packages/table/module/export/mixin.ts +3 -3
- package/packages/table/module/filter/mixin.ts +3 -3
- package/packages/table/module/keyboard/mixin.ts +4 -4
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +2 -2
- package/packages/table/src/body.ts +281 -427
- package/packages/table/src/footer.ts +148 -164
- package/packages/table/src/header.ts +135 -111
- package/packages/table/src/methods.ts +1271 -858
- package/packages/table/src/props.ts +9 -3
- package/packages/table/src/table.ts +195 -146
- package/packages/table/src/util.ts +17 -7
- package/packages/ui/index.ts +13 -3
- package/styles/components/table.scss +164 -74
- /package/es/{iconfont.1736414871619.ttf → iconfont.1736690657500.ttf} +0 -0
- /package/es/{iconfont.1736414871619.woff → iconfont.1736690657500.woff} +0 -0
- /package/es/{iconfont.1736414871619.woff2 → iconfont.1736690657500.woff2} +0 -0
- /package/lib/{iconfont.1736414871619.ttf → iconfont.1736690657500.ttf} +0 -0
- /package/lib/{iconfont.1736414871619.woff → iconfont.1736690657500.woff} +0 -0
- /package/lib/{iconfont.1736414871619.woff2 → iconfont.1736690657500.woff2} +0 -0
package/lib/table/src/props.js
CHANGED
|
@@ -243,11 +243,17 @@ var _default = exports.default = {
|
|
|
243
243
|
// 空内容渲染配置项
|
|
244
244
|
emptyRender: [Boolean, Object],
|
|
245
245
|
// 自定义列配置项
|
|
246
|
-
customConfig:
|
|
247
|
-
//
|
|
246
|
+
customConfig: Object,
|
|
247
|
+
// (即将废弃)横向虚拟滚动配置项
|
|
248
248
|
scrollX: Object,
|
|
249
|
-
//
|
|
249
|
+
// (即将废弃)纵向虚拟滚动配置项
|
|
250
250
|
scrollY: Object,
|
|
251
|
+
// 横向虚拟滚动配置项
|
|
252
|
+
virtualXConfig: Object,
|
|
253
|
+
// 纵向虚拟滚动配置项
|
|
254
|
+
virtualYConfig: Object,
|
|
255
|
+
// 滚动条配置项
|
|
256
|
+
scrollbarConfig: Object,
|
|
251
257
|
// (即将废弃)优化相关
|
|
252
258
|
animat: {
|
|
253
259
|
type: Boolean,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _ui=require("../../ui");let getConfig=_ui.VxeUI.getConfig;var _default=exports.default={id:[String,Function],data:Array,height:[Number,String],minHeight:{type:[Number,String],default:()=>getConfig().table.minHeight},maxHeight:[Number,String],resizable:{type:Boolean,default:()=>getConfig().table.resizable},stripe:{type:Boolean,default:()=>getConfig().table.stripe},border:{type:[Boolean,String],default:()=>getConfig().table.border},padding:{type:Boolean,default:()=>getConfig().table.padding},round:{type:Boolean,default:()=>getConfig().table.round},size:{type:String,default:()=>getConfig().table.size||getConfig().size},fit:{type:Boolean,default:()=>getConfig().table.fit},loading:Boolean,align:{type:String,default:()=>getConfig().table.align},headerAlign:{type:String,default:()=>getConfig().table.headerAlign},footerAlign:{type:String,default:()=>getConfig().table.footerAlign},showHeader:{type:Boolean,default:()=>getConfig().table.showHeader},highlightCurrentRow:{type:Boolean,default:()=>getConfig().table.highlightCurrentRow},highlightHoverRow:{type:Boolean,default:()=>getConfig().table.highlightHoverRow},highlightCurrentColumn:{type:Boolean,default:()=>getConfig().table.highlightCurrentColumn},highlightHoverColumn:{type:Boolean,default:()=>getConfig().table.highlightHoverColumn},highlightCell:Boolean,showFooter:Boolean,footerData:Array,footerMethod:Function,rowClassName:[String,Function],cellClassName:[String,Function],headerRowClassName:[String,Function],headerCellClassName:[String,Function],footerRowClassName:[String,Function],footerCellClassName:[String,Function],cellStyle:[Object,Function],headerCellStyle:[Object,Function],footerCellStyle:[Object,Function],rowStyle:[Object,Function],headerRowStyle:[Object,Function],footerRowStyle:[Object,Function],mergeCells:Array,mergeFooterItems:Array,spanMethod:Function,footerSpanMethod:Function,showOverflow:{type:[Boolean,String],default:()=>getConfig().table.showOverflow},showHeaderOverflow:{type:[Boolean,String],default:()=>getConfig().table.showHeaderOverflow},showFooterOverflow:{type:[Boolean,String],default:()=>getConfig().table.showFooterOverflow},columnKey:Boolean,rowKey:Boolean,rowId:{type:String,default:()=>getConfig().table.rowId},zIndex:Number,emptyText:{type:String,default:()=>getConfig().table.emptyText},keepSource:{type:Boolean,default:()=>getConfig().table.keepSource},autoResize:{type:Boolean,default:()=>getConfig().table.autoResize},syncResize:[Boolean,String,Number],resizeConfig:Object,columnConfig:Object,cellConfig:Object,rowConfig:Object,dragConfig:Object,rowDragConfig:Object,columnDragConfig:Object,resizableConfig:Object,seqConfig:Object,sortConfig:Object,filterConfig:Object,radioConfig:Object,checkboxConfig:Object,tooltipConfig:Object,exportConfig:[Boolean,Object],importConfig:[Boolean,Object],printConfig:Object,expandConfig:Object,treeConfig:[Boolean,Object],menuConfig:[Boolean,Object],contextMenu:[Boolean,Object],mouseConfig:Object,areaConfig:Object,keyboardConfig:Object,clipConfig:Object,fnrConfig:Object,editConfig:[Boolean,Object],validConfig:Object,editRules:Object,loadingConfig:Object,emptyRender:[Boolean,Object],customConfig:
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _ui=require("../../ui");let getConfig=_ui.VxeUI.getConfig;var _default=exports.default={id:[String,Function],data:Array,height:[Number,String],minHeight:{type:[Number,String],default:()=>getConfig().table.minHeight},maxHeight:[Number,String],resizable:{type:Boolean,default:()=>getConfig().table.resizable},stripe:{type:Boolean,default:()=>getConfig().table.stripe},border:{type:[Boolean,String],default:()=>getConfig().table.border},padding:{type:Boolean,default:()=>getConfig().table.padding},round:{type:Boolean,default:()=>getConfig().table.round},size:{type:String,default:()=>getConfig().table.size||getConfig().size},fit:{type:Boolean,default:()=>getConfig().table.fit},loading:Boolean,align:{type:String,default:()=>getConfig().table.align},headerAlign:{type:String,default:()=>getConfig().table.headerAlign},footerAlign:{type:String,default:()=>getConfig().table.footerAlign},showHeader:{type:Boolean,default:()=>getConfig().table.showHeader},highlightCurrentRow:{type:Boolean,default:()=>getConfig().table.highlightCurrentRow},highlightHoverRow:{type:Boolean,default:()=>getConfig().table.highlightHoverRow},highlightCurrentColumn:{type:Boolean,default:()=>getConfig().table.highlightCurrentColumn},highlightHoverColumn:{type:Boolean,default:()=>getConfig().table.highlightHoverColumn},highlightCell:Boolean,showFooter:Boolean,footerData:Array,footerMethod:Function,rowClassName:[String,Function],cellClassName:[String,Function],headerRowClassName:[String,Function],headerCellClassName:[String,Function],footerRowClassName:[String,Function],footerCellClassName:[String,Function],cellStyle:[Object,Function],headerCellStyle:[Object,Function],footerCellStyle:[Object,Function],rowStyle:[Object,Function],headerRowStyle:[Object,Function],footerRowStyle:[Object,Function],mergeCells:Array,mergeFooterItems:Array,spanMethod:Function,footerSpanMethod:Function,showOverflow:{type:[Boolean,String],default:()=>getConfig().table.showOverflow},showHeaderOverflow:{type:[Boolean,String],default:()=>getConfig().table.showHeaderOverflow},showFooterOverflow:{type:[Boolean,String],default:()=>getConfig().table.showFooterOverflow},columnKey:Boolean,rowKey:Boolean,rowId:{type:String,default:()=>getConfig().table.rowId},zIndex:Number,emptyText:{type:String,default:()=>getConfig().table.emptyText},keepSource:{type:Boolean,default:()=>getConfig().table.keepSource},autoResize:{type:Boolean,default:()=>getConfig().table.autoResize},syncResize:[Boolean,String,Number],resizeConfig:Object,columnConfig:Object,cellConfig:Object,rowConfig:Object,dragConfig:Object,rowDragConfig:Object,columnDragConfig:Object,resizableConfig:Object,seqConfig:Object,sortConfig:Object,filterConfig:Object,radioConfig:Object,checkboxConfig:Object,tooltipConfig:Object,exportConfig:[Boolean,Object],importConfig:[Boolean,Object],printConfig:Object,expandConfig:Object,treeConfig:[Boolean,Object],menuConfig:[Boolean,Object],contextMenu:[Boolean,Object],mouseConfig:Object,areaConfig:Object,keyboardConfig:Object,clipConfig:Object,fnrConfig:Object,editConfig:[Boolean,Object],validConfig:Object,editRules:Object,loadingConfig:Object,emptyRender:[Boolean,Object],customConfig:Object,scrollX:Object,scrollY:Object,virtualXConfig:Object,virtualYConfig:Object,scrollbarConfig:Object,animat:{type:Boolean,default:()=>getConfig().table.animat},delayHover:{type:Number,default:()=>getConfig().table.delayHover},params:Object};
|
package/lib/table/src/table.js
CHANGED
|
@@ -58,10 +58,11 @@ function renderFixed(h, $xetable, fixedType) {
|
|
|
58
58
|
columnStore,
|
|
59
59
|
footerTableData
|
|
60
60
|
} = $xetable;
|
|
61
|
+
const isFixedLeft = fixedType === 'left';
|
|
61
62
|
const fixedColumn = columnStore[`${fixedType}List`];
|
|
62
63
|
return h('div', {
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
ref: isFixedLeft ? 'refLeftContainer' : 'refRightContainer',
|
|
65
|
+
class: `vxe-table--fixed-${fixedType}-wrapper`
|
|
65
66
|
}, [showHeader ? h(_header.default, {
|
|
66
67
|
props: {
|
|
67
68
|
fixedType,
|
|
@@ -215,7 +216,9 @@ var _default = exports.default = {
|
|
|
215
216
|
}
|
|
216
217
|
},
|
|
217
218
|
data() {
|
|
219
|
+
const xID = _xeUtils.default.uniqueId();
|
|
218
220
|
return {
|
|
221
|
+
xID,
|
|
219
222
|
tId: `${_xeUtils.default.uniqueId()}`,
|
|
220
223
|
isCalcColumn: false,
|
|
221
224
|
// 低性能的静态列
|
|
@@ -436,7 +439,7 @@ var _default = exports.default = {
|
|
|
436
439
|
dragCol: null,
|
|
437
440
|
dragTipText: '',
|
|
438
441
|
_isResize: false,
|
|
439
|
-
|
|
442
|
+
isLoading: false
|
|
440
443
|
};
|
|
441
444
|
},
|
|
442
445
|
computed: Object.assign(Object.assign({}, {}), {
|
|
@@ -469,7 +472,7 @@ var _default = exports.default = {
|
|
|
469
472
|
return this.computeSXOpts;
|
|
470
473
|
},
|
|
471
474
|
computeSXOpts() {
|
|
472
|
-
return
|
|
475
|
+
return this.computeVirtualXOpts;
|
|
473
476
|
},
|
|
474
477
|
computeScrollXThreshold() {
|
|
475
478
|
const $xeTable = this;
|
|
@@ -486,7 +489,22 @@ var _default = exports.default = {
|
|
|
486
489
|
return this.computeSYOpts;
|
|
487
490
|
},
|
|
488
491
|
computeSYOpts() {
|
|
489
|
-
return
|
|
492
|
+
return this.computeVirtualYOpts;
|
|
493
|
+
},
|
|
494
|
+
computeVirtualXOpts() {
|
|
495
|
+
const $xeTable = this;
|
|
496
|
+
const props = $xeTable;
|
|
497
|
+
return Object.assign({}, getConfig().table.scrollX, getConfig().table.virtualXConfig, props.scrollX, props.virtualXConfig);
|
|
498
|
+
},
|
|
499
|
+
computeVirtualYOpts() {
|
|
500
|
+
const $xeTable = this;
|
|
501
|
+
const props = $xeTable;
|
|
502
|
+
return Object.assign({}, getConfig().table.scrollY, getConfig().table.virtualYConfig, props.scrollY, props.virtualYConfig);
|
|
503
|
+
},
|
|
504
|
+
computeScrollbarOpts() {
|
|
505
|
+
const $xeTable = this;
|
|
506
|
+
const props = $xeTable;
|
|
507
|
+
return Object.assign({}, getConfig().table.scrollbarConfig, props.scrollbarConfig);
|
|
490
508
|
},
|
|
491
509
|
computeScrollYThreshold() {
|
|
492
510
|
const $xeTable = this;
|
|
@@ -510,6 +528,12 @@ var _default = exports.default = {
|
|
|
510
528
|
mini: 36
|
|
511
529
|
};
|
|
512
530
|
},
|
|
531
|
+
computeDefaultRowHeight() {
|
|
532
|
+
const $xeTable = this;
|
|
533
|
+
const vSize = $xeTable.computeSize;
|
|
534
|
+
const rowHeightMaps = $xeTable.computeRowHeightMaps;
|
|
535
|
+
return rowHeightMaps[vSize || 'default'];
|
|
536
|
+
},
|
|
513
537
|
columnOpts() {
|
|
514
538
|
return this.computeColumnOpts;
|
|
515
539
|
},
|
|
@@ -657,6 +681,38 @@ var _default = exports.default = {
|
|
|
657
681
|
computeMenuOpts() {
|
|
658
682
|
return Object.assign({}, getConfig().table.menuConfig, this.contextMenu, this.menuConfig);
|
|
659
683
|
},
|
|
684
|
+
computeLeftFixedWidth() {
|
|
685
|
+
const $xeTable = this;
|
|
686
|
+
const reactData = $xeTable;
|
|
687
|
+
const {
|
|
688
|
+
columnStore
|
|
689
|
+
} = reactData;
|
|
690
|
+
const {
|
|
691
|
+
leftList
|
|
692
|
+
} = columnStore;
|
|
693
|
+
let leftWidth = 0;
|
|
694
|
+
for (let i = 0; i < leftList.length; i++) {
|
|
695
|
+
const column = leftList[i];
|
|
696
|
+
leftWidth += column.renderWidth;
|
|
697
|
+
}
|
|
698
|
+
return leftWidth;
|
|
699
|
+
},
|
|
700
|
+
computeRightFixedWidth() {
|
|
701
|
+
const $xeTable = this;
|
|
702
|
+
const reactData = $xeTable;
|
|
703
|
+
const {
|
|
704
|
+
columnStore
|
|
705
|
+
} = reactData;
|
|
706
|
+
const {
|
|
707
|
+
rightList
|
|
708
|
+
} = columnStore;
|
|
709
|
+
let leftWidth = 0;
|
|
710
|
+
for (let i = 0; i < rightList.length; i++) {
|
|
711
|
+
const column = rightList[i];
|
|
712
|
+
leftWidth += column.renderWidth;
|
|
713
|
+
}
|
|
714
|
+
return leftWidth;
|
|
715
|
+
},
|
|
660
716
|
exportOpts() {
|
|
661
717
|
return this.computeExportOpts;
|
|
662
718
|
},
|
|
@@ -699,7 +755,7 @@ var _default = exports.default = {
|
|
|
699
755
|
computeLoadingOpts() {
|
|
700
756
|
return Object.assign({}, getConfig().table.loadingConfig, this.loadingConfig);
|
|
701
757
|
},
|
|
702
|
-
|
|
758
|
+
computeCellOffsetWidth() {
|
|
703
759
|
return this.border ? Math.max(2, Math.ceil(this.scrollbarWidth / this.tableColumn.length)) : 1;
|
|
704
760
|
},
|
|
705
761
|
customOpts() {
|
|
@@ -911,16 +967,21 @@ var _default = exports.default = {
|
|
|
911
967
|
elemStore: {},
|
|
912
968
|
// 存放横向 X 虚拟滚动相关的信息
|
|
913
969
|
scrollXStore: {
|
|
970
|
+
preloadSize: 0,
|
|
914
971
|
offsetSize: 0,
|
|
915
972
|
visibleSize: 0,
|
|
973
|
+
visibleStartIndex: 0,
|
|
974
|
+
visibleEndIndex: 0,
|
|
916
975
|
startIndex: 0,
|
|
917
976
|
endIndex: 0
|
|
918
977
|
},
|
|
919
978
|
// 存放纵向 Y 虚拟滚动相关信息
|
|
920
979
|
scrollYStore: {
|
|
921
|
-
|
|
980
|
+
preloadSize: 0,
|
|
922
981
|
offsetSize: 0,
|
|
923
982
|
visibleSize: 0,
|
|
983
|
+
visibleStartIndex: 0,
|
|
984
|
+
visibleEndIndex: 0,
|
|
924
985
|
startIndex: 0,
|
|
925
986
|
endIndex: 0
|
|
926
987
|
},
|
|
@@ -962,7 +1023,10 @@ var _default = exports.default = {
|
|
|
962
1023
|
fullDataRowIdData: {},
|
|
963
1024
|
fullColumnMap: new Map(),
|
|
964
1025
|
fullColumnIdData: {},
|
|
965
|
-
fullColumnFieldData: {}
|
|
1026
|
+
fullColumnFieldData: {},
|
|
1027
|
+
swYSize: 0,
|
|
1028
|
+
swYInterval: 0,
|
|
1029
|
+
swYTotal: 0
|
|
966
1030
|
});
|
|
967
1031
|
if (process.env.NODE_ENV === 'development') {
|
|
968
1032
|
if (this.rowId) {
|
|
@@ -1236,65 +1300,69 @@ var _default = exports.default = {
|
|
|
1236
1300
|
const VxeUITooltipComponent = _ui.VxeUI.getComponent('VxeTooltip');
|
|
1237
1301
|
const $xeTable = this;
|
|
1238
1302
|
const $xeGrid = $xeTable.$xeGrid;
|
|
1303
|
+
const props = $xeTable;
|
|
1304
|
+
const slots = $xeTable.$scopedSlots;
|
|
1305
|
+
const reactData = $xeTable;
|
|
1306
|
+
const {
|
|
1307
|
+
xID
|
|
1308
|
+
} = $xeTable;
|
|
1239
1309
|
const {
|
|
1240
|
-
_e,
|
|
1241
|
-
$scopedSlots,
|
|
1242
|
-
tId,
|
|
1243
|
-
isCalcColumn,
|
|
1244
|
-
tableData,
|
|
1245
|
-
tableColumn,
|
|
1246
|
-
tableGroupColumn,
|
|
1247
|
-
isGroup,
|
|
1248
1310
|
loading,
|
|
1249
1311
|
stripe,
|
|
1250
1312
|
showHeader,
|
|
1251
1313
|
height,
|
|
1252
|
-
treeOpts,
|
|
1253
1314
|
treeConfig,
|
|
1254
1315
|
mouseConfig,
|
|
1255
|
-
mouseOpts,
|
|
1256
|
-
areaOpts,
|
|
1257
|
-
computeSize,
|
|
1258
|
-
validOpts,
|
|
1259
1316
|
showFooter,
|
|
1317
|
+
highlightCell,
|
|
1318
|
+
highlightHoverRow,
|
|
1319
|
+
highlightHoverColumn,
|
|
1320
|
+
editConfig,
|
|
1321
|
+
editRules
|
|
1322
|
+
} = props;
|
|
1323
|
+
const {
|
|
1324
|
+
isCalcColumn,
|
|
1325
|
+
isGroup,
|
|
1260
1326
|
overflowX,
|
|
1261
1327
|
overflowY,
|
|
1262
1328
|
scrollXLoad,
|
|
1263
1329
|
scrollYLoad,
|
|
1264
1330
|
scrollbarHeight,
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
validTipOpts,
|
|
1331
|
+
tableData,
|
|
1332
|
+
tableColumn,
|
|
1333
|
+
tableGroupColumn,
|
|
1334
|
+
footerTableData,
|
|
1270
1335
|
initStore,
|
|
1271
1336
|
columnStore,
|
|
1272
1337
|
filterStore,
|
|
1273
1338
|
customStore,
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
footerTableData,
|
|
1277
|
-
columnOpts,
|
|
1278
|
-
rowOpts,
|
|
1279
|
-
checkboxOpts,
|
|
1280
|
-
loadingOpts,
|
|
1281
|
-
resizableOpts,
|
|
1282
|
-
editRules
|
|
1283
|
-
} = $xeTable;
|
|
1339
|
+
tooltipStore
|
|
1340
|
+
} = reactData;
|
|
1284
1341
|
const {
|
|
1285
1342
|
leftList,
|
|
1286
1343
|
rightList
|
|
1287
1344
|
} = columnStore;
|
|
1288
|
-
const loadingSlot =
|
|
1289
|
-
const
|
|
1290
|
-
const
|
|
1345
|
+
const loadingSlot = slots.loading;
|
|
1346
|
+
const tooltipOpts = $xeTable.computeTooltipOpts;
|
|
1347
|
+
const validOpts = $xeTable.computeValidOpts;
|
|
1348
|
+
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
1349
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
1350
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
1351
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
1352
|
+
const vSize = $xeTable.computeSize;
|
|
1291
1353
|
const tableBorder = $xeTable.computeTableBorder;
|
|
1292
|
-
const
|
|
1354
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
1355
|
+
const areaOpts = $xeTable.computeAreaOpts;
|
|
1356
|
+
const loadingOpts = $xeTable.computeLoadingOpts;
|
|
1357
|
+
const isMenu = $xeTable.computeIsMenu;
|
|
1358
|
+
const currLoading = reactData.isLoading || loading;
|
|
1359
|
+
const resizableOpts = $xeTable.computeResizableOpts;
|
|
1293
1360
|
const isArea = mouseConfig && mouseOpts.area;
|
|
1294
1361
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
1295
1362
|
return h('div', {
|
|
1296
1363
|
ref: 'refElem',
|
|
1297
|
-
class: ['vxe-table', 'vxe-table--render-default', `tid_${
|
|
1364
|
+
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, {
|
|
1365
|
+
[`size--${vSize}`]: vSize,
|
|
1298
1366
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
1299
1367
|
'vxe-editable': !!editConfig,
|
|
1300
1368
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
@@ -1314,9 +1382,9 @@ var _default = exports.default = {
|
|
|
1314
1382
|
'is--tree-line': treeConfig && (treeOpts.showLine || treeOpts.line),
|
|
1315
1383
|
'is--fixed-left': leftList.length,
|
|
1316
1384
|
'is--fixed-right': rightList.length,
|
|
1317
|
-
'is--animat': !!
|
|
1318
|
-
'is--padding':
|
|
1319
|
-
'is--round':
|
|
1385
|
+
'is--animat': !!props.animat,
|
|
1386
|
+
'is--padding': props.padding,
|
|
1387
|
+
'is--round': props.round,
|
|
1320
1388
|
'is--stripe': !treeConfig && stripe,
|
|
1321
1389
|
'is--loading': currLoading,
|
|
1322
1390
|
'is--empty': !currLoading && !tableData.length,
|
|
@@ -1341,6 +1409,9 @@ var _default = exports.default = {
|
|
|
1341
1409
|
}, this.$slots.default), h('div', {
|
|
1342
1410
|
key: 'tw',
|
|
1343
1411
|
class: 'vxe-table--render-wrapper'
|
|
1412
|
+
}, [h('div', {
|
|
1413
|
+
ref: 'refTableViewportElem',
|
|
1414
|
+
class: 'vxe-table--viewport-wrapper'
|
|
1344
1415
|
}, [h('div', {
|
|
1345
1416
|
class: 'vxe-table--main-wrapper'
|
|
1346
1417
|
}, [
|
|
@@ -1348,19 +1419,19 @@ var _default = exports.default = {
|
|
|
1348
1419
|
* 表头
|
|
1349
1420
|
*/
|
|
1350
1421
|
showHeader ? h(_header.default, {
|
|
1351
|
-
ref: '
|
|
1422
|
+
ref: 'refTableHeader',
|
|
1352
1423
|
props: {
|
|
1353
1424
|
tableData,
|
|
1354
1425
|
tableColumn,
|
|
1355
1426
|
tableGroupColumn,
|
|
1356
1427
|
size: vSize
|
|
1357
1428
|
}
|
|
1358
|
-
}) :
|
|
1429
|
+
}) : renderEmptyElement($xeTable),
|
|
1359
1430
|
/**
|
|
1360
|
-
|
|
1361
|
-
|
|
1431
|
+
* 表体
|
|
1432
|
+
*/
|
|
1362
1433
|
h(_body.default, {
|
|
1363
|
-
ref: '
|
|
1434
|
+
ref: 'refTableBody',
|
|
1364
1435
|
props: {
|
|
1365
1436
|
tableData,
|
|
1366
1437
|
tableColumn,
|
|
@@ -1368,18 +1439,36 @@ var _default = exports.default = {
|
|
|
1368
1439
|
}
|
|
1369
1440
|
}),
|
|
1370
1441
|
/**
|
|
1371
|
-
|
|
1372
|
-
|
|
1442
|
+
* 表尾
|
|
1443
|
+
*/
|
|
1373
1444
|
showFooter ? h(_footer.default, {
|
|
1374
|
-
ref: '
|
|
1445
|
+
ref: 'refTableFooter',
|
|
1375
1446
|
props: {
|
|
1376
1447
|
footerTableData,
|
|
1377
1448
|
tableColumn,
|
|
1378
1449
|
size: vSize
|
|
1379
1450
|
}
|
|
1380
|
-
}) :
|
|
1451
|
+
}) : renderEmptyElement($xeTable)]), h('div', {
|
|
1381
1452
|
class: 'vxe-table--fixed-wrapper'
|
|
1382
|
-
}, [leftList && leftList.length && overflowX ? renderFixed(h, this, 'left') :
|
|
1453
|
+
}, [leftList && leftList.length && overflowX ? renderFixed(h, this, 'left') : renderEmptyElement($xeTable), rightList && rightList.length && overflowX ? renderFixed(h, this, 'right') : renderEmptyElement($xeTable)])]), h('div', {
|
|
1454
|
+
ref: 'refScrollYVirtualElem',
|
|
1455
|
+
class: 'vxe-table--scroll-y-virtual'
|
|
1456
|
+
}, [h('div', {
|
|
1457
|
+
ref: 'refScrollYTopCornerElem',
|
|
1458
|
+
class: 'vxe-table--scroll-y-top-corner'
|
|
1459
|
+
}), h('div', {
|
|
1460
|
+
ref: 'refScrollYHandleElem',
|
|
1461
|
+
class: 'vxe-table--scroll-y-handle',
|
|
1462
|
+
on: {
|
|
1463
|
+
scroll: this.scrollYEvent
|
|
1464
|
+
}
|
|
1465
|
+
}, [h('div', {
|
|
1466
|
+
ref: 'refScrollYSpaceElem',
|
|
1467
|
+
class: 'vxe-table--scroll-y-space'
|
|
1468
|
+
})]), h('div', {
|
|
1469
|
+
ref: 'refScrollYBottomCornerElem',
|
|
1470
|
+
class: 'vxe-table--scroll-y-bottom-corner'
|
|
1471
|
+
})])]), h('div', {
|
|
1383
1472
|
key: 'vx',
|
|
1384
1473
|
ref: 'refScrollXVirtualElem',
|
|
1385
1474
|
class: 'vxe-table--scroll-x-virtual'
|
|
@@ -1387,31 +1476,21 @@ var _default = exports.default = {
|
|
|
1387
1476
|
ref: 'refScrollXHandleElem',
|
|
1388
1477
|
class: 'vxe-table--scroll-x-handle',
|
|
1389
1478
|
on: {
|
|
1390
|
-
scroll:
|
|
1479
|
+
scroll: this.scrollXEvent
|
|
1391
1480
|
}
|
|
1392
1481
|
}, [h('div', {
|
|
1393
1482
|
ref: 'refScrollXSpaceElem',
|
|
1394
1483
|
class: 'vxe-table--scroll-x-space'
|
|
1395
|
-
})])
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
}, [h('div', {
|
|
1400
|
-
ref: 'refScrollYHandleElem',
|
|
1401
|
-
class: 'vxe-table--scroll-y-handle',
|
|
1402
|
-
on: {
|
|
1403
|
-
scroll: $xeTable.scrollYEvent
|
|
1404
|
-
}
|
|
1405
|
-
}, [h('div', {
|
|
1406
|
-
ref: 'refScrollYSpaceElem',
|
|
1407
|
-
class: 'vxe-table--scroll-y-space'
|
|
1408
|
-
})])]) : renderEmptyElement($xeTable),
|
|
1484
|
+
})]), h('div', {
|
|
1485
|
+
ref: 'refScrollXRightCornerElem',
|
|
1486
|
+
class: 'vxe-table--scroll-x-right-corner'
|
|
1487
|
+
})]),
|
|
1409
1488
|
/**
|
|
1410
1489
|
* 空数据
|
|
1411
1490
|
*/
|
|
1412
1491
|
h('div', {
|
|
1413
1492
|
key: 'tn',
|
|
1414
|
-
ref: '
|
|
1493
|
+
ref: 'refEmptyPlaceholder',
|
|
1415
1494
|
class: 'vxe-table--empty-placeholder'
|
|
1416
1495
|
}, [h('div', {
|
|
1417
1496
|
class: 'vxe-table--empty-content'
|
|
@@ -1428,15 +1507,15 @@ var _default = exports.default = {
|
|
|
1428
1507
|
*/
|
|
1429
1508
|
h('div', {
|
|
1430
1509
|
key: 'cl',
|
|
1510
|
+
ref: 'refCellResizeBar',
|
|
1431
1511
|
class: 'vxe-table--resizable-bar',
|
|
1432
1512
|
style: overflowX ? {
|
|
1433
1513
|
'padding-bottom': `${scrollbarHeight}px`
|
|
1434
|
-
} :
|
|
1435
|
-
ref: 'resizeBar'
|
|
1514
|
+
} : undefined
|
|
1436
1515
|
}, resizableOpts.showDragTip ? [h('div', {
|
|
1437
1516
|
ref: 'refCellResizeTip',
|
|
1438
1517
|
class: 'vxe-table--resizable-number-tip'
|
|
1439
|
-
}
|
|
1518
|
+
})] : []),
|
|
1440
1519
|
/**
|
|
1441
1520
|
* 加载中
|
|
1442
1521
|
*/
|
|
@@ -1483,7 +1562,7 @@ var _default = exports.default = {
|
|
|
1483
1562
|
props: {
|
|
1484
1563
|
filterStore
|
|
1485
1564
|
}
|
|
1486
|
-
}) :
|
|
1565
|
+
}) : renderEmptyElement($xeTable),
|
|
1487
1566
|
/**
|
|
1488
1567
|
* 导入
|
|
1489
1568
|
*/
|
|
@@ -1493,7 +1572,7 @@ var _default = exports.default = {
|
|
|
1493
1572
|
defaultOptions: this.importParams,
|
|
1494
1573
|
storeData: this.importStore
|
|
1495
1574
|
}
|
|
1496
|
-
}) :
|
|
1575
|
+
}) : renderEmptyElement($xeTable),
|
|
1497
1576
|
/**
|
|
1498
1577
|
* 导出
|
|
1499
1578
|
*/
|
|
@@ -1503,18 +1582,18 @@ var _default = exports.default = {
|
|
|
1503
1582
|
defaultOptions: this.exportParams,
|
|
1504
1583
|
storeData: this.exportStore
|
|
1505
1584
|
}
|
|
1506
|
-
}) :
|
|
1585
|
+
}) : renderEmptyElement($xeTable),
|
|
1507
1586
|
/**
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1587
|
+
* 快捷菜单
|
|
1588
|
+
*/
|
|
1589
|
+
isMenu ? h(_panel3.default, {
|
|
1511
1590
|
key: 'tm',
|
|
1512
|
-
ref: '
|
|
1591
|
+
ref: 'refTableMenu',
|
|
1513
1592
|
props: {
|
|
1514
|
-
ctxMenuStore,
|
|
1515
|
-
ctxMenuOpts
|
|
1593
|
+
ctxMenuStore: this.ctxMenuStore,
|
|
1594
|
+
ctxMenuOpts: this.ctxMenuOpts
|
|
1516
1595
|
}
|
|
1517
|
-
}) :
|
|
1596
|
+
}) : renderEmptyElement($xeTable),
|
|
1518
1597
|
/**
|
|
1519
1598
|
* 拖拽提示
|
|
1520
1599
|
*/
|
|
@@ -1524,31 +1603,33 @@ var _default = exports.default = {
|
|
|
1524
1603
|
*/
|
|
1525
1604
|
VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
1526
1605
|
key: 'ctp',
|
|
1527
|
-
ref: '
|
|
1606
|
+
ref: 'refCommTooltip',
|
|
1528
1607
|
props: {
|
|
1529
1608
|
isArrow: false,
|
|
1530
1609
|
enterable: false
|
|
1531
1610
|
}
|
|
1532
|
-
}) :
|
|
1611
|
+
}) : renderEmptyElement($xeTable),
|
|
1533
1612
|
/**
|
|
1534
1613
|
* 工具提示
|
|
1535
1614
|
*/
|
|
1536
1615
|
VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
1537
1616
|
key: 'btp',
|
|
1538
1617
|
ref: 'tooltip',
|
|
1539
|
-
props: Object.assign({},
|
|
1540
|
-
}) :
|
|
1618
|
+
props: Object.assign({}, tooltipOpts, tooltipStore.currOpts)
|
|
1619
|
+
}) : renderEmptyElement($xeTable),
|
|
1541
1620
|
/**
|
|
1542
1621
|
* 校验提示
|
|
1543
1622
|
*/
|
|
1544
1623
|
VxeUITooltipComponent && this.editRules && validOpts.showMessage && (validOpts.message === 'default' ? !height : validOpts.message === 'tooltip') ? h(VxeUITooltipComponent, {
|
|
1545
1624
|
key: 'vtp',
|
|
1546
|
-
ref: '
|
|
1625
|
+
ref: 'refValidTooltip',
|
|
1547
1626
|
class: [{
|
|
1548
1627
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete'
|
|
1549
1628
|
}, 'vxe-table--valid-error'],
|
|
1550
|
-
props: validOpts.message === 'tooltip' || tableData.length === 1 ?
|
|
1551
|
-
|
|
1629
|
+
props: validOpts.message === 'tooltip' || tableData.length === 1 ? Object.assign({
|
|
1630
|
+
isArrow: false
|
|
1631
|
+
}, tooltipOpts) : {}
|
|
1632
|
+
}) : renderEmptyElement($xeTable)])]);
|
|
1552
1633
|
},
|
|
1553
1634
|
methods: _methods.default
|
|
1554
1635
|
};
|