vxe-table 4.17.8 → 4.17.10
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/column.js +6 -0
- package/es/table/src/columnInfo.js +3 -0
- package/es/table/src/header.js +1 -7
- package/es/table/src/table.js +103 -53
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +27 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/column.js +6 -0
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +3 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/header.js +1 -7
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +15 -13
- 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 +1 -1
- package/packages/table/src/column.ts +8 -0
- package/packages/table/src/columnInfo.ts +5 -0
- package/packages/table/src/header.ts +2 -8
- package/packages/table/src/table.ts +106 -57
- /package/es/{iconfont.1762324094489.ttf → iconfont.1762412493495.ttf} +0 -0
- /package/es/{iconfont.1762324094489.woff → iconfont.1762412493495.woff} +0 -0
- /package/es/{iconfont.1762324094489.woff2 → iconfont.1762412493495.woff2} +0 -0
- /package/lib/{iconfont.1762324094489.ttf → iconfont.1762412493495.ttf} +0 -0
- /package/lib/{iconfont.1762324094489.woff → iconfont.1762412493495.woff} +0 -0
- /package/lib/{iconfont.1762324094489.woff2 → iconfont.1762412493495.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.17.
|
|
16
|
+
const version = exports.version = "4.17.10";
|
|
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.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.17.
|
|
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.17.10",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"},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,showRootLine:!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,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${"4.17.
|
|
11
|
+
const version = `table v${"4.17.10"}`;
|
|
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.17.
|
|
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.17.10",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.17.
|
|
3
|
+
"version": "4.17.10",
|
|
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",
|
|
@@ -129,8 +129,16 @@ export const columnProps = {
|
|
|
129
129
|
editRender: Object as PropType<VxeColumnPropTypes.EditRender>,
|
|
130
130
|
// 内容渲染配置项
|
|
131
131
|
contentRender: Object as PropType<VxeColumnPropTypes.ContentRender>,
|
|
132
|
+
|
|
132
133
|
// 聚合函数
|
|
133
134
|
aggFunc: [String, Boolean] as PropType<VxeColumnPropTypes.AggFunc>,
|
|
135
|
+
// 将单元格复制到剪贴板
|
|
136
|
+
copyMethod: Function as PropType<VxeColumnPropTypes.CopyMethod>,
|
|
137
|
+
// 将剪贴单元格的值清除
|
|
138
|
+
cutMethod: Function as PropType<VxeColumnPropTypes.CutMethod>,
|
|
139
|
+
// 从剪贴板赋值到单元格
|
|
140
|
+
pasteMethod: Function as PropType<VxeColumnPropTypes.PasteMethod>,
|
|
141
|
+
|
|
134
142
|
// 额外的参数
|
|
135
143
|
params: Object as PropType<VxeColumnPropTypes.Params>
|
|
136
144
|
}
|
|
@@ -123,7 +123,12 @@ export class ColumnInfo {
|
|
|
123
123
|
titleHelp: _vm.titleHelp,
|
|
124
124
|
titlePrefix: _vm.titlePrefix,
|
|
125
125
|
titleSuffix: _vm.titleSuffix,
|
|
126
|
+
|
|
126
127
|
aggFunc: _vm.aggFunc,
|
|
128
|
+
copyMethod: _vm.copyMethod,
|
|
129
|
+
cutMethod: _vm.cutMethod,
|
|
130
|
+
pasteMethod: _vm.pasteMethod,
|
|
131
|
+
|
|
127
132
|
// 自定义参数
|
|
128
133
|
params: _vm.params,
|
|
129
134
|
// 渲染属性
|
|
@@ -6,7 +6,7 @@ import { isEnableConf } from '../../ui/src/utils'
|
|
|
6
6
|
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from './util'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
8
|
|
|
9
|
-
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines } from '../../../types'
|
|
9
|
+
import type { VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeTableDefines, VxeGlobalRendererHandles } from '../../../types'
|
|
10
10
|
|
|
11
11
|
const { renderer, renderEmptyElement } = VxeUI
|
|
12
12
|
|
|
@@ -369,13 +369,7 @@ export default defineVxeComponent({
|
|
|
369
369
|
}, flSlot
|
|
370
370
|
? $xeTable.callSlot(flSlot, cellParams)
|
|
371
371
|
: (rtFloatingFilter && firstFilterOption
|
|
372
|
-
? getSlotVNs(rtFloatingFilter(filterRender,
|
|
373
|
-
$table: $xeTable,
|
|
374
|
-
option: firstFilterOption,
|
|
375
|
-
column: column as any,
|
|
376
|
-
columnIndex,
|
|
377
|
-
$columnIndex
|
|
378
|
-
}))
|
|
372
|
+
? getSlotVNs(rtFloatingFilter(filterRender, cellParams as unknown as VxeGlobalRendererHandles.RenderTableFloatingFilterParams))
|
|
379
373
|
: []))
|
|
380
374
|
])
|
|
381
375
|
])
|
|
@@ -1977,8 +1977,8 @@ export default defineVxeComponent({
|
|
|
1977
1977
|
internalData.customMinHeight = calcTableHeight('minHeight')
|
|
1978
1978
|
internalData.customMaxHeight = calcTableHeight('maxHeight')
|
|
1979
1979
|
|
|
1980
|
-
//
|
|
1981
|
-
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight)) {
|
|
1980
|
+
// 如果启用虚拟滚动,纠正高度
|
|
1981
|
+
if (reactData.scrollYLoad && !(internalData.customHeight || internalData.customMinHeight || internalData.customMaxHeight)) {
|
|
1982
1982
|
internalData.customHeight = 300
|
|
1983
1983
|
}
|
|
1984
1984
|
}
|
|
@@ -2157,26 +2157,29 @@ export default defineVxeComponent({
|
|
|
2157
2157
|
const calcCellAutoHeight = (rowRest: VxeTableDefines.RowCacheItem, wrapperEl: HTMLDivElement) => {
|
|
2158
2158
|
const { scrollXLoad } = reactData
|
|
2159
2159
|
const wrapperElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`)
|
|
2160
|
-
let colHeight =
|
|
2160
|
+
let colHeight = 0
|
|
2161
2161
|
let firstCellStyle: CSSStyleDeclaration | null = null
|
|
2162
2162
|
let topBottomPadding = 0
|
|
2163
2163
|
for (let i = 0; i < wrapperElemList.length; i++) {
|
|
2164
2164
|
const wrapperElem = wrapperElemList[i] as HTMLElement
|
|
2165
2165
|
const cellElem = wrapperElem.parentElement as HTMLTableCellElement
|
|
2166
|
+
const cellStyle = cellElem.style
|
|
2167
|
+
const orHeight = cellStyle.height
|
|
2168
|
+
if (!scrollXLoad) {
|
|
2169
|
+
cellStyle.height = ''
|
|
2170
|
+
}
|
|
2166
2171
|
if (!firstCellStyle) {
|
|
2167
|
-
const cellStyle = cellElem.style
|
|
2168
|
-
const orHeight = cellStyle.height
|
|
2169
|
-
if (!scrollXLoad) {
|
|
2170
|
-
cellStyle.height = ''
|
|
2171
|
-
}
|
|
2172
2172
|
firstCellStyle = getComputedStyle(cellElem)
|
|
2173
2173
|
topBottomPadding = firstCellStyle ? Math.ceil(XEUtils.toNumber(firstCellStyle.paddingTop) + XEUtils.toNumber(firstCellStyle.paddingBottom)) : 0
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2174
|
+
}
|
|
2175
|
+
if (!scrollXLoad) {
|
|
2176
|
+
cellStyle.height = orHeight
|
|
2177
2177
|
}
|
|
2178
2178
|
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0
|
|
2179
|
-
colHeight =
|
|
2179
|
+
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding))
|
|
2180
|
+
}
|
|
2181
|
+
if (scrollXLoad) {
|
|
2182
|
+
colHeight = Math.max(colHeight, rowRest.height)
|
|
2180
2183
|
}
|
|
2181
2184
|
return colHeight
|
|
2182
2185
|
}
|
|
@@ -2191,7 +2194,7 @@ export default defineVxeComponent({
|
|
|
2191
2194
|
const treeOpts = computeTreeOpts.value
|
|
2192
2195
|
const defaultRowHeight = computeDefaultRowHeight.value
|
|
2193
2196
|
const el = refElem.value
|
|
2194
|
-
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))
|
|
2197
|
+
if (el && !isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2195
2198
|
const { handleGetRowId } = createHandleGetRowId($xeTable)
|
|
2196
2199
|
el.setAttribute('data-calc-row', 'Y')
|
|
2197
2200
|
tableData.forEach(row => {
|
|
@@ -2199,7 +2202,7 @@ export default defineVxeComponent({
|
|
|
2199
2202
|
const rowRest = fullAllDataRowIdData[rowid]
|
|
2200
2203
|
if (rowRest) {
|
|
2201
2204
|
const reHeight = calcCellAutoHeight(rowRest, el)
|
|
2202
|
-
rowRest.height = Math.max(defaultRowHeight,
|
|
2205
|
+
rowRest.height = Math.max(defaultRowHeight, reHeight)
|
|
2203
2206
|
}
|
|
2204
2207
|
el.removeAttribute('data-calc-row')
|
|
2205
2208
|
})
|
|
@@ -3684,6 +3687,23 @@ export default defineVxeComponent({
|
|
|
3684
3687
|
}
|
|
3685
3688
|
}
|
|
3686
3689
|
|
|
3690
|
+
const initData = () => {
|
|
3691
|
+
const { data } = props
|
|
3692
|
+
loadTableData(data || [], true).then(() => {
|
|
3693
|
+
if (data && data.length) {
|
|
3694
|
+
internalData.inited = true
|
|
3695
|
+
internalData.initStatus = true
|
|
3696
|
+
handleLoadDefaults()
|
|
3697
|
+
}
|
|
3698
|
+
handleInitDefaults()
|
|
3699
|
+
updateStyle()
|
|
3700
|
+
if (!reactData.isAllOverflow) {
|
|
3701
|
+
calcCellHeight()
|
|
3702
|
+
updateRowOffsetTop()
|
|
3703
|
+
}
|
|
3704
|
+
})
|
|
3705
|
+
}
|
|
3706
|
+
|
|
3687
3707
|
/**
|
|
3688
3708
|
* 加载表格数据
|
|
3689
3709
|
* @param {Array} datas 数据
|
|
@@ -8673,7 +8693,7 @@ export default defineVxeComponent({
|
|
|
8673
8693
|
cacheRowMap (isReset) {
|
|
8674
8694
|
const { treeConfig } = props
|
|
8675
8695
|
const { isRowGroupStatus } = reactData
|
|
8676
|
-
const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps } = internalData
|
|
8696
|
+
const { currKeyField, fullAllDataRowIdData, tableFullData, tableFullTreeData, tableFullGroupData, treeExpandedMaps, rowExpandedMaps, selectCheckboxMaps } = internalData
|
|
8677
8697
|
const fullAllDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = isReset ? {} : { ...fullAllDataRowIdData } // 存在已删除数据
|
|
8678
8698
|
const fullDataRowIdMaps: Record<string, VxeTableDefines.RowCacheItem> = {}
|
|
8679
8699
|
|
|
@@ -8699,6 +8719,14 @@ export default defineVxeComponent({
|
|
|
8699
8719
|
rowRest.index = currIndex
|
|
8700
8720
|
rowRest.treeIndex = index
|
|
8701
8721
|
|
|
8722
|
+
// 更新缓存
|
|
8723
|
+
if (selectCheckboxMaps[rowid]) {
|
|
8724
|
+
selectCheckboxMaps[rowid] = row
|
|
8725
|
+
}
|
|
8726
|
+
if (rowExpandedMaps[rowid]) {
|
|
8727
|
+
rowExpandedMaps[rowid] = row
|
|
8728
|
+
}
|
|
8729
|
+
|
|
8702
8730
|
idMaps[rowid] = true
|
|
8703
8731
|
fullDataRowIdMaps[rowid] = rowRest
|
|
8704
8732
|
fullAllDataRowIdMaps[rowid] = rowRest
|
|
@@ -11897,14 +11925,27 @@ export default defineVxeComponent({
|
|
|
11897
11925
|
xSpaceLeft = 0
|
|
11898
11926
|
}
|
|
11899
11927
|
|
|
11900
|
-
if (
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11928
|
+
if (getConfig().scrollMarginStyle) {
|
|
11929
|
+
// 已废弃方式
|
|
11930
|
+
if (headerTableElem) {
|
|
11931
|
+
headerTableElem.style.marginLeft = headerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : ''
|
|
11932
|
+
}
|
|
11933
|
+
if (bodyTableElem) {
|
|
11934
|
+
bodyTableElem.style.marginLeft = `${xSpaceLeft}px`
|
|
11935
|
+
}
|
|
11936
|
+
if (footerTableElem) {
|
|
11937
|
+
footerTableElem.style.marginLeft = footerTableElem.getAttribute('xvm') ? `${xSpaceLeft}px` : ''
|
|
11938
|
+
}
|
|
11939
|
+
} else {
|
|
11940
|
+
if (headerTableElem) {
|
|
11941
|
+
headerTableElem.style.transform = headerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : ''
|
|
11942
|
+
}
|
|
11943
|
+
if (bodyTableElem) {
|
|
11944
|
+
bodyTableElem.style.transform = `translate(${xSpaceLeft}px, ${reactData.scrollYTop || 0}px)`
|
|
11945
|
+
}
|
|
11946
|
+
if (footerTableElem) {
|
|
11947
|
+
footerTableElem.style.transform = footerTableElem.getAttribute('xvm') ? `translate(${xSpaceLeft}px, 0px)` : ''
|
|
11948
|
+
}
|
|
11908
11949
|
}
|
|
11909
11950
|
|
|
11910
11951
|
const containerList = ['main']
|
|
@@ -11968,23 +12009,27 @@ export default defineVxeComponent({
|
|
|
11968
12009
|
ySpaceTop = Math.max(0, startIndex * defaultRowHeight)
|
|
11969
12010
|
} else {
|
|
11970
12011
|
const firstRow = afterFullData[startIndex]
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
12012
|
+
if (firstRow) {
|
|
12013
|
+
let rowid = getRowid($xeTable, firstRow)
|
|
12014
|
+
let rowRest = fullAllDataRowIdData[rowid] || {}
|
|
12015
|
+
ySpaceTop = (rowRest.oTop || 0)
|
|
12016
|
+
|
|
12017
|
+
const lastRow = afterFullData[afterFullData.length - 1]
|
|
12018
|
+
rowid = getRowid($xeTable, lastRow)
|
|
12019
|
+
rowRest = fullAllDataRowIdData[rowid] || {}
|
|
12020
|
+
// 如果为空时还没计算完数据,保持原高度不变
|
|
12021
|
+
if (rowRest.oTop) {
|
|
12022
|
+
sYHeight = (rowRest.oTop || 0) + (rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight)
|
|
12023
|
+
// 是否展开行
|
|
12024
|
+
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
12025
|
+
sYHeight += rowRest.expandHeight || expandOpts.height || 0
|
|
12026
|
+
}
|
|
11984
12027
|
}
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
12028
|
+
if (sYHeight > maxYHeight) {
|
|
12029
|
+
isScrollYBig = true
|
|
12030
|
+
}
|
|
12031
|
+
} else {
|
|
12032
|
+
sYHeight = bodyTableElem ? bodyTableElem.clientHeight : 0
|
|
11988
12033
|
}
|
|
11989
12034
|
}
|
|
11990
12035
|
} else {
|
|
@@ -12012,14 +12057,26 @@ export default defineVxeComponent({
|
|
|
12012
12057
|
scrollYTop = 0
|
|
12013
12058
|
}
|
|
12014
12059
|
|
|
12015
|
-
if (
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12060
|
+
if (getConfig().scrollMarginStyle) {
|
|
12061
|
+
if (leftBodyTableElem) {
|
|
12062
|
+
leftBodyTableElem.style.marginTop = `${scrollYTop}px`
|
|
12063
|
+
}
|
|
12064
|
+
if (bodyTableElem) {
|
|
12065
|
+
bodyTableElem.style.marginTop = `${scrollYTop}px`
|
|
12066
|
+
}
|
|
12067
|
+
if (rightbodyTableElem) {
|
|
12068
|
+
rightbodyTableElem.style.marginTop = `${scrollYTop}px`
|
|
12069
|
+
}
|
|
12070
|
+
} else {
|
|
12071
|
+
if (leftBodyTableElem) {
|
|
12072
|
+
leftBodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`
|
|
12073
|
+
}
|
|
12074
|
+
if (bodyTableElem) {
|
|
12075
|
+
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`
|
|
12076
|
+
}
|
|
12077
|
+
if (rightbodyTableElem) {
|
|
12078
|
+
rightbodyTableElem.style.transform = `translate(0px, ${scrollYTop}px)`
|
|
12079
|
+
}
|
|
12023
12080
|
}
|
|
12024
12081
|
|
|
12025
12082
|
containerList.forEach(name => {
|
|
@@ -13180,7 +13237,7 @@ export default defineVxeComponent({
|
|
|
13180
13237
|
handleUpdateRowGroup(groupFields)
|
|
13181
13238
|
|
|
13182
13239
|
nextTick(() => {
|
|
13183
|
-
const {
|
|
13240
|
+
const { exportConfig, importConfig, treeConfig, highlightCurrentRow, highlightCurrentColumn } = props
|
|
13184
13241
|
const { scrollXStore, scrollYStore } = internalData
|
|
13185
13242
|
const editOpts = computeEditOpts.value
|
|
13186
13243
|
const treeOpts = computeTreeOpts.value
|
|
@@ -13405,15 +13462,7 @@ export default defineVxeComponent({
|
|
|
13405
13462
|
visibleSize: 0
|
|
13406
13463
|
})
|
|
13407
13464
|
|
|
13408
|
-
|
|
13409
|
-
if (data && data.length) {
|
|
13410
|
-
internalData.inited = true
|
|
13411
|
-
internalData.initStatus = true
|
|
13412
|
-
handleLoadDefaults()
|
|
13413
|
-
}
|
|
13414
|
-
handleInitDefaults()
|
|
13415
|
-
updateStyle()
|
|
13416
|
-
})
|
|
13465
|
+
initData()
|
|
13417
13466
|
|
|
13418
13467
|
if (props.autoResize) {
|
|
13419
13468
|
const el = refElem.value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|