vxe-table 3.12.1-beta.3 → 3.12.1-beta.4
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/locale/lang/ar-EG.js +2 -1
- package/es/locale/lang/de-DE.js +2 -1
- package/es/locale/lang/en-US.js +2 -1
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/fr-FR.js +2 -1
- package/es/locale/lang/hu-HU.js +2 -1
- package/es/locale/lang/hy-AM.js +2 -1
- package/es/locale/lang/it-IT.js +2 -1
- package/es/locale/lang/ja-JP.js +2 -1
- package/es/locale/lang/ko-KR.js +2 -1
- package/es/locale/lang/nb-NO.js +2 -1
- package/es/locale/lang/pt-BR.js +2 -1
- package/es/locale/lang/ru-RU.js +2 -1
- package/es/locale/lang/th-TH.js +2 -1
- package/es/locale/lang/ug-CN.js +2 -1
- package/es/locale/lang/uk-UA.js +2 -1
- package/es/locale/lang/vi-VN.js +2 -1
- package/es/locale/lang/zh-CHT.js +2 -1
- package/es/locale/lang/zh-CN.js +2 -1
- package/es/style.css +1 -1
- package/es/table/src/cell.js +73 -50
- package/es/table/src/header.js +10 -7
- package/es/table/src/methods.js +493 -442
- package/es/table/src/table.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +674 -582
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -1
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/fr-FR.js +2 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -1
- package/lib/locale/lang/hy-AM.js +2 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/it-IT.js +2 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -1
- package/lib/locale/lang/ko-KR.js +2 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -1
- package/lib/locale/lang/nb-NO.js +2 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -1
- package/lib/locale/lang/ru-RU.js +2 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -1
- package/lib/locale/lang/th-TH.js +2 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +2 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -1
- package/lib/locale/lang/vi-VN.js +2 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -1
- package/lib/locale/lang/zh-CN.js +2 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -1
- package/lib/style.css +1 -1
- package/lib/table/src/cell.js +87 -54
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/header.js +11 -6
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +570 -518
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- 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 +2 -2
- package/packages/locale/lang/ar-EG.ts +2 -1
- package/packages/locale/lang/de-DE.ts +2 -1
- package/packages/locale/lang/en-US.ts +2 -1
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/fr-FR.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +2 -1
- package/packages/locale/lang/hy-AM.ts +2 -1
- package/packages/locale/lang/it-IT.ts +2 -1
- package/packages/locale/lang/ja-JP.ts +2 -1
- package/packages/locale/lang/ko-KR.ts +2 -1
- package/packages/locale/lang/nb-NO.ts +2 -1
- package/packages/locale/lang/pt-BR.ts +2 -1
- package/packages/locale/lang/ru-RU.ts +2 -1
- package/packages/locale/lang/th-TH.ts +2 -1
- package/packages/locale/lang/ug-CN.ts +2 -1
- package/packages/locale/lang/uk-UA.ts +2 -1
- package/packages/locale/lang/vi-VN.ts +2 -1
- package/packages/locale/lang/zh-CHT.ts +2 -1
- package/packages/locale/lang/zh-CN.ts +2 -1
- package/packages/table/src/cell.ts +78 -46
- package/packages/table/src/header.ts +13 -10
- package/packages/table/src/methods.ts +513 -451
- package/packages/table/src/table.ts +1 -1
- /package/es/{iconfont.1735888162273.ttf → iconfont.1735908447074.ttf} +0 -0
- /package/es/{iconfont.1735888162273.woff → iconfont.1735908447074.woff} +0 -0
- /package/es/{iconfont.1735888162273.woff2 → iconfont.1735908447074.woff2} +0 -0
- /package/lib/{iconfont.1735888162273.ttf → iconfont.1735908447074.ttf} +0 -0
- /package/lib/{iconfont.1735888162273.woff → iconfont.1735908447074.woff} +0 -0
- /package/lib/{iconfont.1735888162273.woff2 → iconfont.1735908447074.woff2} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -3,7 +3,7 @@ import { VxeUI } from '../../ui';
|
|
|
3
3
|
import { getClass } from '../../ui/src/utils';
|
|
4
4
|
import { getOffsetPos, hasClass, addClass, removeClass } from '../../ui/src/dom';
|
|
5
5
|
import { convertHeaderColumnToRows, getColReMinWidth } from './util';
|
|
6
|
-
const { renderer, renderEmptyElement } = VxeUI;
|
|
6
|
+
const { getI18n, renderer, renderEmptyElement } = VxeUI;
|
|
7
7
|
const cellType = 'header';
|
|
8
8
|
const renderRows = (h, _vm, cols, $rowIndex) => {
|
|
9
9
|
const $xeTable = _vm.$parent;
|
|
@@ -100,7 +100,8 @@ const renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
100
100
|
'is--line': !border || border === 'none'
|
|
101
101
|
}],
|
|
102
102
|
on: {
|
|
103
|
-
mousedown: (evnt) => _vm.
|
|
103
|
+
mousedown: (evnt) => _vm.resizeMousedownEvent(evnt, params),
|
|
104
|
+
dblclick: (evnt) => $xeTable.handleResizeDblclickEvent(evnt, params)
|
|
104
105
|
}
|
|
105
106
|
})
|
|
106
107
|
: null
|
|
@@ -321,7 +322,7 @@ export default {
|
|
|
321
322
|
const { $parent: $xetable } = this;
|
|
322
323
|
this.headerColumn = $xetable.isGroup ? convertHeaderColumnToRows(this.tableGroupColumn) : [];
|
|
323
324
|
},
|
|
324
|
-
|
|
325
|
+
resizeMousedownEvent(evnt, params) {
|
|
325
326
|
const $xeTable = this.$parent;
|
|
326
327
|
const tableInternalData = $xeTable;
|
|
327
328
|
const { column } = params;
|
|
@@ -332,15 +333,17 @@ export default {
|
|
|
332
333
|
const resizeBarElem = $xetable.$refs.resizeBar;
|
|
333
334
|
const resizeTipElem = $xetable.$refs.refCellResizeTip;
|
|
334
335
|
const wrapperElem = this.$el;
|
|
335
|
-
const {
|
|
336
|
-
const
|
|
336
|
+
const { clientX: dragClientX } = evnt;
|
|
337
|
+
const dragBtnElem = evnt.target;
|
|
338
|
+
const cell = dragBtnElem.parentNode;
|
|
339
|
+
const cellParams = Object.assign(params, { cell });
|
|
337
340
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
338
341
|
let dragLeft = 0;
|
|
339
342
|
const tableBodyElem = tableBody.$el;
|
|
340
343
|
const pos = getOffsetPos(dragBtnElem, tableEl);
|
|
341
344
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
342
345
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
343
|
-
const minInterval = getColReMinWidth(
|
|
346
|
+
const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
344
347
|
let dragMinLeft = pos.left - cell.clientWidth + dragBtnWidth + minInterval;
|
|
345
348
|
let dragPosLeft = pos.left + dragBtnOffsetWidth;
|
|
346
349
|
const domMousemove = document.onmousemove;
|
|
@@ -403,7 +406,7 @@ export default {
|
|
|
403
406
|
}
|
|
404
407
|
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
405
408
|
resizeTipElem.style.top = `${Math.min(tableEl.clientHeight - resizeTipHeight, Math.max(0, evnt.clientY - wrapperRect.y - resizeTipHeight / 2))}px`;
|
|
406
|
-
resizeTipElem.textContent =
|
|
409
|
+
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [column.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
|
|
407
410
|
}
|
|
408
411
|
};
|
|
409
412
|
$xetable._isResize = true;
|