vxe-table 3.19.1 → 3.19.3
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/README.md +2 -25
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +1 -4
- package/es/table/module/custom/panel.js +3 -0
- package/es/table/module/menu/mixin.js +4 -1
- package/es/table/src/cell.js +4 -4
- package/es/table/src/methods.js +34 -19
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +51 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +1 -4
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +3 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/menu/mixin.js +4 -1
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/cell.js +5 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +36 -19
- package/lib/table/src/methods.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/custom/mixin.ts +1 -4
- package/packages/table/module/custom/panel.ts +3 -0
- package/packages/table/module/menu/mixin.ts +4 -1
- package/packages/table/src/cell.ts +4 -4
- package/packages/table/src/methods.ts +36 -19
- /package/es/{iconfont.1761181583983.ttf → iconfont.1761545705692.ttf} +0 -0
- /package/es/{iconfont.1761181583983.woff → iconfont.1761545705692.woff} +0 -0
- /package/es/{iconfont.1761181583983.woff2 → iconfont.1761545705692.woff2} +0 -0
- /package/lib/{iconfont.1761181583983.ttf → iconfont.1761545705692.ttf} +0 -0
- /package/lib/{iconfont.1761181583983.woff → iconfont.1761545705692.woff} +0 -0
- /package/lib/{iconfont.1761181583983.woff2 → iconfont.1761545705692.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.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 = "3.19.
|
|
16
|
+
const version = exports.version = "3.19.3";
|
|
17
17
|
_core.VxeUI.version = version;
|
|
18
18
|
_core.VxeUI.tableVersion = version;
|
|
19
19
|
_core.VxeUI.setConfig({
|
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.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="3.19.
|
|
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.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="3.19.3",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:{},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"},menuConfig:{destroyOnClose:!0},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:{destroyOnClose:!0,multiple:!0,showIcon:!0},floatingFilterConfig:{},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:0,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,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,i){return _core.VxeUI.modal.alert(e,o,i)},confirm(e,o,i){return _core.VxeUI.modal.confirm(e,o,i)},message(e,o){return _core.VxeUI.modal.message(e,o)},notification(e,o,i){return _core.VxeUI.modal.notification(e,o,i)}});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${"3.19.
|
|
11
|
+
const version = `table v${"3.19.3"}`;
|
|
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 v3.19.
|
|
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 v3.19.3",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": "3.19.
|
|
3
|
+
"version": "3.19.3",
|
|
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",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"vue-i18n": "^8.15.1",
|
|
69
69
|
"vue-router": "^3.5.1",
|
|
70
70
|
"vue-template-compiler": "2.6.14",
|
|
71
|
-
"vxe-gantt": "~3.0.
|
|
71
|
+
"vxe-gantt": "~3.0.20"
|
|
72
72
|
},
|
|
73
73
|
"vetur": {
|
|
74
74
|
"tags": "helper/vetur/tags.json",
|
|
@@ -279,11 +279,8 @@ export default {
|
|
|
279
279
|
},
|
|
280
280
|
emitCustomEvent (type: any, evnt: any) {
|
|
281
281
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
282
|
-
const $xeGrid = $xeTable.$xeGrid
|
|
283
|
-
const $xeGantt = $xeTable.$xeGantt
|
|
284
282
|
|
|
285
|
-
|
|
286
|
-
comp.dispatchEvent('custom', { type }, evnt)
|
|
283
|
+
$xeTable.dispatchEvent('custom', { type }, evnt)
|
|
287
284
|
},
|
|
288
285
|
triggerCustomEvent (evnt: any) {
|
|
289
286
|
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
@@ -990,6 +990,7 @@ export default {
|
|
|
990
990
|
$xeTable.saveCustom()
|
|
991
991
|
$xeTable.closeCustom()
|
|
992
992
|
$xeTable.emitCustomEvent('confirm', $event)
|
|
993
|
+
$xeTable.emitCustomEvent('close', $event)
|
|
993
994
|
},
|
|
994
995
|
cancelCloseEvent ({ $event }: VxeButtonDefines.ClickEventParams) {
|
|
995
996
|
const $xeTableCustomPanel = this as unknown as VxeTableCustomPanelConstructor
|
|
@@ -1005,6 +1006,7 @@ export default {
|
|
|
1005
1006
|
$xeTable.cancelCustom()
|
|
1006
1007
|
$xeTable.closeCustom()
|
|
1007
1008
|
$xeTable.emitCustomEvent('cancel', $event)
|
|
1009
|
+
$xeTable.emitCustomEvent('close', $event)
|
|
1008
1010
|
},
|
|
1009
1011
|
handleResetCustomEvent (evnt: Event) {
|
|
1010
1012
|
const $xeTableCustomPanel = this as unknown as VxeTableCustomPanelConstructor
|
|
@@ -1013,6 +1015,7 @@ export default {
|
|
|
1013
1015
|
$xeTable.resetCustom(true)
|
|
1014
1016
|
$xeTable.closeCustom()
|
|
1015
1017
|
$xeTable.emitCustomEvent('reset', evnt)
|
|
1018
|
+
$xeTable.emitCustomEvent('close', evnt)
|
|
1016
1019
|
},
|
|
1017
1020
|
resetCustomEvent (evnt: Event) {
|
|
1018
1021
|
if (VxeUI.modal) {
|
|
@@ -163,6 +163,9 @@ export default {
|
|
|
163
163
|
*/
|
|
164
164
|
handleOpenMenuEvent (evnt: any, type: 'header' | 'body' | 'footer', params: any) {
|
|
165
165
|
const $xeTable = this as unknown as VxeTableConstructor & VxeTablePrivateMethods
|
|
166
|
+
const $xeGrid = $xeTable.$xeGrid
|
|
167
|
+
const $xeGantt = $xeTable.$xeGantt
|
|
168
|
+
const $xeGGWrapper = $xeGrid || $xeGantt
|
|
166
169
|
const reactData = $xeTable as unknown as TableReactData
|
|
167
170
|
const internalData = $xeTable as unknown as TableInternalData
|
|
168
171
|
|
|
@@ -181,7 +184,7 @@ export default {
|
|
|
181
184
|
if (!visibleMethod || visibleMethod(params)) {
|
|
182
185
|
evnt.preventDefault()
|
|
183
186
|
$xeTable.updateZindex()
|
|
184
|
-
const el = $xeTable.$refs.refElem as HTMLDivElement
|
|
187
|
+
const el = $xeGGWrapper ? $xeGGWrapper.$refs.refElem as HTMLDivElement : $xeTable.$refs.refElem as HTMLDivElement
|
|
185
188
|
const tableRect = el.getBoundingClientRect()
|
|
186
189
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
|
|
187
190
|
|
|
@@ -390,9 +390,8 @@ export const Cell = {
|
|
|
390
390
|
const tableInternalData = $table as unknown as TableInternalData
|
|
391
391
|
const { isRowGroupStatus } = tableReactData
|
|
392
392
|
const { editConfig } = tableProps
|
|
393
|
-
const
|
|
394
|
-
const
|
|
395
|
-
const renderOpts = editConfig && isEnableConf(editOpts) && editRender ? editRender : cellRender
|
|
393
|
+
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc, formatter } = column
|
|
394
|
+
const renderOpts = editConfig && isEnableConf(editRender) ? editRender : (isEnableConf(cellRender) ? cellRender : null)
|
|
396
395
|
const defaultSlot = slots ? slots.default : null
|
|
397
396
|
const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null
|
|
398
397
|
let cellValue: string | number | null = ''
|
|
@@ -451,7 +450,8 @@ export const Cell = {
|
|
|
451
450
|
if (defaultSlot) {
|
|
452
451
|
return renderCellBaseVNs(h, params, $table.callSlot(defaultSlot, params, h))
|
|
453
452
|
}
|
|
454
|
-
|
|
453
|
+
// formatter > (renderTableCell | renderTableDefault)
|
|
454
|
+
if (renderOpts && !formatter) {
|
|
455
455
|
const compConf = renderer.get(renderOpts.name)
|
|
456
456
|
const rtDefault = compConf ? (compConf.renderTableDefault || compConf.renderDefault) : null
|
|
457
457
|
const rtCell = compConf ? (compConf.renderTableCell || compConf.renderCell) : null
|
|
@@ -147,7 +147,7 @@ function handleCustomRestore ($xeTable: VxeTableConstructor & VxeTablePrivateMet
|
|
|
147
147
|
const customOpts = $xeTable.computeCustomOpts
|
|
148
148
|
const { storage, storeOptions } = customOpts
|
|
149
149
|
const isAllCustom = storage === true
|
|
150
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} :
|
|
150
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions)
|
|
151
151
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
152
152
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
153
153
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
@@ -246,7 +246,7 @@ function restoreCustomStorage ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
246
246
|
const customOpts = $xeTable.computeCustomOpts
|
|
247
247
|
const { storage, restoreStore, storeOptions } = customOpts
|
|
248
248
|
const isAllCustom = storage === true
|
|
249
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} :
|
|
249
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions)
|
|
250
250
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
251
251
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
252
252
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
@@ -509,6 +509,7 @@ function handleBaseTreeExpand ($xeTable: VxeTableConstructor & VxeTablePrivateMe
|
|
|
509
509
|
}
|
|
510
510
|
reactData.treeExpandedFlag++
|
|
511
511
|
return Promise.all(result).then(() => {
|
|
512
|
+
updateTreeLineStyle($xeTable)
|
|
512
513
|
return $xeTable.recalculate()
|
|
513
514
|
})
|
|
514
515
|
}
|
|
@@ -3029,6 +3030,9 @@ function handleRecalculateStyle ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
3029
3030
|
calcScrollbar($xeTable)
|
|
3030
3031
|
updateStyle($xeTable)
|
|
3031
3032
|
updateRowExpandStyle($xeTable)
|
|
3033
|
+
if (reFull) {
|
|
3034
|
+
updateTreeLineStyle($xeTable)
|
|
3035
|
+
}
|
|
3032
3036
|
return computeScrollLoad($xeTable).then(() => {
|
|
3033
3037
|
// 初始化时需要在列计算之后再执行优化运算,达到最优显示效果
|
|
3034
3038
|
if (reWidth) {
|
|
@@ -3046,6 +3050,9 @@ function handleRecalculateStyle ($xeTable: VxeTableConstructor & VxeTablePrivate
|
|
|
3046
3050
|
updateRowOffsetTop($xeTable)
|
|
3047
3051
|
}
|
|
3048
3052
|
updateRowExpandStyle($xeTable)
|
|
3053
|
+
if (reFull) {
|
|
3054
|
+
updateTreeLineStyle($xeTable)
|
|
3055
|
+
}
|
|
3049
3056
|
if (reFull) {
|
|
3050
3057
|
return computeScrollLoad($xeTable)
|
|
3051
3058
|
}
|
|
@@ -5631,7 +5638,7 @@ const Methods = {
|
|
|
5631
5638
|
const customOpts = $xeTable.computeCustomOpts
|
|
5632
5639
|
const { storage, restoreStore, storeOptions } = customOpts
|
|
5633
5640
|
const isAllCustom = storage === true
|
|
5634
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} :
|
|
5641
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions)
|
|
5635
5642
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
5636
5643
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
5637
5644
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
@@ -5669,7 +5676,7 @@ const Methods = {
|
|
|
5669
5676
|
const { fullColumnFieldData, collectColumn } = internalData
|
|
5670
5677
|
const { storage, checkMethod, storeOptions } = customOpts
|
|
5671
5678
|
const isAllCustom = storage === true
|
|
5672
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} :
|
|
5679
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions)
|
|
5673
5680
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
5674
5681
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
5675
5682
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
@@ -5789,7 +5796,7 @@ const Methods = {
|
|
|
5789
5796
|
const customOpts = $xeTable.computeCustomOpts
|
|
5790
5797
|
const { updateStore, storage, storeOptions } = customOpts
|
|
5791
5798
|
const isAllCustom = storage === true
|
|
5792
|
-
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = isAllCustom ? {} :
|
|
5799
|
+
const storageOpts: VxeTableDefines.VxeTableCustomStorageObj = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions)
|
|
5793
5800
|
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom)
|
|
5794
5801
|
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom)
|
|
5795
5802
|
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom)
|
|
@@ -6563,7 +6570,7 @@ const Methods = {
|
|
|
6563
6570
|
// 如果点击筛选容器
|
|
6564
6571
|
} else {
|
|
6565
6572
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6566
|
-
|
|
6573
|
+
$xeTable.preventEvent(evnt, 'event.clearFilter', internalData._currFilterParams, $xeTable.closeFilter)
|
|
6567
6574
|
}
|
|
6568
6575
|
}
|
|
6569
6576
|
}
|
|
@@ -6575,7 +6582,12 @@ const Methods = {
|
|
|
6575
6582
|
// 如果点击自定义列容器
|
|
6576
6583
|
} else {
|
|
6577
6584
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6578
|
-
|
|
6585
|
+
if (customStore.visible && $xeTable.closeCustom) {
|
|
6586
|
+
$xeTable.preventEvent(evnt, 'event.clearCustom', {}, () => {
|
|
6587
|
+
$xeTable.closeCustom()
|
|
6588
|
+
$xeTable.dispatchEvent('custom', { type: 'close' }, evnt)
|
|
6589
|
+
})
|
|
6590
|
+
}
|
|
6579
6591
|
}
|
|
6580
6592
|
}
|
|
6581
6593
|
}
|
|
@@ -6588,10 +6600,10 @@ const Methods = {
|
|
|
6588
6600
|
if ((!cell || !getEventTargetNode(evnt, cell).flag)) {
|
|
6589
6601
|
if (validTooltip && getEventTargetNode(evnt, validTooltip.$el).flag) {
|
|
6590
6602
|
// 如果是激活状态,且点击了校验提示框
|
|
6591
|
-
} else if (!
|
|
6603
|
+
} else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
|
|
6592
6604
|
if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag) {
|
|
6593
6605
|
// 如果手动调用了激活单元格,避免触发源被移除后导致重复关闭
|
|
6594
|
-
|
|
6606
|
+
$xeTable.preventEvent(evnt, 'event.clearEdit', actived.args, () => {
|
|
6595
6607
|
let isClear
|
|
6596
6608
|
if (editOpts.mode === 'row') {
|
|
6597
6609
|
const rowTargetNode = getEventTargetNode(evnt, el, 'vxe-body--row')
|
|
@@ -6611,7 +6623,7 @@ const Methods = {
|
|
|
6611
6623
|
isClear = getEventTargetNode(evnt, el, 'vxe-footer--row').flag
|
|
6612
6624
|
}
|
|
6613
6625
|
// 如果固定了高度且点击了行之外的空白处,则清除激活状态
|
|
6614
|
-
if (!isClear &&
|
|
6626
|
+
if (!isClear && props.height && !reactData.overflowY) {
|
|
6615
6627
|
const bodyWrapperElem = evnt.target
|
|
6616
6628
|
if (hasClass(bodyWrapperElem, 'vxe-table--body-wrapper')) {
|
|
6617
6629
|
isClear = evnt.offsetY < bodyWrapperElem.clientHeight
|
|
@@ -6625,8 +6637,8 @@ const Methods = {
|
|
|
6625
6637
|
setTimeout(() => {
|
|
6626
6638
|
$xeTable.handleClearEdit(evnt).then(() => {
|
|
6627
6639
|
// 如果存在校验,点击了表格之外则清除
|
|
6628
|
-
if (!
|
|
6629
|
-
|
|
6640
|
+
if (!internalData.isActivated && editRules && validOpts.autoClear) {
|
|
6641
|
+
reactData.validErrorMaps = {}
|
|
6630
6642
|
}
|
|
6631
6643
|
})
|
|
6632
6644
|
})
|
|
@@ -6657,29 +6669,33 @@ const Methods = {
|
|
|
6657
6669
|
}
|
|
6658
6670
|
// 如果配置了快捷菜单且,点击了其他地方则关闭
|
|
6659
6671
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
6660
|
-
|
|
6672
|
+
$xeTable.closeMenu()
|
|
6661
6673
|
}
|
|
6662
6674
|
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag
|
|
6663
6675
|
// 如果存在校验,点击了表格之外则清除
|
|
6664
6676
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
6665
|
-
|
|
6677
|
+
reactData.validErrorMaps = {}
|
|
6666
6678
|
}
|
|
6667
6679
|
// 最后激活的表格
|
|
6668
|
-
|
|
6680
|
+
internalData.isActivated = isActivated
|
|
6669
6681
|
},
|
|
6670
6682
|
/**
|
|
6671
6683
|
* 窗口失焦事件处理
|
|
6672
6684
|
*/
|
|
6673
6685
|
handleGlobalBlurEvent () {
|
|
6674
|
-
this
|
|
6675
|
-
|
|
6686
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
6687
|
+
|
|
6688
|
+
$xeTable.closeFilter()
|
|
6689
|
+
$xeTable.closeMenu()
|
|
6676
6690
|
},
|
|
6677
6691
|
/**
|
|
6678
6692
|
* 全局滚动事件
|
|
6679
6693
|
*/
|
|
6680
6694
|
handleGlobalMousewheelEvent () {
|
|
6681
|
-
this
|
|
6682
|
-
|
|
6695
|
+
const $xeTable = this as VxeTableConstructor & VxeTablePrivateMethods
|
|
6696
|
+
|
|
6697
|
+
$xeTable.closeTooltip()
|
|
6698
|
+
$xeTable.closeMenu()
|
|
6683
6699
|
},
|
|
6684
6700
|
/**
|
|
6685
6701
|
* 表格键盘事件
|
|
@@ -10810,6 +10826,7 @@ const Methods = {
|
|
|
10810
10826
|
}
|
|
10811
10827
|
reactData.treeExpandedFlag++
|
|
10812
10828
|
}).then(() => {
|
|
10829
|
+
updateTreeLineStyle($xeTable)
|
|
10813
10830
|
if (expList.length) {
|
|
10814
10831
|
$xeTable.recalculate()
|
|
10815
10832
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|