vxe-table 3.11.14 → 3.11.16
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +10 -7
- package/es/table/src/header.js +39 -4
- package/es/table/src/table.js +9 -2
- package/es/table/src/util.js +10 -9
- package/es/table/style.css +10 -0
- 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 +10 -0
- 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 +71 -25
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +10 -7
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/header.js +39 -5
- package/lib/table/src/header.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 +10 -0
- 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 +10 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/export/mixin.ts +10 -7
- package/packages/table/src/header.ts +39 -4
- 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 +10 -0
- /package/es/{iconfont.1733097092605.ttf → iconfont.1733192992209.ttf} +0 -0
- /package/es/{iconfont.1733097092605.woff → iconfont.1733192992209.woff} +0 -0
- /package/es/{iconfont.1733097092605.woff2 → iconfont.1733192992209.woff2} +0 -0
- /package/lib/{iconfont.1733097092605.ttf → iconfont.1733192992209.ttf} +0 -0
- /package/lib/{iconfont.1733097092605.woff → iconfont.1733192992209.woff} +0 -0
- /package/lib/{iconfont.1733097092605.woff2 → iconfont.1733192992209.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.16";
|
|
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.16"}`;
|
|
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) {
|
|
@@ -14323,28 +14328,36 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14323
14328
|
this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
|
|
14324
14329
|
},
|
|
14325
14330
|
resizeMousedown(evnt, params) {
|
|
14331
|
+
const $xeTable = this.$parent;
|
|
14332
|
+
const tableInternalData = $xeTable;
|
|
14326
14333
|
const {
|
|
14327
14334
|
column
|
|
14328
14335
|
} = params;
|
|
14329
14336
|
const {
|
|
14330
14337
|
$parent: $xetable,
|
|
14331
|
-
$el,
|
|
14332
14338
|
fixedType
|
|
14333
14339
|
} = this;
|
|
14340
|
+
const {
|
|
14341
|
+
visibleColumn
|
|
14342
|
+
} = tableInternalData;
|
|
14334
14343
|
const {
|
|
14335
14344
|
tableBody,
|
|
14336
14345
|
leftContainer,
|
|
14337
|
-
rightContainer
|
|
14338
|
-
resizeBar: resizeBarElem
|
|
14346
|
+
rightContainer
|
|
14339
14347
|
} = $xetable.$refs;
|
|
14348
|
+
const tableEl = $xeTable.$el;
|
|
14349
|
+
const resizeBarElem = $xetable.$refs.resizeBar;
|
|
14350
|
+
const resizeTipElem = $xetable.$refs.refCellResizeTip;
|
|
14351
|
+
const wrapperElem = this.$el;
|
|
14340
14352
|
const {
|
|
14341
14353
|
target: dragBtnElem,
|
|
14342
14354
|
clientX: dragClientX
|
|
14343
14355
|
} = evnt;
|
|
14344
14356
|
const cell = params.cell = dragBtnElem.parentNode;
|
|
14357
|
+
const resizableOpts = $xeTable.computeResizableOpts;
|
|
14345
14358
|
let dragLeft = 0;
|
|
14346
14359
|
const tableBodyElem = tableBody.$el;
|
|
14347
|
-
const pos = getOffsetPos(dragBtnElem,
|
|
14360
|
+
const pos = getOffsetPos(dragBtnElem, tableEl);
|
|
14348
14361
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
14349
14362
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
14350
14363
|
const minInterval = getColReMinWidth(params) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
@@ -14390,7 +14403,24 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14390
14403
|
// left = Math.min(left, tableBodyElem.clientWidth + tableBodyElem.scrollLeft - 40)
|
|
14391
14404
|
}
|
|
14392
14405
|
dragLeft = Math.max(left, dragMinLeft);
|
|
14393
|
-
|
|
14406
|
+
const resizeBarLeft = dragLeft - scrollLeft;
|
|
14407
|
+
resizeBarElem.style.left = `${resizeBarLeft}px`;
|
|
14408
|
+
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
14409
|
+
const tableWidth = tableEl.clientWidth;
|
|
14410
|
+
const wrapperRect = wrapperElem.getBoundingClientRect();
|
|
14411
|
+
const resizeBarWidth = resizeBarElem.clientWidth;
|
|
14412
|
+
const resizeTipWidth = resizeTipElem.clientWidth;
|
|
14413
|
+
const resizeTipHeight = resizeTipElem.clientHeight;
|
|
14414
|
+
let resizeTipLeft = -resizeTipWidth;
|
|
14415
|
+
if (resizeBarLeft < resizeTipWidth + resizeBarWidth) {
|
|
14416
|
+
resizeTipLeft = resizeTipWidth + resizeBarWidth - resizeBarLeft;
|
|
14417
|
+
} else if (resizeBarLeft > tableWidth) {
|
|
14418
|
+
resizeTipLeft += tableWidth - resizeBarLeft;
|
|
14419
|
+
}
|
|
14420
|
+
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
14421
|
+
resizeTipElem.style.top = `${Math.min(tableEl.clientHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
|
|
14422
|
+
resizeTipElem.textContent = `${column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)}px`;
|
|
14423
|
+
}
|
|
14394
14424
|
};
|
|
14395
14425
|
$xetable._isResize = true;
|
|
14396
14426
|
addClass($xetable.$el, 'drag--resize');
|
|
@@ -14401,6 +14431,15 @@ function renderHeads(h, _vm, headerGroups) {
|
|
|
14401
14431
|
document.onmouseup = domMouseup;
|
|
14402
14432
|
const resizeWidth = column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft);
|
|
14403
14433
|
column.resizeWidth = resizeWidth;
|
|
14434
|
+
if (resizableOpts.dragMode === 'fixed') {
|
|
14435
|
+
visibleColumn.forEach(item => {
|
|
14436
|
+
if (item.id !== column.id) {
|
|
14437
|
+
if (!item.resizeWidth) {
|
|
14438
|
+
item.resizeWidth = item.renderWidth;
|
|
14439
|
+
}
|
|
14440
|
+
}
|
|
14441
|
+
});
|
|
14442
|
+
}
|
|
14404
14443
|
resizeBarElem.style.display = 'none';
|
|
14405
14444
|
$xetable._isResize = false;
|
|
14406
14445
|
$xetable._lastResizeTime = Date.now();
|
|
@@ -19019,7 +19058,7 @@ function toTableBorder(border) {
|
|
|
19019
19058
|
function toBooleanValue(cellValue) {
|
|
19020
19059
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(cellValue) ? cellValue ? 'TRUE' : 'FALSE' : cellValue;
|
|
19021
19060
|
}
|
|
19022
|
-
function
|
|
19061
|
+
function getBodyLabelData($xetable, opts, columns, datas) {
|
|
19023
19062
|
const {
|
|
19024
19063
|
isAllExpand,
|
|
19025
19064
|
mode
|
|
@@ -19126,15 +19165,18 @@ function getLabelData($xetable, opts, columns, datas) {
|
|
|
19126
19165
|
columns.forEach((column, $columnIndex) => {
|
|
19127
19166
|
let cellValue = '';
|
|
19128
19167
|
const renderOpts = column.editRender || column.cellRender;
|
|
19129
|
-
let
|
|
19130
|
-
if (!
|
|
19168
|
+
let bodyExportMethod = column.exportMethod;
|
|
19169
|
+
if (!bodyExportMethod && renderOpts && renderOpts.name) {
|
|
19131
19170
|
const compConf = export_mixin_renderer.get(renderOpts.name);
|
|
19132
19171
|
if (compConf) {
|
|
19133
|
-
|
|
19172
|
+
bodyExportMethod = compConf.tableExportMethod || compConf.exportMethod || compConf.cellExportMethod;
|
|
19134
19173
|
}
|
|
19135
19174
|
}
|
|
19136
|
-
if (
|
|
19137
|
-
|
|
19175
|
+
if (!bodyExportMethod) {
|
|
19176
|
+
bodyExportMethod = columnOpts.exportMethod;
|
|
19177
|
+
}
|
|
19178
|
+
if (bodyExportMethod) {
|
|
19179
|
+
cellValue = bodyExportMethod({
|
|
19138
19180
|
$table: $xetable,
|
|
19139
19181
|
row,
|
|
19140
19182
|
column,
|
|
@@ -19196,7 +19238,7 @@ function getExportData($xetable, opts) {
|
|
|
19196
19238
|
$rowIndex: index
|
|
19197
19239
|
}));
|
|
19198
19240
|
}
|
|
19199
|
-
return
|
|
19241
|
+
return getBodyLabelData($xetable, opts, columns, datas);
|
|
19200
19242
|
}
|
|
19201
19243
|
function getBooleanValue(cellValue) {
|
|
19202
19244
|
return cellValue === 'TRUE' || cellValue === 'true' || cellValue === true;
|
|
@@ -23266,6 +23308,7 @@ function handleUupdateResize(_vm) {
|
|
|
23266
23308
|
rowOpts,
|
|
23267
23309
|
checkboxOpts,
|
|
23268
23310
|
loadingOpts,
|
|
23311
|
+
resizableOpts,
|
|
23269
23312
|
editRules
|
|
23270
23313
|
} = $xeTable;
|
|
23271
23314
|
const {
|
|
@@ -23417,7 +23460,10 @@ function handleUupdateResize(_vm) {
|
|
|
23417
23460
|
'padding-bottom': `${scrollbarHeight}px`
|
|
23418
23461
|
} : {},
|
|
23419
23462
|
ref: 'resizeBar'
|
|
23420
|
-
}
|
|
23463
|
+
}, resizableOpts.showDragTip ? [h('div', {
|
|
23464
|
+
ref: 'refCellResizeTip',
|
|
23465
|
+
class: 'vxe-table--resizable-number-tip'
|
|
23466
|
+
}, '23432px')] : []),
|
|
23421
23467
|
/**
|
|
23422
23468
|
* 加载中
|
|
23423
23469
|
*/
|