vxe-table 4.16.10 → 4.16.11
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 +43 -25
- package/es/table/src/footer.js +3 -3
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +35 -9
- package/es/ui/index.js +7 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +88 -49
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +60 -32
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +3 -3
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +10 -10
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +7 -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 +1 -1
- package/packages/table/src/cell.ts +41 -25
- package/packages/table/src/footer.ts +3 -3
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +34 -9
- package/packages/ui/index.ts +6 -0
- /package/es/{iconfont.1757464778789.ttf → iconfont.1757578456216.ttf} +0 -0
- /package/es/{iconfont.1757464778789.woff → iconfont.1757578456216.woff} +0 -0
- /package/es/{iconfont.1757464778789.woff2 → iconfont.1757578456216.woff2} +0 -0
- /package/lib/{iconfont.1757464778789.ttf → iconfont.1757578456216.ttf} +0 -0
- /package/lib/{iconfont.1757464778789.woff → iconfont.1757578456216.woff} +0 -0
- /package/lib/{iconfont.1757464778789.woff2 → iconfont.1757578456216.woff2} +0 -0
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "VxeUI", {
|
|
|
13
13
|
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;
|
|
14
14
|
var _core = require("@vxe-ui/core");
|
|
15
15
|
var _utils = require("./src/utils");
|
|
16
|
-
const version = exports.version = "4.16.
|
|
16
|
+
const version = exports.version = "4.16.11";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
|
@@ -75,6 +75,12 @@ _core.VxeUI.setConfig({
|
|
|
75
75
|
tooltipConfig: {
|
|
76
76
|
enterable: true
|
|
77
77
|
},
|
|
78
|
+
headerTooltipConfig: {
|
|
79
|
+
enterable: true
|
|
80
|
+
},
|
|
81
|
+
footerTooltipConfig: {
|
|
82
|
+
enterable: true
|
|
83
|
+
},
|
|
78
84
|
validConfig: {
|
|
79
85
|
showMessage: true,
|
|
80
86
|
autoClear: true,
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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");let version=exports.version="4.16.
|
|
1
|
+
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");let version=exports.version="4.16.11",iconPrefix=(_core.VxeUI.version=version,_core.VxeUI.tableVersion=version,_core.VxeUI.setConfig({emptyCell:" ",table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,resizeConfig:{},resizableConfig:{dragMode:"auto",showDragTip:!0,isSyncAutoHeight:!0,isSyncAutoWidth:!0,minHeight:18},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},headerTooltipConfig:{enterable:!0},footerTooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},columnConfig:{autoOptions:{isCalcHeader:!0,isCalcBody:!0,isCalcFooter:!0},maxFixedSize:4},cellConfig:{padding:!0},headerCellConfig:{height:"unset"},footerCellConfig:{height:"unset"},customConfig:{allowVisible:!0,allowResizable:!0,allowFixed:!0,allowSort:!0,showFooter:!0,placement:"top-right",storeOptions:{visible:!0,resizable:!0,sort:!0,fixed:!0},modalOptions:{showMaximize:!0,mask:!0,lockView:!0,resize:!0,escClosable:!0},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!0}},sortConfig:{showIcon:!0,allowClear:!0,allowBtn:!0,iconLayout:"vertical"},filterConfig:{multiple:!0,showIcon:!0},aggregateConfig:{padding:!0,rowField:"id",parentField:"_X_ROW_PARENT_KEY",childrenField:"_X_ROW_CHILDREN",mapChildrenField:"_X_ROW_CHILD_LIST",indent:20,showIcon:!0,maxGroupSize:4,showAggFuncTitle:!0},treeConfig:{padding:!0,rowField:"id",parentField:"parentId",childrenField:"children",hasChildField:"hasChild",mapChildrenField:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0,mode:"fixed"},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:{isAll:!0,isEsc:!0},areaConfig:{autoClear:!0,selectCellByHeader:!0,selectCellByBody:!0,extendDirection:{top:!0,left:!0,bottom:!0,right:!0}},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},virtualXConfig:{gt:24,preSize:1,oSize:0},virtualYConfig:{gt:100,preSize:1,oSize:0},scrollbarConfig:{x:{visible:!0},y:{visible:!0}}},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}}},toolbar:{},gantt:{}}),"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_CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",TABLE_RADIO_CHECKED:iconPrefix+"radio-checked-fill",TABLE_RADIO_UNCHECKED:iconPrefix+"radio-unchecked",TABLE_RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",TABLE_CUSTOM_SORT:iconPrefix+"drag-handle",TABLE_MENU_OPTIONS:iconPrefix+"arrow-right",TABLE_DRAG_ROW:iconPrefix+"drag-handle",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_AGG_GROUP:iconPrefix+"grouping",TABLE_DRAG_STATUS_AGG_VALUES:iconPrefix+"values",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",TABLE_ROW_GROUP_OPEN:iconPrefix+"arrow-right rotate90",TABLE_ROW_GROUP_CLOSE:iconPrefix+"arrow-right",TABLE_AGGREGATE_GROUPING:iconPrefix+"grouping",TABLE_AGGREGATE_VALUES:iconPrefix+"values",TABLE_AGGREGATE_SORT:iconPrefix+"drag-handle",TABLE_AGGREGATE_DELETE:iconPrefix+"close",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.16.
|
|
11
|
+
const version = `table v${"4.16.11"}`;
|
|
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
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let log=_core.VxeUI.log,version="table v4.16.11",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.16.
|
|
3
|
+
"version": "4.16.11",
|
|
4
4
|
"description": "A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -183,12 +183,12 @@ function renderTitleContent (params: VxeTableDefines.CellRenderHeaderParams & {
|
|
|
183
183
|
const { $table, column } = params
|
|
184
184
|
const tableProps = $table.props
|
|
185
185
|
const tableReactData = $table.reactData
|
|
186
|
-
const {
|
|
186
|
+
const { computeHeaderTooltipOpts } = $table.getComputeMaps()
|
|
187
187
|
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps
|
|
188
188
|
const { isRowGroupStatus } = tableReactData
|
|
189
189
|
const { showHeaderOverflow } = column
|
|
190
|
-
const
|
|
191
|
-
const showAllTip =
|
|
190
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value
|
|
191
|
+
const showAllTip = headerTooltipOpts.showAll
|
|
192
192
|
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow
|
|
193
193
|
const showTitle = headOverflow === 'title'
|
|
194
194
|
const showTooltip = headOverflow === true || headOverflow === 'tooltip'
|
|
@@ -810,7 +810,9 @@ export const Cell = {
|
|
|
810
810
|
const { treeConfig } = tableProps
|
|
811
811
|
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData
|
|
812
812
|
const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData
|
|
813
|
-
const { computeCheckboxOpts } = $table.getComputeMaps()
|
|
813
|
+
const { computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps()
|
|
814
|
+
const aggregateOpts = computeAggregateOpts.value
|
|
815
|
+
const { mapChildrenField } = aggregateOpts
|
|
814
816
|
const checkboxOpts = computeCheckboxOpts.value
|
|
815
817
|
const { labelField, checkMethod, visibleMethod } = checkboxOpts
|
|
816
818
|
const { slots } = column
|
|
@@ -818,23 +820,29 @@ export const Cell = {
|
|
|
818
820
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
819
821
|
let indeterminate = false
|
|
820
822
|
let isChecked = false
|
|
821
|
-
|
|
822
|
-
let isDisabled =
|
|
823
|
+
let isVisible = true
|
|
824
|
+
let isDisabled = false
|
|
823
825
|
const ons: Record<string, any> = {}
|
|
824
826
|
if (!isHidden) {
|
|
825
827
|
const rowid = getRowid($table, row)
|
|
826
828
|
isChecked = !!updateCheckboxFlag && !!selectCheckboxMaps[rowid]
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
829
|
+
if (checkMethod && isRowGroupStatus && $table.isAggregateRecord(row)) {
|
|
830
|
+
const childList: any[] = row[mapChildrenField || '']
|
|
831
|
+
if (!childList || !childList.length || childList.every(item => !checkMethod({ $table, row: item }))) {
|
|
832
|
+
isDisabled = true
|
|
830
833
|
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
isDisabled = !checkMethod({ $table, row })
|
|
834
|
+
} else {
|
|
835
|
+
isVisible = !visibleMethod || visibleMethod({ $table, row })
|
|
836
|
+
isDisabled = checkMethod ? !checkMethod({ $table, row }) : !!checkMethod
|
|
834
837
|
}
|
|
835
838
|
if (treeConfig || isRowGroupStatus) {
|
|
836
839
|
indeterminate = !!treeIndeterminateRowMaps[rowid]
|
|
837
840
|
}
|
|
841
|
+
ons.onClick = (evnt: MouseEvent) => {
|
|
842
|
+
if (!isDisabled && isVisible) {
|
|
843
|
+
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
844
|
+
}
|
|
845
|
+
}
|
|
838
846
|
}
|
|
839
847
|
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate }
|
|
840
848
|
if (checkboxSlot) {
|
|
@@ -878,34 +886,42 @@ export const Cell = {
|
|
|
878
886
|
const { treeConfig } = tableProps
|
|
879
887
|
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData
|
|
880
888
|
const { treeIndeterminateRowMaps } = tableInternalData
|
|
881
|
-
const { computeCheckboxOpts } = $table.getComputeMaps()
|
|
889
|
+
const { computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps()
|
|
890
|
+
const aggregateOpts = computeAggregateOpts.value
|
|
891
|
+
const { mapChildrenField } = aggregateOpts
|
|
882
892
|
const checkboxOpts = computeCheckboxOpts.value
|
|
883
893
|
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts
|
|
884
894
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField
|
|
885
895
|
const { slots } = column
|
|
886
896
|
const defaultSlot = slots ? slots.default : null
|
|
887
897
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
888
|
-
let
|
|
898
|
+
let indeterminate = false
|
|
889
899
|
let isChecked = false
|
|
890
|
-
|
|
891
|
-
let isDisabled =
|
|
900
|
+
let isVisible = true
|
|
901
|
+
let isDisabled = false
|
|
892
902
|
const ons: Record<string, any> = {}
|
|
893
903
|
if (!isHidden) {
|
|
894
904
|
const rowid = getRowid($table, row)
|
|
895
905
|
isChecked = !!updateCheckboxFlag && XEUtils.get(row, checkField)
|
|
906
|
+
if (checkMethod && isRowGroupStatus && $table.isAggregateRecord(row)) {
|
|
907
|
+
const childList: any[] = row[mapChildrenField || '']
|
|
908
|
+
if (!childList || !childList.length || childList.every(item => !checkMethod({ $table, row: item }))) {
|
|
909
|
+
isDisabled = true
|
|
910
|
+
}
|
|
911
|
+
} else {
|
|
912
|
+
isVisible = !visibleMethod || visibleMethod({ $table, row })
|
|
913
|
+
isDisabled = checkMethod ? !checkMethod({ $table, row }) : !!checkMethod
|
|
914
|
+
}
|
|
915
|
+
if (treeConfig || isRowGroupStatus) {
|
|
916
|
+
indeterminate = !!treeIndeterminateRowMaps[rowid]
|
|
917
|
+
}
|
|
896
918
|
ons.onClick = (evnt: MouseEvent) => {
|
|
897
919
|
if (!isDisabled && isVisible) {
|
|
898
920
|
$table.triggerCheckRowEvent(evnt, params, !isChecked)
|
|
899
921
|
}
|
|
900
922
|
}
|
|
901
|
-
if (checkMethod) {
|
|
902
|
-
isDisabled = !checkMethod({ $table, row })
|
|
903
|
-
}
|
|
904
|
-
if (treeConfig || isRowGroupStatus) {
|
|
905
|
-
isIndeterminate = !!treeIndeterminateRowMaps[rowid]
|
|
906
|
-
}
|
|
907
923
|
}
|
|
908
|
-
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate
|
|
924
|
+
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate }
|
|
909
925
|
if (checkboxSlot) {
|
|
910
926
|
return renderCellBaseVNs(params, $table.callSlot(checkboxSlot, checkboxParams))
|
|
911
927
|
}
|
|
@@ -913,7 +929,7 @@ export const Cell = {
|
|
|
913
929
|
if (isVisible) {
|
|
914
930
|
checkVNs.push(
|
|
915
931
|
h('span', {
|
|
916
|
-
class: ['vxe-checkbox--icon',
|
|
932
|
+
class: ['vxe-checkbox--icon', indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : (isDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED))]
|
|
917
933
|
})
|
|
918
934
|
)
|
|
919
935
|
if (defaultSlot || labelField) {
|
|
@@ -929,7 +945,7 @@ export const Cell = {
|
|
|
929
945
|
class: ['vxe-cell--checkbox', {
|
|
930
946
|
'is--checked': isChecked,
|
|
931
947
|
'is--disabled': isDisabled,
|
|
932
|
-
'is--indeterminate': indeterminateField && !isChecked ? row[indeterminateField] :
|
|
948
|
+
'is--indeterminate': indeterminateField && !isChecked ? row[indeterminateField] : indeterminate,
|
|
933
949
|
'is--hidden': !isVisible
|
|
934
950
|
}],
|
|
935
951
|
...ons
|
|
@@ -35,7 +35,7 @@ export default defineVxeComponent({
|
|
|
35
35
|
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
36
36
|
|
|
37
37
|
const { xID, props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
38
|
-
const {
|
|
38
|
+
const { computeFooterTooltipOpts, computeColumnOpts, computeCellOpts, computeFooterCellOpts, computeDefaultRowHeight, computeResizableOpts, computeVirtualXOpts } = $xeTable.getComputeMaps()
|
|
39
39
|
|
|
40
40
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
41
41
|
const refFooterScroll = ref() as Ref<HTMLDivElement>
|
|
@@ -53,7 +53,7 @@ export default defineVxeComponent({
|
|
|
53
53
|
const { scrollXLoad, scrollYLoad, overflowX, currentColumn, mergeFootFlag } = tableReactData
|
|
54
54
|
const { fullColumnIdData, mergeFooterList, mergeFooterCellMaps, scrollXStore } = tableInternalData
|
|
55
55
|
const virtualXOpts = computeVirtualXOpts.value
|
|
56
|
-
const
|
|
56
|
+
const footerTooltipOpts = computeFooterTooltipOpts.value
|
|
57
57
|
const resizableOpts = computeResizableOpts.value
|
|
58
58
|
const { isAllColumnDrag } = resizableOpts
|
|
59
59
|
const columnOpts = computeColumnOpts.value
|
|
@@ -68,7 +68,7 @@ export default defineVxeComponent({
|
|
|
68
68
|
const colRest = fullColumnIdData[colid] || {}
|
|
69
69
|
const renderOpts = editRender || cellRender
|
|
70
70
|
const compConf = renderOpts ? renderer.get(renderOpts.name) : null
|
|
71
|
-
const showAllTip =
|
|
71
|
+
const showAllTip = footerTooltipOpts.showAll
|
|
72
72
|
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed)
|
|
73
73
|
const isPadding = XEUtils.isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding
|
|
74
74
|
const footOverflow = XEUtils.eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow
|
|
@@ -247,6 +247,10 @@ export const tableProps = {
|
|
|
247
247
|
checkboxConfig: Object as PropType<VxeTablePropTypes.CheckboxConfig>,
|
|
248
248
|
// tooltip 配置项
|
|
249
249
|
tooltipConfig: Object as PropType<VxeTablePropTypes.TooltipConfig>,
|
|
250
|
+
// 表头 tooltip 配置项
|
|
251
|
+
headerTooltipConfig: Object as PropType<VxeTablePropTypes.HeaderTooltipConfig>,
|
|
252
|
+
// 表尾 tooltip 配置项
|
|
253
|
+
footerTooltipConfig: Object as PropType<VxeTablePropTypes.FooterTooltipConfig>,
|
|
250
254
|
// 导出配置项
|
|
251
255
|
exportConfig: Object as PropType<VxeTablePropTypes.ExportConfig>,
|
|
252
256
|
// 导入配置项
|
|
@@ -581,6 +581,14 @@ export default defineVxeComponent({
|
|
|
581
581
|
return Object.assign({}, getConfig().tooltip, getConfig().table.tooltipConfig, props.tooltipConfig)
|
|
582
582
|
})
|
|
583
583
|
|
|
584
|
+
const computeHeaderTooltipOpts = computed(() => {
|
|
585
|
+
return Object.assign({}, getConfig().tooltip, getConfig().table.headerTooltipConfig, props.headerTooltipConfig)
|
|
586
|
+
})
|
|
587
|
+
|
|
588
|
+
const computeFooterTooltipOpts = computed(() => {
|
|
589
|
+
return Object.assign({}, getConfig().tooltip, getConfig().table.footerTooltipConfig, props.footerTooltipConfig)
|
|
590
|
+
})
|
|
591
|
+
|
|
584
592
|
const computeTableTipConfig = computed(() => {
|
|
585
593
|
const { tooltipStore } = reactData
|
|
586
594
|
const tooltipOpts = computeTooltipOpts.value
|
|
@@ -896,6 +904,8 @@ export default defineVxeComponent({
|
|
|
896
904
|
computeRadioOpts,
|
|
897
905
|
computeCheckboxOpts,
|
|
898
906
|
computeTooltipOpts,
|
|
907
|
+
computeHeaderTooltipOpts,
|
|
908
|
+
computeFooterTooltipOpts,
|
|
899
909
|
computeEditOpts,
|
|
900
910
|
computeSortOpts,
|
|
901
911
|
computeFilterOpts,
|
|
@@ -8228,16 +8238,15 @@ export default defineVxeComponent({
|
|
|
8228
8238
|
* @param {Event} evnt 事件
|
|
8229
8239
|
* @param {Row} row 行对象
|
|
8230
8240
|
*/
|
|
8231
|
-
const handleTooltip = (evnt: MouseEvent, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) => {
|
|
8241
|
+
const handleTooltip = (evnt: MouseEvent, tipOpts: VxeTablePropTypes.TooltipConfig | VxeTablePropTypes.HeaderTooltipConfig | VxeTablePropTypes.FooterTooltipConfig, type: 'header' | 'body' | 'footer', tdEl: HTMLTableCellElement, overflowElem: HTMLElement | null, tipElem: HTMLElement | null, params: any) => {
|
|
8232
8242
|
const tipOverEl = overflowElem || tdEl
|
|
8233
8243
|
if (!tipOverEl) {
|
|
8234
8244
|
return nextTick()
|
|
8235
8245
|
}
|
|
8236
8246
|
params.cell = tdEl
|
|
8237
8247
|
const { tooltipStore } = reactData
|
|
8238
|
-
const tooltipOpts = computeTooltipOpts.value
|
|
8239
8248
|
const { column, row } = params
|
|
8240
|
-
const { showAll, contentMethod } =
|
|
8249
|
+
const { showAll, contentMethod } = tipOpts
|
|
8241
8250
|
const customContent = contentMethod ? contentMethod(params) : null
|
|
8242
8251
|
const useCustom = contentMethod && !XEUtils.eqNull(customContent)
|
|
8243
8252
|
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim()
|
|
@@ -8250,7 +8259,7 @@ export default defineVxeComponent({
|
|
|
8250
8259
|
visible: true,
|
|
8251
8260
|
content: tipContent,
|
|
8252
8261
|
type,
|
|
8253
|
-
currOpts:
|
|
8262
|
+
currOpts: tipOpts
|
|
8254
8263
|
})
|
|
8255
8264
|
nextTick(() => {
|
|
8256
8265
|
const $tooltip = refTooltip.value
|
|
@@ -9152,6 +9161,8 @@ export default defineVxeComponent({
|
|
|
9152
9161
|
const { treeConfig } = props
|
|
9153
9162
|
const { isRowGroupStatus } = reactData
|
|
9154
9163
|
const { afterFullData, afterTreeFullData, afterGroupFullData, checkboxReserveRowMap, selectCheckboxMaps, treeIndeterminateRowMaps } = internalData
|
|
9164
|
+
const aggregateOpts = computeAggregateOpts.value
|
|
9165
|
+
const { mapChildrenField } = aggregateOpts
|
|
9155
9166
|
const checkboxOpts = computeCheckboxOpts.value
|
|
9156
9167
|
const { checkField, checkMethod, showReserveStatus } = checkboxOpts
|
|
9157
9168
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
@@ -9167,7 +9178,18 @@ export default defineVxeComponent({
|
|
|
9167
9178
|
? row => {
|
|
9168
9179
|
const childRowid = handleGetRowId(row)
|
|
9169
9180
|
const selected = checkField ? XEUtils.get(row, checkField) : selectCheckboxMaps[childRowid]
|
|
9170
|
-
if (
|
|
9181
|
+
if (isRowGroupStatus && $xeTable.isAggregateRecord(row)) {
|
|
9182
|
+
const childList: any[] = row[mapChildrenField || '']
|
|
9183
|
+
if (selected) {
|
|
9184
|
+
vLen++
|
|
9185
|
+
sLen++
|
|
9186
|
+
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
9187
|
+
vLen++
|
|
9188
|
+
hLen++
|
|
9189
|
+
} else if (childList && childList.length && childList.some(item => checkMethod({ $table: $xeTable, row: item }))) {
|
|
9190
|
+
vLen++
|
|
9191
|
+
}
|
|
9192
|
+
} else if (checkMethod({ $table: $xeTable, row })) {
|
|
9171
9193
|
if (selected) {
|
|
9172
9194
|
sLen++
|
|
9173
9195
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -9361,6 +9383,7 @@ export default defineVxeComponent({
|
|
|
9361
9383
|
*/
|
|
9362
9384
|
triggerHeaderTooltipEvent (evnt, params) {
|
|
9363
9385
|
const { tooltipStore } = reactData
|
|
9386
|
+
const headerTooltipOpts = computeHeaderTooltipOpts.value
|
|
9364
9387
|
const { column } = params
|
|
9365
9388
|
handleTargetEnterEvent(true)
|
|
9366
9389
|
const titleElem = evnt.currentTarget as HTMLDivElement
|
|
@@ -9381,7 +9404,7 @@ export default defineVxeComponent({
|
|
|
9381
9404
|
}
|
|
9382
9405
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
9383
9406
|
const ctEl = thEl.querySelector<HTMLElement>('.vxe-cell--title')
|
|
9384
|
-
handleTooltip(evnt, 'header', thEl, (hasClass(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params)
|
|
9407
|
+
handleTooltip(evnt, headerTooltipOpts, 'header', thEl, (hasClass(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params)
|
|
9385
9408
|
}
|
|
9386
9409
|
},
|
|
9387
9410
|
/**
|
|
@@ -9391,6 +9414,7 @@ export default defineVxeComponent({
|
|
|
9391
9414
|
const { editConfig } = props
|
|
9392
9415
|
const { editStore } = reactData
|
|
9393
9416
|
const { tooltipStore } = reactData
|
|
9417
|
+
const tooltipOpts = computeTooltipOpts.value
|
|
9394
9418
|
const editOpts = computeEditOpts.value
|
|
9395
9419
|
const { actived } = editStore
|
|
9396
9420
|
const { row, column } = params
|
|
@@ -9417,7 +9441,7 @@ export default defineVxeComponent({
|
|
|
9417
9441
|
if (!tipEl) {
|
|
9418
9442
|
tipEl = ctEl
|
|
9419
9443
|
}
|
|
9420
|
-
handleTooltip(evnt, 'body', tdEl, ovEl || ctEl, tipEl, params)
|
|
9444
|
+
handleTooltip(evnt, tooltipOpts, 'body', tdEl, ovEl || ctEl, tipEl, params)
|
|
9421
9445
|
}
|
|
9422
9446
|
},
|
|
9423
9447
|
/**
|
|
@@ -9426,6 +9450,7 @@ export default defineVxeComponent({
|
|
|
9426
9450
|
triggerFooterTooltipEvent (evnt, params) {
|
|
9427
9451
|
const { column } = params
|
|
9428
9452
|
const { tooltipStore } = reactData
|
|
9453
|
+
const footerTooltipOpts = computeFooterTooltipOpts.value
|
|
9429
9454
|
const tdEl = evnt.currentTarget as HTMLTableCellElement
|
|
9430
9455
|
handleTargetEnterEvent(tooltipStore.column !== column || !!tooltipStore.row)
|
|
9431
9456
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
@@ -9438,7 +9463,7 @@ export default defineVxeComponent({
|
|
|
9438
9463
|
if (!tipEl) {
|
|
9439
9464
|
tipEl = ctEl
|
|
9440
9465
|
}
|
|
9441
|
-
handleTooltip(evnt, 'footer', tdEl, ovEl || ctEl, tipEl, params)
|
|
9466
|
+
handleTooltip(evnt, footerTooltipOpts, 'footer', tdEl, ovEl || ctEl, tipEl, params)
|
|
9442
9467
|
}
|
|
9443
9468
|
},
|
|
9444
9469
|
handleTargetLeaveEvent () {
|
|
@@ -9671,7 +9696,7 @@ export default defineVxeComponent({
|
|
|
9671
9696
|
}
|
|
9672
9697
|
}
|
|
9673
9698
|
}
|
|
9674
|
-
if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
9699
|
+
if (isRowGroupStatus || !checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
9675
9700
|
$xeTable.handleBatchSelectRows([row], checked)
|
|
9676
9701
|
$xeTable.checkSelectionStatus()
|
|
9677
9702
|
dispatchEvent('checkbox-change', Object.assign({
|
package/packages/ui/index.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|