vxe-table 3.11.15 → 3.11.17
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 +1 -1
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/zh-CHT.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/src/header.js +39 -4
- package/es/table/src/methods.js +5 -1
- package/es/table/src/table.js +9 -2
- package/es/table/src/util.js +10 -9
- package/es/table/style.css +13 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +6 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +13 -1
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +66 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -2
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -2
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/header.js +39 -5
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +5 -1
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +10 -9
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +13 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +6 -2
- 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/lib/vxe-table/style/style.css +13 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/zh-CHT.ts +2 -2
- package/packages/table/src/header.ts +39 -4
- package/packages/table/src/methods.ts +5 -1
- package/packages/table/src/table.ts +9 -1
- package/packages/table/src/util.ts +10 -9
- package/packages/ui/index.ts +5 -1
- package/styles/components/table.scss +13 -1
- /package/es/{iconfont.1733108997206.ttf → iconfont.1733292006395.ttf} +0 -0
- /package/es/{iconfont.1733108997206.woff → iconfont.1733292006395.woff} +0 -0
- /package/es/{iconfont.1733108997206.woff2 → iconfont.1733292006395.woff2} +0 -0
- /package/lib/{iconfont.1733108997206.ttf → iconfont.1733292006395.ttf} +0 -0
- /package/lib/{iconfont.1733108997206.woff → iconfont.1733292006395.woff} +0 -0
- /package/lib/{iconfont.1733108997206.woff2 → iconfont.1733292006395.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.11.
|
|
2223
|
+
const version = "3.11.17";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2253,6 +2253,10 @@ core_.VxeUI.setConfig({
|
|
|
2253
2253
|
resizeConfig: {
|
|
2254
2254
|
// refreshDelay: 250
|
|
2255
2255
|
},
|
|
2256
|
+
resizableConfig: {
|
|
2257
|
+
dragMode: 'auto',
|
|
2258
|
+
showDragTip: true
|
|
2259
|
+
},
|
|
2256
2260
|
radioConfig: {
|
|
2257
2261
|
// trigger: 'default'
|
|
2258
2262
|
strict: true
|
|
@@ -2276,7 +2280,7 @@ core_.VxeUI.setConfig({
|
|
|
2276
2280
|
autoPos: true,
|
|
2277
2281
|
message: 'inline',
|
|
2278
2282
|
msgMode: 'single',
|
|
2279
|
-
theme: '
|
|
2283
|
+
theme: 'beautify'
|
|
2280
2284
|
},
|
|
2281
2285
|
columnConfig: {
|
|
2282
2286
|
maxFixedSize: 4
|
|
@@ -2774,7 +2778,7 @@ function isNodeElement(elem) {
|
|
|
2774
2778
|
const {
|
|
2775
2779
|
log: log_log
|
|
2776
2780
|
} = core_.VxeUI;
|
|
2777
|
-
const log_version = `table v${"3.11.
|
|
2781
|
+
const log_version = `table v${"3.11.17"}`;
|
|
2778
2782
|
const warnLog = log_log.create('warn', log_version);
|
|
2779
2783
|
const errLog = log_log.create('error', log_version);
|
|
2780
2784
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3058,7 +3062,7 @@ function getPaddingLeftRightSize(elem) {
|
|
|
3058
3062
|
}
|
|
3059
3063
|
return 0;
|
|
3060
3064
|
}
|
|
3061
|
-
function
|
|
3065
|
+
function getElementMarginWidth(elem) {
|
|
3062
3066
|
if (elem) {
|
|
3063
3067
|
const computedStyle = getComputedStyle(elem);
|
|
3064
3068
|
const marginLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.marginLeft);
|
|
@@ -3183,14 +3187,15 @@ function getColReMinWidth(params) {
|
|
|
3183
3187
|
let mWidth = minTitleWidth + paddingLeftRight;
|
|
3184
3188
|
// 默认最小宽处理
|
|
3185
3189
|
if (hasEllipsis) {
|
|
3186
|
-
const
|
|
3187
|
-
const
|
|
3188
|
-
const
|
|
3189
|
-
const
|
|
3190
|
-
const
|
|
3191
|
-
const
|
|
3192
|
-
const
|
|
3193
|
-
|
|
3190
|
+
const dragIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--drag-handle'));
|
|
3191
|
+
const checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--checkbox'));
|
|
3192
|
+
const requiredIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'));
|
|
3193
|
+
const editIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--edit-icon'));
|
|
3194
|
+
const prefixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-prefix-icon'));
|
|
3195
|
+
const suffixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-suffix-icon'));
|
|
3196
|
+
const sortIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'));
|
|
3197
|
+
const filterIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'));
|
|
3198
|
+
mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
|
|
3194
3199
|
}
|
|
3195
3200
|
// 如果设置最小宽
|
|
3196
3201
|
if (colMinWidth) {
|
|
@@ -5289,8 +5294,12 @@ const updateRowDropTipContent = ($xeTable, tdEl) => {
|
|
|
5289
5294
|
const updateColDropOrigin = ($xeTable, column) => {
|
|
5290
5295
|
const el = $xeTable.$el;
|
|
5291
5296
|
if (el) {
|
|
5297
|
+
const colQuerys = [];
|
|
5298
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
|
|
5299
|
+
colQuerys.push(`[colid="${item.id}"]`);
|
|
5300
|
+
});
|
|
5292
5301
|
const clss = 'col--drag-origin';
|
|
5293
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(
|
|
5302
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(el.querySelectorAll(colQuerys.join(',')), elem => {
|
|
5294
5303
|
addClass(elem, clss);
|
|
5295
5304
|
});
|
|
5296
5305
|
}
|
|
@@ -14323,28 +14332,36 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14323
14332
|
this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
|
|
14324
14333
|
},
|
|
14325
14334
|
resizeMousedown(evnt, params) {
|
|
14335
|
+
const $xeTable = this.$parent;
|
|
14336
|
+
const tableInternalData = $xeTable;
|
|
14326
14337
|
const {
|
|
14327
14338
|
column
|
|
14328
14339
|
} = params;
|
|
14329
14340
|
const {
|
|
14330
14341
|
$parent: $xetable,
|
|
14331
|
-
$el,
|
|
14332
14342
|
fixedType
|
|
14333
14343
|
} = this;
|
|
14344
|
+
const {
|
|
14345
|
+
visibleColumn
|
|
14346
|
+
} = tableInternalData;
|
|
14334
14347
|
const {
|
|
14335
14348
|
tableBody,
|
|
14336
14349
|
leftContainer,
|
|
14337
|
-
rightContainer
|
|
14338
|
-
resizeBar: resizeBarElem
|
|
14350
|
+
rightContainer
|
|
14339
14351
|
} = $xetable.$refs;
|
|
14352
|
+
const tableEl = $xeTable.$el;
|
|
14353
|
+
const resizeBarElem = $xetable.$refs.resizeBar;
|
|
14354
|
+
const resizeTipElem = $xetable.$refs.refCellResizeTip;
|
|
14355
|
+
const wrapperElem = this.$el;
|
|
14340
14356
|
const {
|
|
14341
14357
|
target: dragBtnElem,
|
|
14342
14358
|
clientX: dragClientX
|
|
14343
14359
|
} = evnt;
|
|
14344
14360
|
const cell = params.cell = dragBtnElem.parentNode;
|
|
14361
|
+
const resizableOpts = $xeTable.computeResizableOpts;
|
|
14345
14362
|
let dragLeft = 0;
|
|
14346
14363
|
const tableBodyElem = tableBody.$el;
|
|
14347
|
-
const pos = getOffsetPos(dragBtnElem,
|
|
14364
|
+
const pos = getOffsetPos(dragBtnElem, tableEl);
|
|
14348
14365
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
14349
14366
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
14350
14367
|
const minInterval = getColReMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
@@ -14390,7 +14407,24 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14390
14407
|
// left = Math.min(left, tableBodyElem.clientWidth + tableBodyElem.scrollLeft - 40)
|
|
14391
14408
|
}
|
|
14392
14409
|
dragLeft = Math.max(left, dragMinLeft);
|
|
14393
|
-
|
|
14410
|
+
const resizeBarLeft = dragLeft - scrollLeft;
|
|
14411
|
+
resizeBarElem.style.left = `${resizeBarLeft}px`;
|
|
14412
|
+
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
14413
|
+
const tableWidth = tableEl.clientWidth;
|
|
14414
|
+
const wrapperRect = wrapperElem.getBoundingClientRect();
|
|
14415
|
+
const resizeBarWidth = resizeBarElem.clientWidth;
|
|
14416
|
+
const resizeTipWidth = resizeTipElem.clientWidth;
|
|
14417
|
+
const resizeTipHeight = resizeTipElem.clientHeight;
|
|
14418
|
+
let resizeTipLeft = -resizeTipWidth;
|
|
14419
|
+
if (resizeBarLeft < resizeTipWidth + resizeBarWidth) {
|
|
14420
|
+
resizeTipLeft = resizeTipWidth + resizeBarWidth - resizeBarLeft;
|
|
14421
|
+
} else if (resizeBarLeft > tableWidth) {
|
|
14422
|
+
resizeTipLeft += tableWidth - resizeBarLeft;
|
|
14423
|
+
}
|
|
14424
|
+
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
14425
|
+
resizeTipElem.style.top = `${Math.min(tableEl.clientHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
|
|
14426
|
+
resizeTipElem.textContent = `${column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)}px`;
|
|
14427
|
+
}
|
|
14394
14428
|
};
|
|
14395
14429
|
$xetable._isResize = true;
|
|
14396
14430
|
addClass($xetable.$el, 'drag--resize');
|
|
@@ -14401,6 +14435,15 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14401
14435
|
document.onmouseup = domMouseup;
|
|
14402
14436
|
const resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
14403
14437
|
column.resizeWidth = resizeWidth;
|
|
14438
|
+
if (resizableOpts.dragMode === 'fixed') {
|
|
14439
|
+
visibleColumn.forEach(item => {
|
|
14440
|
+
if (item.id !== column.id) {
|
|
14441
|
+
if (!item.resizeWidth) {
|
|
14442
|
+
item.resizeWidth = item.renderWidth;
|
|
14443
|
+
}
|
|
14444
|
+
}
|
|
14445
|
+
});
|
|
14446
|
+
}
|
|
14404
14447
|
resizeBarElem.style.display = 'none';
|
|
14405
14448
|
$xetable._isResize = false;
|
|
14406
14449
|
$xetable._lastResizeTime = Date.now();
|
|
@@ -23269,6 +23312,7 @@ function handleUupdateResize(_vm) {
|
|
|
23269
23312
|
rowOpts,
|
|
23270
23313
|
checkboxOpts,
|
|
23271
23314
|
loadingOpts,
|
|
23315
|
+
resizableOpts,
|
|
23272
23316
|
editRules
|
|
23273
23317
|
} = $xeTable;
|
|
23274
23318
|
const {
|
|
@@ -23420,7 +23464,10 @@ function handleUupdateResize(_vm) {
|
|
|
23420
23464
|
'padding-bottom': `${scrollbarHeight}px`
|
|
23421
23465
|
} : {},
|
|
23422
23466
|
ref: 'resizeBar'
|
|
23423
|
-
}
|
|
23467
|
+
}, resizableOpts.showDragTip ? [h('div', {
|
|
23468
|
+
ref: 'refCellResizeTip',
|
|
23469
|
+
class: 'vxe-table--resizable-number-tip'
|
|
23470
|
+
}, '23432px')] : []),
|
|
23424
23471
|
/**
|
|
23425
23472
|
* 加载中
|
|
23426
23473
|
*/
|