vxe-table 4.10.6-beta.3 → 4.10.6-beta.5
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/body.js +2 -1
- package/es/table/src/footer.js +2 -1
- package/es/table/src/header.js +18 -10
- package/es/table/src/table.js +57 -37
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +109 -75
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/footer.js +2 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +18 -10
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +85 -61
- 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/body.ts +2 -1
- package/packages/table/src/footer.ts +2 -1
- package/packages/table/src/header.ts +18 -10
- package/packages/table/src/table.ts +55 -35
- /package/es/{iconfont.1736748534420.ttf → iconfont.1736761484754.ttf} +0 -0
- /package/es/{iconfont.1736748534420.woff → iconfont.1736761484754.woff} +0 -0
- /package/es/{iconfont.1736748534420.woff2 → iconfont.1736761484754.woff2} +0 -0
- /package/lib/{iconfont.1736748534420.ttf → iconfont.1736761484754.ttf} +0 -0
- /package/lib/{iconfont.1736748534420.woff → iconfont.1736761484754.woff} +0 -0
- /package/lib/{iconfont.1736748534420.woff2 → iconfont.1736761484754.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.10.6-beta.
|
|
16
|
+
const version = exports.version = "4.10.6-beta.5";
|
|
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.10.6-beta.
|
|
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.10.6-beta.5",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},radioConfig:{strict:!0},rowDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0},columnDragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,autoClear:!0,autoPos:!0,message:"inline",msgMode:"single",theme:"beautify"},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},drawerOptions:{mask:!0,lockView:!0,escClosable:!0,resize:!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,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:60},virtualYConfig:{gt:100},scrollbarConfig:{width:10,height:10}},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",TABLE_DRAG_COLUMN:iconPrefix+"drag-handle",TABLE_DRAG_STATUS_ROW:iconPrefix+"sort",TABLE_DRAG_STATUS_SUB_ROW:iconPrefix+"add-sub",TABLE_DRAG_STATUS_COLUMN:iconPrefix+"swap",TABLE_DRAG_DISABLED:iconPrefix+"no-drop",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.10.6-beta.
|
|
11
|
+
const version = `table v${"4.10.6-beta.5"}`;
|
|
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.10.6-beta.
|
|
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.10.6-beta.5",warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -339,6 +339,7 @@ export default defineComponent({
|
|
|
339
339
|
)
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
+
const isLastColumn = $columnIndex === columns.length - 1
|
|
342
343
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
|
|
343
344
|
|
|
344
345
|
let isPreLoadStatus = false
|
|
@@ -356,7 +357,7 @@ export default defineComponent({
|
|
|
356
357
|
[`col--${cellAlign}`]: cellAlign,
|
|
357
358
|
[`col--vertical-${verticalAlign}`]: verticalAlign,
|
|
358
359
|
[`col--${type}`]: type,
|
|
359
|
-
'col--last':
|
|
360
|
+
'col--last': isLastColumn,
|
|
360
361
|
'col--tree-node': treeNode,
|
|
361
362
|
'col--edit': isEdit,
|
|
362
363
|
'col--ellipsis': hasEllipsis,
|
|
@@ -153,6 +153,7 @@ export default defineComponent({
|
|
|
153
153
|
attrs.colspan = colspan
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
const isLastColumn = $columnIndex === tableColumn.length - 1
|
|
156
157
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
|
|
157
158
|
|
|
158
159
|
let isPreLoadStatus = false
|
|
@@ -164,7 +165,7 @@ export default defineComponent({
|
|
|
164
165
|
class: ['vxe-footer--column', column.id, {
|
|
165
166
|
[`col--${footAlign}`]: footAlign,
|
|
166
167
|
[`col--${type}`]: type,
|
|
167
|
-
'col--last':
|
|
168
|
+
'col--last': isLastColumn,
|
|
168
169
|
'fixed--width': !isAutoCellWidth,
|
|
169
170
|
'fixed--hidden': fixedHiddenColumn,
|
|
170
171
|
'col--ellipsis': hasEllipsis,
|
|
@@ -57,6 +57,12 @@ export default defineComponent({
|
|
|
57
57
|
const { clientX: dragClientX } = evnt
|
|
58
58
|
const wrapperElem = refElem.value
|
|
59
59
|
const dragBtnElem = evnt.target as HTMLDivElement
|
|
60
|
+
let resizeColumn = column
|
|
61
|
+
if (column.children && column.children.length) {
|
|
62
|
+
XEUtils.eachTree(column.children, childColumn => {
|
|
63
|
+
resizeColumn = childColumn
|
|
64
|
+
})
|
|
65
|
+
}
|
|
60
66
|
const cell = dragBtnElem.parentNode as HTMLTableCellElement
|
|
61
67
|
const cellParams = Object.assign(params, { cell })
|
|
62
68
|
let dragLeft = 0
|
|
@@ -94,7 +100,7 @@ export default defineComponent({
|
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
// 处理拖动事件
|
|
97
|
-
const updateEvent =
|
|
103
|
+
const updateEvent = (evnt: MouseEvent) => {
|
|
98
104
|
evnt.stopPropagation()
|
|
99
105
|
evnt.preventDefault()
|
|
100
106
|
const offsetX = evnt.clientX - dragClientX
|
|
@@ -112,7 +118,7 @@ export default defineComponent({
|
|
|
112
118
|
// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
|
|
113
119
|
}
|
|
114
120
|
dragLeft = Math.max(left, dragMinLeft)
|
|
115
|
-
const resizeBarLeft = dragLeft - scrollLeft
|
|
121
|
+
const resizeBarLeft = Math.max(1, dragLeft - scrollLeft)
|
|
116
122
|
resizeBarElem.style.left = `${resizeBarLeft}px`
|
|
117
123
|
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
118
124
|
const tableWidth = tableEl.clientWidth
|
|
@@ -122,13 +128,13 @@ export default defineComponent({
|
|
|
122
128
|
const resizeTipHeight = resizeTipElem.clientHeight
|
|
123
129
|
let resizeTipLeft = -resizeTipWidth
|
|
124
130
|
if (resizeBarLeft < resizeTipWidth + resizeBarWidth) {
|
|
125
|
-
resizeTipLeft =
|
|
131
|
+
resizeTipLeft = 0
|
|
126
132
|
} else if (resizeBarLeft > tableWidth) {
|
|
127
133
|
resizeTipLeft += tableWidth - resizeBarLeft
|
|
128
134
|
}
|
|
129
135
|
resizeTipElem.style.left = `${resizeTipLeft}px`
|
|
130
136
|
resizeTipElem.style.top = `${Math.min(tableEl.clientHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`
|
|
131
|
-
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [
|
|
137
|
+
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)])
|
|
132
138
|
}
|
|
133
139
|
}
|
|
134
140
|
|
|
@@ -139,11 +145,11 @@ export default defineComponent({
|
|
|
139
145
|
document.onmouseup = function (evnt) {
|
|
140
146
|
document.onmousemove = domMousemove
|
|
141
147
|
document.onmouseup = domMouseup
|
|
142
|
-
const resizeWidth =
|
|
143
|
-
|
|
148
|
+
const resizeWidth = resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)
|
|
149
|
+
resizeColumn.resizeWidth = resizeWidth
|
|
144
150
|
if (resizableOpts.dragMode === 'fixed') {
|
|
145
151
|
visibleColumn.forEach(item => {
|
|
146
|
-
if (item.id !==
|
|
152
|
+
if (item.id !== resizeColumn.id) {
|
|
147
153
|
if (!item.resizeWidth) {
|
|
148
154
|
item.resizeWidth = item.renderWidth
|
|
149
155
|
}
|
|
@@ -231,6 +237,8 @@ export default defineComponent({
|
|
|
231
237
|
thOns.onMouseup = $xeTable.handleHeaderCellDragMouseupEvent
|
|
232
238
|
}
|
|
233
239
|
}
|
|
240
|
+
const isLastColumn = $columnIndex === cols.length - 1
|
|
241
|
+
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable))
|
|
234
242
|
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto')
|
|
235
243
|
|
|
236
244
|
let isPreLoadStatus = false
|
|
@@ -242,7 +250,7 @@ export default defineComponent({
|
|
|
242
250
|
class: ['vxe-header--column', colid, {
|
|
243
251
|
[`col--${headAlign}`]: headAlign,
|
|
244
252
|
[`col--${type}`]: type,
|
|
245
|
-
'col--last':
|
|
253
|
+
'col--last': isLastColumn,
|
|
246
254
|
'col--fixed': column.fixed,
|
|
247
255
|
'col--group': isColGroup,
|
|
248
256
|
'col--ellipsis': hasEllipsis,
|
|
@@ -273,7 +281,7 @@ export default defineComponent({
|
|
|
273
281
|
/**
|
|
274
282
|
* 列宽拖动
|
|
275
283
|
*/
|
|
276
|
-
!fixedHiddenColumn &&
|
|
284
|
+
!fixedHiddenColumn && showResizable
|
|
277
285
|
? h('div', {
|
|
278
286
|
class: ['vxe-resizable', {
|
|
279
287
|
'is--line': !border || border === 'none'
|
|
@@ -281,7 +289,7 @@ export default defineComponent({
|
|
|
281
289
|
onMousedown: (evnt: MouseEvent) => resizeMousedownEvent(evnt, params),
|
|
282
290
|
onDblclick: (evnt: MouseEvent) => $xeTable.handleResizeDblclickEvent(evnt, params)
|
|
283
291
|
})
|
|
284
|
-
:
|
|
292
|
+
: renderEmptyElement($xeTable)
|
|
285
293
|
])
|
|
286
294
|
})
|
|
287
295
|
}
|
|
@@ -1192,7 +1192,7 @@ export default defineComponent({
|
|
|
1192
1192
|
}
|
|
1193
1193
|
fullColumnFieldData[field] = rest
|
|
1194
1194
|
} else {
|
|
1195
|
-
if (storage || (columnOpts.drag && (isCrossDrag || isSelfToChildDrag))) {
|
|
1195
|
+
if ((storage && !type) || (columnOpts.drag && (isCrossDrag || isSelfToChildDrag))) {
|
|
1196
1196
|
errLog('vxe.error.reqProp', [`${column.getTitle() || type || ''} -> column.field`])
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
@@ -1542,48 +1542,62 @@ export default defineComponent({
|
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
|
+
const updateAfterListIndex = () => {
|
|
1546
|
+
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData
|
|
1547
|
+
const fullMaps: Record<string, any> = {}
|
|
1548
|
+
afterFullData.forEach((row, index) => {
|
|
1549
|
+
const rowid = getRowid($xeTable, row)
|
|
1550
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
1551
|
+
const seq = index + 1
|
|
1552
|
+
if (rowRest) {
|
|
1553
|
+
rowRest.seq = seq
|
|
1554
|
+
rowRest._index = index
|
|
1555
|
+
} else {
|
|
1556
|
+
const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0, oTop: 0 }
|
|
1557
|
+
fullAllDataRowIdData[rowid] = rest
|
|
1558
|
+
fullDataRowIdData[rowid] = rest
|
|
1559
|
+
}
|
|
1560
|
+
fullMaps[rowid] = row
|
|
1561
|
+
})
|
|
1562
|
+
internalData.afterFullRowMaps = fullMaps
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1545
1565
|
/**
|
|
1546
1566
|
* 预编译
|
|
1547
1567
|
* 对渲染中的数据提前解析序号及索引。牺牲提前编译耗时换取渲染中额外损耗,使运行时更加流畅
|
|
1548
1568
|
*/
|
|
1549
1569
|
const updateAfterDataIndex = () => {
|
|
1550
1570
|
const { treeConfig } = props
|
|
1551
|
-
const {
|
|
1571
|
+
const { fullDataRowIdData, fullAllDataRowIdData, afterTreeFullData } = internalData
|
|
1552
1572
|
const treeOpts = computeTreeOpts.value
|
|
1573
|
+
const { transform } = treeOpts
|
|
1553
1574
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
1554
1575
|
const fullMaps: Record<string, any> = {}
|
|
1555
1576
|
if (treeConfig) {
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
rowRest
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1577
|
+
if (transform) {
|
|
1578
|
+
updateAfterListIndex()
|
|
1579
|
+
} else {
|
|
1580
|
+
XEUtils.eachTree(afterTreeFullData, (row, index, items, path) => {
|
|
1581
|
+
const rowid = getRowid($xeTable, row)
|
|
1582
|
+
const rowRest = fullAllDataRowIdData[rowid]
|
|
1583
|
+
const seq = path.map((num, i) => i % 2 === 0 ? (Number(num) + 1) : '.').join('')
|
|
1584
|
+
if (rowRest) {
|
|
1585
|
+
rowRest.seq = seq
|
|
1586
|
+
if (!transform) {
|
|
1587
|
+
rowRest._index = index
|
|
1588
|
+
}
|
|
1589
|
+
} else {
|
|
1590
|
+
const rest = { row, rowid, seq, index: -1, $index: -1, _index: -1, items: [], parent: null, level: 0, height: 0, oTop: 0 }
|
|
1591
|
+
fullAllDataRowIdData[rowid] = rest
|
|
1592
|
+
fullDataRowIdData[rowid] = rest
|
|
1593
|
+
}
|
|
1594
|
+
fullMaps[rowid] = row
|
|
1595
|
+
}, { children: transform ? treeOpts.mapChildrenField : childrenField })
|
|
1596
|
+
internalData.afterFullRowMaps = fullMaps
|
|
1597
|
+
}
|
|
1570
1598
|
} else {
|
|
1571
|
-
|
|
1572
|
-
const rowid = getRowid($xeTable, row)
|
|
1573
|
-
const rowRest = fullAllDataRowIdData[rowid]
|
|
1574
|
-
const seq = index + 1
|
|
1575
|
-
if (rowRest) {
|
|
1576
|
-
rowRest.seq = seq
|
|
1577
|
-
rowRest._index = index
|
|
1578
|
-
} else {
|
|
1579
|
-
const rest = { row, rowid, seq, index: -1, $index: -1, _index: index, items: [], parent: null, level: 0, height: 0, oTop: 0 }
|
|
1580
|
-
fullAllDataRowIdData[rowid] = rest
|
|
1581
|
-
fullDataRowIdData[rowid] = rest
|
|
1582
|
-
}
|
|
1583
|
-
fullMaps[rowid] = row
|
|
1584
|
-
})
|
|
1599
|
+
updateAfterListIndex()
|
|
1585
1600
|
}
|
|
1586
|
-
internalData.afterFullRowMaps = fullMaps
|
|
1587
1601
|
}
|
|
1588
1602
|
|
|
1589
1603
|
/**
|
|
@@ -6616,17 +6630,23 @@ export default defineComponent({
|
|
|
6616
6630
|
if (isDblclickAutoWidth && el) {
|
|
6617
6631
|
const { fullColumnIdData } = internalData
|
|
6618
6632
|
const { column } = params
|
|
6619
|
-
|
|
6633
|
+
let resizeColumn = column
|
|
6634
|
+
if (column.children && column.children.length) {
|
|
6635
|
+
XEUtils.eachTree(column.children, childColumn => {
|
|
6636
|
+
resizeColumn = childColumn
|
|
6637
|
+
})
|
|
6638
|
+
}
|
|
6639
|
+
const colid = resizeColumn.id
|
|
6620
6640
|
const colRest = fullColumnIdData[colid]
|
|
6621
6641
|
const dragBtnElem = evnt.target as HTMLDivElement
|
|
6622
6642
|
const cell = dragBtnElem.parentNode as HTMLTableCellElement
|
|
6623
6643
|
const cellParams = Object.assign(params, { cell })
|
|
6624
6644
|
const colMinWidth = getColReMinWidth(cellParams)
|
|
6625
|
-
let resizeWidth = calcColumnAutoWidth(
|
|
6645
|
+
let resizeWidth = calcColumnAutoWidth(resizeColumn, el)
|
|
6626
6646
|
if (colRest) {
|
|
6627
6647
|
resizeWidth = Math.max(resizeWidth, colRest.width)
|
|
6628
6648
|
}
|
|
6629
|
-
|
|
6649
|
+
resizeColumn.resizeWidth = Math.max(colMinWidth, resizeWidth)
|
|
6630
6650
|
reactData._isResize = false
|
|
6631
6651
|
internalData._lastResizeTime = Date.now()
|
|
6632
6652
|
$xeTable.analyColumnWidth()
|
|
@@ -6860,7 +6880,7 @@ export default defineComponent({
|
|
|
6860
6880
|
vLen++
|
|
6861
6881
|
})
|
|
6862
6882
|
|
|
6863
|
-
const isSelected =
|
|
6883
|
+
const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length
|
|
6864
6884
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1)
|
|
6865
6885
|
|
|
6866
6886
|
reactData.isAllSelected = isSelected
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|