vxe-table 3.18.0 → 3.18.1
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/module/edit/mixin.js +58 -20
- package/es/table/module/filter/mixin.js +12 -10
- package/es/table/module/menu/mixin.js +16 -9
- package/es/table/module/validator/mixin.js +4 -2
- package/es/table/src/methods.js +344 -46
- package/es/table/src/store.js +8 -0
- package/es/table/src/table.js +26 -9
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +518 -104
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +55 -16
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/filter/mixin.js +12 -10
- package/lib/table/module/filter/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +20 -13
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -2
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/src/methods.js +388 -52
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/store.js +15 -0
- package/lib/table/src/store.min.js +1 -0
- package/lib/table/src/table.js +28 -9
- 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/module/edit/mixin.ts +59 -23
- package/packages/table/module/filter/mixin.ts +17 -13
- package/packages/table/module/menu/mixin.ts +16 -9
- package/packages/table/module/validator/mixin.ts +8 -4
- package/packages/table/src/methods.ts +362 -50
- package/packages/table/src/store.ts +15 -0
- package/packages/table/src/table.ts +27 -9
- /package/es/{iconfont.1756083626568.ttf → iconfont.1756272539382.ttf} +0 -0
- /package/es/{iconfont.1756083626568.woff → iconfont.1756272539382.woff} +0 -0
- /package/es/{iconfont.1756083626568.woff2 → iconfont.1756272539382.woff2} +0 -0
- /package/lib/{iconfont.1756083626568.ttf → iconfont.1756272539382.ttf} +0 -0
- /package/lib/{iconfont.1756083626568.woff → iconfont.1756272539382.woff} +0 -0
- /package/lib/{iconfont.1756083626568.woff2 → iconfont.1756272539382.woff2} +0 -0
package/es/table/src/table.js
CHANGED
|
@@ -10,6 +10,7 @@ import TableFooterComponent from './footer';
|
|
|
10
10
|
import { tableProps } from './props';
|
|
11
11
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
12
12
|
import { warnLog, errLog } from '../../ui/src/log';
|
|
13
|
+
import { crossTableDragRowGlobal, getCrossTableDragRowInfo } from './store';
|
|
13
14
|
import TableCustomPanelComponent from '../module/custom/panel';
|
|
14
15
|
import TableFilterPanelComponent from '../module/filter/panel';
|
|
15
16
|
import TableImportPanelComponent from '../module/export/import-panel';
|
|
@@ -119,6 +120,7 @@ function renderEmptyBody(h, $xeTable) {
|
|
|
119
120
|
const renderDragTipContents = (h, $xeTable) => {
|
|
120
121
|
const props = $xeTable;
|
|
121
122
|
const reactData = $xeTable;
|
|
123
|
+
const crossTableDragRowInfo = getCrossTableDragRowInfo($xeTable);
|
|
122
124
|
const { dragConfig } = props;
|
|
123
125
|
const { dragRow, dragCol, dragTipText } = reactData;
|
|
124
126
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
@@ -127,8 +129,9 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
127
129
|
const rTipSlot = rowDragSlots.tip || (dragConfig && dragConfig.slots ? dragConfig.slots.rowTip : null);
|
|
128
130
|
const columnDragSlots = columnDragOpts.slots || {};
|
|
129
131
|
const cTipSlot = columnDragSlots.tip;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
const dRow = dragRow || (rowDragOpts.isCrossTableDrag ? crossTableDragRowInfo.row : null);
|
|
133
|
+
if (dRow && rTipSlot) {
|
|
134
|
+
return $xeTable.callSlot(rTipSlot, { row: dRow }, h);
|
|
132
135
|
}
|
|
133
136
|
if (dragCol && cTipSlot) {
|
|
134
137
|
return $xeTable.callSlot(cTipSlot, { column: dragCol }, h);
|
|
@@ -137,11 +140,13 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
137
140
|
};
|
|
138
141
|
const renderDragTip = (h, $xeTable) => {
|
|
139
142
|
const reactData = $xeTable;
|
|
143
|
+
const crossTableDragRowInfo = getCrossTableDragRowInfo($xeTable);
|
|
140
144
|
const { dragRow, dragCol } = reactData;
|
|
141
145
|
const rowOpts = $xeTable.computeRowOpts;
|
|
142
146
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
143
147
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
144
148
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
149
|
+
const dRow = dragRow || (rowDragOpts.isCrossTableDrag ? crossTableDragRowInfo.row : null);
|
|
145
150
|
if (rowOpts.drag || columnOpts.drag) {
|
|
146
151
|
return h('div', {
|
|
147
152
|
class: 'vxe-table--drag-wrapper'
|
|
@@ -158,7 +163,7 @@ const renderDragTip = (h, $xeTable) => {
|
|
|
158
163
|
'is--guides': columnDragOpts.showGuidesStatus
|
|
159
164
|
}]
|
|
160
165
|
}),
|
|
161
|
-
(
|
|
166
|
+
(dRow && rowDragOpts.showDragTip) || (dragCol && columnDragOpts.showDragTip)
|
|
162
167
|
? h('div', {
|
|
163
168
|
ref: 'refDragTipElem',
|
|
164
169
|
class: 'vxe-table--drag-sort-tip'
|
|
@@ -170,7 +175,7 @@ const renderDragTip = (h, $xeTable) => {
|
|
|
170
175
|
class: 'vxe-table--drag-sort-tip-status'
|
|
171
176
|
}, [
|
|
172
177
|
h('span', {
|
|
173
|
-
class: ['vxe-table--drag-sort-tip-normal-status',
|
|
178
|
+
class: ['vxe-table--drag-sort-tip-normal-status', dRow ? getIcon().TABLE_DRAG_STATUS_ROW : getIcon().TABLE_DRAG_STATUS_COLUMN]
|
|
174
179
|
}),
|
|
175
180
|
h('span', {
|
|
176
181
|
class: ['vxe-table--drag-sort-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
@@ -699,9 +704,9 @@ export default {
|
|
|
699
704
|
resizeHeightFlag: 1,
|
|
700
705
|
resizeWidthFlag: 1,
|
|
701
706
|
isCustomStatus: false,
|
|
702
|
-
|
|
707
|
+
isCrossDragRow: false,
|
|
703
708
|
dragRow: null,
|
|
704
|
-
|
|
709
|
+
isCrossDragCol: false,
|
|
705
710
|
dragCol: null,
|
|
706
711
|
dragTipText: '',
|
|
707
712
|
isDragResize: false,
|
|
@@ -709,7 +714,8 @@ export default {
|
|
|
709
714
|
isColLoading: false,
|
|
710
715
|
reScrollFlag: 0,
|
|
711
716
|
reLayoutFlag: 0,
|
|
712
|
-
footFlag: 0
|
|
717
|
+
footFlag: 0,
|
|
718
|
+
crossTableDragRowInfo: crossTableDragRowGlobal
|
|
713
719
|
};
|
|
714
720
|
},
|
|
715
721
|
computed: Object.assign(Object.assign({}, {}), { tableId() {
|
|
@@ -1435,6 +1441,7 @@ export default {
|
|
|
1435
1441
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
1436
1442
|
const keyboardOpts = $xeTable.computeKeyboardOpts;
|
|
1437
1443
|
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
1444
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
1438
1445
|
const { groupFields } = aggregateOpts;
|
|
1439
1446
|
if (props.rowId) {
|
|
1440
1447
|
warnLog('vxe.error.delProp', ['row-id', 'row-config.keyField']);
|
|
@@ -1540,7 +1547,10 @@ export default {
|
|
|
1540
1547
|
}
|
|
1541
1548
|
}
|
|
1542
1549
|
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
1543
|
-
warnLog('vxe.error.notSupportProp', ['
|
|
1550
|
+
warnLog('vxe.error.notSupportProp', ['row-config.drag', 'tree-config.transform=false', 'tree-config.transform=true']);
|
|
1551
|
+
}
|
|
1552
|
+
if (treeConfig && rowDragOpts.isCrossTableDrag && !rowDragOpts.isCrossDrag) {
|
|
1553
|
+
errLog('vxe.error.reqSupportProp', ['tree-config & row-drag-config.isCrossTableDrag', 'row-drag-config.isCrossDrag']);
|
|
1544
1554
|
}
|
|
1545
1555
|
if (props.dragConfig) {
|
|
1546
1556
|
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config']);
|
|
@@ -1834,6 +1844,7 @@ export default {
|
|
|
1834
1844
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore } = reactData;
|
|
1835
1845
|
const { leftList, rightList } = columnStore;
|
|
1836
1846
|
const loadingSlot = slots.loading;
|
|
1847
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
1837
1848
|
const tableTipConfig = $xeTable.computeTableTipConfig;
|
|
1838
1849
|
const validTipConfig = $xeTable.computeValidTipConfig;
|
|
1839
1850
|
const validOpts = $xeTable.computeValidOpts;
|
|
@@ -1853,6 +1864,11 @@ export default {
|
|
|
1853
1864
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
1854
1865
|
const scrollbarXToTop = $xeTable.computeScrollbarXToTop;
|
|
1855
1866
|
const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft;
|
|
1867
|
+
const { isCrossTableDrag } = rowDragOpts;
|
|
1868
|
+
const rwOns = {};
|
|
1869
|
+
if (isCrossTableDrag && !tableData.length) {
|
|
1870
|
+
rwOns.onDragover = $xeTable.handleCrossTableRowDragoverEmptyEvent;
|
|
1871
|
+
}
|
|
1856
1872
|
return h('div', {
|
|
1857
1873
|
ref: 'refElem',
|
|
1858
1874
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
@@ -1919,7 +1935,8 @@ export default {
|
|
|
1919
1935
|
]),
|
|
1920
1936
|
h('div', {
|
|
1921
1937
|
key: 'tw',
|
|
1922
|
-
class: 'vxe-table--render-wrapper'
|
|
1938
|
+
class: 'vxe-table--render-wrapper',
|
|
1939
|
+
on: rwOns
|
|
1923
1940
|
}, scrollbarXToTop
|
|
1924
1941
|
? [
|
|
1925
1942
|
renderScrollX(h, $xeTable),
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED