vxe-table 4.8.8 → 4.8.9
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/style.min.css +1 -1
- package/es/table/src/body.js +4 -8
- package/es/table/src/footer.js +2 -4
- package/es/table/src/table.js +137 -56
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +140 -67
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +4 -8
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +2 -4
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/table.js +134 -55
- package/lib/table/src/table.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/body.ts +4 -8
- package/packages/table/src/footer.ts +2 -4
- package/packages/table/src/table.ts +133 -54
- /package/es/{iconfont.1731060581842.ttf → iconfont.1731144197614.ttf} +0 -0
- /package/es/{iconfont.1731060581842.woff → iconfont.1731144197614.woff} +0 -0
- /package/es/{iconfont.1731060581842.woff2 → iconfont.1731144197614.woff2} +0 -0
- /package/lib/{iconfont.1731060581842.ttf → iconfont.1731144197614.ttf} +0 -0
- /package/lib/{iconfont.1731060581842.woff → iconfont.1731144197614.woff} +0 -0
- /package/lib/{iconfont.1731060581842.woff2 → iconfont.1731144197614.woff2} +0 -0
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");const version=exports.version="4.8.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VXETable=void 0,Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.version=exports.validators=exports.use=exports.t=exports.setup=exports.setTheme=exports.setLanguage=exports.setIcon=exports.setI18n=exports.setConfig=exports.saveFile=exports.renderer=exports.readFile=exports.print=exports.modal=exports.menus=exports.log=exports.interceptor=exports.hooks=exports.globalResize=exports.globalEvents=exports.getTheme=exports.getIcon=exports.getI18n=exports.getConfig=exports.formats=exports.default=exports.config=exports.commands=exports.clipboard=exports._t=void 0;var _core=require("@vxe-ui/core"),_utils=require("./src/utils");const version=exports.version="4.8.9",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,padding:!0,minHeight:144,resizeConfig:{refreshDelay:250},radioConfig:{strict:!0},dragConfig:{showRowIcon:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"normal"},columnConfig:{maxFixedSize:4},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0}},sortConfig:{showIcon:!0,iconLayout:"vertical"},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0},editConfig:{showIcon:!0,showAsterisk:!0,autoFocus:!0},importConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},exportConfig:{_typeMaps:{csv:1,html:1,xml:1,txt:1}},printConfig:{},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{gt:60},scrollY:{gt:100}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showResponseMsg:!0,showActiveMsg:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{}}),"vxe-table-icon-"),setTheme=(_core.VxeUI.setIcon({TABLE_SORT_ASC:iconPrefix+"caret-up",TABLE_SORT_DESC:iconPrefix+"caret-down",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit",TABLE_TITLE_PREFIX:iconPrefix+"question-circle-fill",TABLE_TITLE_SUFFIX:iconPrefix+"question-circle-fill",TABLE_TREE_LOADED:iconPrefix+"spinner roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"spinner roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",TABLE_CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",TABLE_CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",TABLE_CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TOOLBAR_TOOLS_REFRESH:iconPrefix+"repeat",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"repeat roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_FULLSCREEN:iconPrefix+"fullscreen",TOOLBAR_TOOLS_MINIMIZE:iconPrefix+"minimize",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"custom-column",TOOLBAR_TOOLS_FIXED_LEFT:iconPrefix+"fixed-left",TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:iconPrefix+"fixed-left-fill",TOOLBAR_TOOLS_FIXED_RIGHT:iconPrefix+"fixed-right",TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:iconPrefix+"fixed-right-fill"}),exports.setTheme=_core.VxeUI.setTheme),getTheme=exports.getTheme=_core.VxeUI.getTheme,setConfig=exports.setConfig=_core.VxeUI.setConfig,getConfig=exports.getConfig=_core.VxeUI.getConfig,setIcon=exports.setIcon=_core.VxeUI.setIcon,getIcon=exports.getIcon=_core.VxeUI.getIcon,setLanguage=exports.setLanguage=_core.VxeUI.setLanguage,setI18n=exports.setI18n=_core.VxeUI.setI18n,getI18n=exports.getI18n=_core.VxeUI.getI18n,globalEvents=exports.globalEvents=_core.VxeUI.globalEvents,globalResize=exports.globalResize=_core.VxeUI.globalResize,renderer=exports.renderer=_core.VxeUI.renderer,validators=exports.validators=_core.VxeUI.validators,menus=exports.menus=_core.VxeUI.menus,formats=exports.formats=_core.VxeUI.formats,commands=exports.commands=_core.VxeUI.commands,interceptor=exports.interceptor=_core.VxeUI.interceptor,clipboard=exports.clipboard=_core.VxeUI.clipboard,log=exports.log=_core.VxeUI.log,hooks=exports.hooks=_core.VxeUI.hooks,use=exports.use=_core.VxeUI.use,setup=e=>_core.VxeUI.setConfig(e),config=(exports.setup=setup,_core.VxeUI.setup=setup,e=>_core.VxeUI.setConfig(e)),t=(exports.config=config,_core.VxeUI.config=config,(e,o)=>_core.VxeUI.getI18n(e,o)),_t=(exports.t=t,_core.VxeUI.t=t,(e,o)=>(0,_utils.getFuncText)(e,o)),VXETable=(exports._t=_t,_core.VxeUI._t=_t,exports.VXETable=_core.VxeUI),saveFile=e=>_core.VxeUI.saveFile(e),readFile=(exports.saveFile=saveFile,e=>_core.VxeUI.readFile(e)),print=(exports.readFile=readFile,e=>_core.VxeUI.print(e)),modal=(exports.print=print,exports.modal={get(e){return _core.VxeUI.modal.get(e)},close(e){return _core.VxeUI.modal.close(e)},open(e){return _core.VxeUI.modal.open(e)},alert(e,o,r){return _core.VxeUI.modal.alert(e,o,r)},confirm(e,o,r){return _core.VxeUI.modal.confirm(e,o,r)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,r){return _core.VxeUI.modal.notification(e,o,r)}});var _default=exports.default=_core.VxeUI;
|
package/lib/ui/src/log.js
CHANGED
|
@@ -8,6 +8,6 @@ var _core = require("@vxe-ui/core");
|
|
|
8
8
|
const {
|
|
9
9
|
log
|
|
10
10
|
} = _core.VxeUI;
|
|
11
|
-
const version = `table v${"4.8.
|
|
11
|
+
const version = `table v${"4.8.9"}`;
|
|
12
12
|
const warnLog = exports.warnLog = log.create('warn', version);
|
|
13
13
|
const errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.8.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");const log=_core.VxeUI["log"],version="table v4.8.9",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-table",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.9",
|
|
4
4
|
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"style": "lib/style.css",
|
|
29
29
|
"typings": "types/index.d.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"vxe-pc-ui": "^4.2.
|
|
31
|
+
"vxe-pc-ui": "^4.2.49"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/resize-observer-browser": "^0.1.11",
|
|
@@ -548,11 +548,9 @@ export default defineComponent({
|
|
|
548
548
|
setScrollTop(leftElem, scrollTop)
|
|
549
549
|
setScrollTop(rightElem, scrollTop)
|
|
550
550
|
}
|
|
551
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
551
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
552
552
|
type: renderType,
|
|
553
|
-
fixed: fixedType
|
|
554
|
-
scrollTop,
|
|
555
|
-
scrollLeft
|
|
553
|
+
fixed: fixedType
|
|
556
554
|
})
|
|
557
555
|
}
|
|
558
556
|
if (xHandleEl) {
|
|
@@ -562,11 +560,9 @@ export default defineComponent({
|
|
|
562
560
|
tableInternalData.lastScrollLeft = scrollLeft
|
|
563
561
|
setScrollLeft(headerElem, scrollLeft)
|
|
564
562
|
setScrollLeft(footerElem, scrollLeft)
|
|
565
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
563
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
566
564
|
type: renderType,
|
|
567
|
-
fixed: fixedType
|
|
568
|
-
scrollTop,
|
|
569
|
-
scrollLeft
|
|
565
|
+
fixed: fixedType
|
|
570
566
|
})
|
|
571
567
|
}
|
|
572
568
|
}
|
|
@@ -80,11 +80,9 @@ export default defineComponent({
|
|
|
80
80
|
tableReactData.lastScrollTime = Date.now()
|
|
81
81
|
setScrollLeft(headerElem, scrollLeft)
|
|
82
82
|
setScrollLeft(bodyElem, scrollLeft)
|
|
83
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
83
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
84
84
|
type: renderType,
|
|
85
|
-
fixed: fixedType
|
|
86
|
-
scrollTop,
|
|
87
|
-
scrollLeft
|
|
85
|
+
fixed: fixedType
|
|
88
86
|
})
|
|
89
87
|
}
|
|
90
88
|
}
|
|
@@ -2955,11 +2955,9 @@ export default defineComponent({
|
|
|
2955
2955
|
reactData.lastScrollTime = Date.now()
|
|
2956
2956
|
handleSyncScrollX(scrollLeft)
|
|
2957
2957
|
$xeTable.triggerScrollXEvent(evnt)
|
|
2958
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
2958
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
2959
2959
|
type: 'table',
|
|
2960
|
-
fixed: ''
|
|
2961
|
-
scrollTop,
|
|
2962
|
-
scrollLeft
|
|
2960
|
+
fixed: ''
|
|
2963
2961
|
})
|
|
2964
2962
|
}
|
|
2965
2963
|
|
|
@@ -2988,11 +2986,9 @@ export default defineComponent({
|
|
|
2988
2986
|
reactData.lastScrollTime = Date.now()
|
|
2989
2987
|
handleSyncScrollY(scrollTop)
|
|
2990
2988
|
$xeTable.triggerScrollYEvent(evnt)
|
|
2991
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, {
|
|
2989
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, scrollTop, scrollLeft, {
|
|
2992
2990
|
type: 'table',
|
|
2993
|
-
fixed: ''
|
|
2994
|
-
scrollTop,
|
|
2995
|
-
scrollLeft
|
|
2991
|
+
fixed: ''
|
|
2996
2992
|
})
|
|
2997
2993
|
}
|
|
2998
2994
|
|
|
@@ -3642,25 +3638,35 @@ export default defineComponent({
|
|
|
3642
3638
|
* 设置为固定列
|
|
3643
3639
|
*/
|
|
3644
3640
|
setColumnFixed (fieldOrColumn, fixed) {
|
|
3645
|
-
|
|
3646
|
-
const
|
|
3647
|
-
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
3641
|
+
let status = false
|
|
3642
|
+
const cols = XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn]
|
|
3648
3643
|
const columnOpts = computeColumnOpts.value
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3644
|
+
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
3645
|
+
for (let i = 0; i < cols.length; i++) {
|
|
3646
|
+
const item = cols[i]
|
|
3647
|
+
const column = handleFieldOrColumn($xeTable, item)
|
|
3648
|
+
const targetColumn = getRootColumn($xeTable, column as any)
|
|
3649
|
+
if (targetColumn && targetColumn.fixed !== fixed) {
|
|
3650
|
+
// 是否超过最大固定列数量
|
|
3651
|
+
if (!targetColumn.fixed && isMaxFixedColumn) {
|
|
3652
|
+
if (VxeUI.modal) {
|
|
3653
|
+
VxeUI.modal.message({
|
|
3654
|
+
status: 'error',
|
|
3655
|
+
content: getI18n('vxe.table.maxFixedCol', [columnOpts.maxFixedSize])
|
|
3656
|
+
})
|
|
3657
|
+
}
|
|
3658
|
+
return nextTick()
|
|
3659
|
+
}
|
|
3660
|
+
XEUtils.eachTree([targetColumn], (column) => {
|
|
3661
|
+
column.fixed = fixed
|
|
3662
|
+
})
|
|
3663
|
+
tablePrivateMethods.saveCustomStore('update:fixed')
|
|
3664
|
+
if (!status) {
|
|
3665
|
+
status = true
|
|
3657
3666
|
}
|
|
3658
|
-
return nextTick()
|
|
3659
3667
|
}
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
})
|
|
3663
|
-
tablePrivateMethods.saveCustomStore('update:fixed')
|
|
3668
|
+
}
|
|
3669
|
+
if (status) {
|
|
3664
3670
|
return tableMethods.refreshColumn()
|
|
3665
3671
|
}
|
|
3666
3672
|
return nextTick()
|
|
@@ -3669,13 +3675,22 @@ export default defineComponent({
|
|
|
3669
3675
|
* 取消指定固定列
|
|
3670
3676
|
*/
|
|
3671
3677
|
clearColumnFixed (fieldOrColumn) {
|
|
3672
|
-
|
|
3673
|
-
const
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3678
|
+
let status = false
|
|
3679
|
+
const cols = XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn]
|
|
3680
|
+
cols.forEach(item => {
|
|
3681
|
+
const column = handleFieldOrColumn($xeTable, item)
|
|
3682
|
+
const targetColumn = getRootColumn($xeTable, column as any)
|
|
3683
|
+
if (targetColumn && targetColumn.fixed) {
|
|
3684
|
+
XEUtils.eachTree([targetColumn], (column) => {
|
|
3685
|
+
column.fixed = null
|
|
3686
|
+
})
|
|
3687
|
+
tablePrivateMethods.saveCustomStore('update:fixed')
|
|
3688
|
+
if (!status) {
|
|
3689
|
+
status = true
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
})
|
|
3693
|
+
if (status) {
|
|
3679
3694
|
return tableMethods.refreshColumn()
|
|
3680
3695
|
}
|
|
3681
3696
|
return nextTick()
|
|
@@ -3684,9 +3699,18 @@ export default defineComponent({
|
|
|
3684
3699
|
* 隐藏指定列
|
|
3685
3700
|
*/
|
|
3686
3701
|
hideColumn (fieldOrColumn) {
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3702
|
+
let status = false
|
|
3703
|
+
const cols = XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn]
|
|
3704
|
+
cols.forEach(item => {
|
|
3705
|
+
const column = handleFieldOrColumn($xeTable, item)
|
|
3706
|
+
if (column && column.visible) {
|
|
3707
|
+
column.visible = false
|
|
3708
|
+
if (!status) {
|
|
3709
|
+
status = true
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
})
|
|
3713
|
+
if (status) {
|
|
3690
3714
|
return tablePrivateMethods.handleCustom()
|
|
3691
3715
|
}
|
|
3692
3716
|
return nextTick()
|
|
@@ -3695,25 +3719,43 @@ export default defineComponent({
|
|
|
3695
3719
|
* 显示指定列
|
|
3696
3720
|
*/
|
|
3697
3721
|
showColumn (fieldOrColumn) {
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3722
|
+
let status = false
|
|
3723
|
+
const cols = XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn]
|
|
3724
|
+
cols.forEach(item => {
|
|
3725
|
+
const column = handleFieldOrColumn($xeTable, item)
|
|
3726
|
+
if (column && !column.visible) {
|
|
3727
|
+
column.visible = true
|
|
3728
|
+
if (!status) {
|
|
3729
|
+
status = true
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
})
|
|
3733
|
+
if (status) {
|
|
3701
3734
|
return tablePrivateMethods.handleCustom()
|
|
3702
3735
|
}
|
|
3703
3736
|
return nextTick()
|
|
3704
3737
|
},
|
|
3705
3738
|
setColumnWidth (fieldOrColumn, width) {
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
if (
|
|
3711
|
-
const
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3739
|
+
let status = false
|
|
3740
|
+
const cols = XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn]
|
|
3741
|
+
cols.forEach(item => {
|
|
3742
|
+
const column = handleFieldOrColumn($xeTable, item)
|
|
3743
|
+
if (column) {
|
|
3744
|
+
const colWidth = XEUtils.toInteger(width)
|
|
3745
|
+
let rdWidth = colWidth
|
|
3746
|
+
if (isScale(width)) {
|
|
3747
|
+
const tableBody = refTableBody.value
|
|
3748
|
+
const bodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
|
|
3749
|
+
const bodyWidth = bodyElem ? bodyElem.clientWidth - 1 : 0
|
|
3750
|
+
rdWidth = Math.floor(colWidth * bodyWidth)
|
|
3751
|
+
}
|
|
3752
|
+
column.resizeWidth = rdWidth
|
|
3753
|
+
if (!status) {
|
|
3754
|
+
status = true
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
})
|
|
3758
|
+
if (status) {
|
|
3717
3759
|
return tableMethods.refreshColumn()
|
|
3718
3760
|
}
|
|
3719
3761
|
return nextTick()
|
|
@@ -4668,16 +4710,34 @@ export default defineComponent({
|
|
|
4668
4710
|
*/
|
|
4669
4711
|
scrollTo (scrollLeft: number, scrollTop?: number) {
|
|
4670
4712
|
const tableBody = refTableBody.value
|
|
4713
|
+
const tableHeader = refTableHeader.value
|
|
4671
4714
|
const tableFooter = refTableFooter.value
|
|
4715
|
+
const leftBody = refTableLeftBody.value
|
|
4672
4716
|
const rightBody = refTableRightBody.value
|
|
4673
4717
|
const tableBodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
|
|
4718
|
+
const leftBodyElem = leftBody ? leftBody.$el as HTMLDivElement : null
|
|
4674
4719
|
const rightBodyElem = rightBody ? rightBody.$el as HTMLDivElement : null
|
|
4720
|
+
const tableHeaderElem = tableHeader ? tableHeader.$el as HTMLDivElement : null
|
|
4675
4721
|
const tableFooterElem = tableFooter ? tableFooter.$el as HTMLDivElement : null
|
|
4676
4722
|
if (XEUtils.isNumber(scrollLeft)) {
|
|
4677
|
-
|
|
4723
|
+
const xHandleEl = refScrollXHandleElem.value
|
|
4724
|
+
if (xHandleEl) {
|
|
4725
|
+
setScrollLeft(xHandleEl, scrollLeft)
|
|
4726
|
+
} else {
|
|
4727
|
+
setScrollLeft(tableBodyElem, scrollLeft)
|
|
4728
|
+
setScrollLeft(tableHeaderElem, scrollLeft)
|
|
4729
|
+
setScrollLeft(tableFooterElem, scrollLeft)
|
|
4730
|
+
}
|
|
4678
4731
|
}
|
|
4679
4732
|
if (XEUtils.isNumber(scrollTop)) {
|
|
4680
|
-
|
|
4733
|
+
const yHandleEl = refScrollYHandleElem.value
|
|
4734
|
+
if (yHandleEl) {
|
|
4735
|
+
setScrollTop(yHandleEl, scrollTop)
|
|
4736
|
+
} else {
|
|
4737
|
+
setScrollTop(tableBodyElem, scrollTop)
|
|
4738
|
+
setScrollTop(leftBodyElem, scrollTop)
|
|
4739
|
+
setScrollTop(rightBodyElem, scrollTop)
|
|
4740
|
+
}
|
|
4681
4741
|
}
|
|
4682
4742
|
if (reactData.scrollXLoad || reactData.scrollYLoad) {
|
|
4683
4743
|
return new Promise(resolve => {
|
|
@@ -6811,7 +6871,7 @@ export default defineComponent({
|
|
|
6811
6871
|
triggerScrollXEvent () {
|
|
6812
6872
|
loadScrollXData()
|
|
6813
6873
|
},
|
|
6814
|
-
handleScrollEvent (evnt, isRollY, isRollX, params) {
|
|
6874
|
+
handleScrollEvent (evnt, isRollY, isRollX, scrollTop, scrollLeft, params) {
|
|
6815
6875
|
const { highlightHoverRow } = props
|
|
6816
6876
|
const tableBody = refTableBody.value
|
|
6817
6877
|
const bodyElem = tableBody ? tableBody.$el as HTMLDivElement : null
|
|
@@ -6827,20 +6887,39 @@ export default defineComponent({
|
|
|
6827
6887
|
if (tooltip && tooltip.reactData.visible) {
|
|
6828
6888
|
tooltip.close()
|
|
6829
6889
|
}
|
|
6830
|
-
if (isRollX) {
|
|
6831
|
-
tablePrivateMethods.checkScrolling()
|
|
6832
|
-
}
|
|
6833
6890
|
const bodyHeight = bodyElem ? bodyElem.clientHeight : 0
|
|
6834
6891
|
const bodyWidth = bodyElem ? bodyElem.clientWidth : 0
|
|
6835
6892
|
const scrollHeight = bodyElem ? bodyElem.scrollHeight : 0
|
|
6836
6893
|
const scrollWidth = bodyElem ? bodyElem.scrollWidth : 0
|
|
6894
|
+
let isTop = false
|
|
6895
|
+
let isBottom = false
|
|
6896
|
+
let isLeft = false
|
|
6897
|
+
let isRight = false
|
|
6898
|
+
if (isRollX) {
|
|
6899
|
+
isLeft = scrollLeft <= 0
|
|
6900
|
+
if (!isTop) {
|
|
6901
|
+
isRight = scrollLeft + bodyWidth >= scrollWidth
|
|
6902
|
+
}
|
|
6903
|
+
tablePrivateMethods.checkScrolling()
|
|
6904
|
+
} else {
|
|
6905
|
+
isTop = scrollTop <= 0
|
|
6906
|
+
if (!isTop) {
|
|
6907
|
+
isBottom = scrollTop + bodyHeight >= scrollHeight
|
|
6908
|
+
}
|
|
6909
|
+
}
|
|
6837
6910
|
const evntParams = {
|
|
6911
|
+
scrollTop,
|
|
6912
|
+
scrollLeft,
|
|
6838
6913
|
bodyHeight,
|
|
6839
6914
|
bodyWidth,
|
|
6840
6915
|
scrollHeight,
|
|
6841
6916
|
scrollWidth,
|
|
6842
6917
|
isX: isRollX,
|
|
6843
6918
|
isY: isRollY,
|
|
6919
|
+
isTop,
|
|
6920
|
+
isBottom,
|
|
6921
|
+
isLeft,
|
|
6922
|
+
isRight,
|
|
6844
6923
|
...params
|
|
6845
6924
|
}
|
|
6846
6925
|
dispatchEvent('scroll', evntParams, evnt)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|