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
|
@@ -11,6 +11,7 @@ import TableFooterComponent from './footer'
|
|
|
11
11
|
import { tableProps } from './props'
|
|
12
12
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
13
13
|
import { warnLog, errLog } from '../../ui/src/log'
|
|
14
|
+
import { crossTableDragRowGlobal, getCrossTableDragRowInfo } from './store'
|
|
14
15
|
import TableCustomPanelComponent from '../module/custom/panel'
|
|
15
16
|
import TableFilterPanelComponent from '../module/filter/panel'
|
|
16
17
|
import TableImportPanelComponent from '../module/export/import-panel'
|
|
@@ -134,6 +135,7 @@ function renderEmptyBody (h: CreateElement, $xeTable: VxeTableConstructor & VxeT
|
|
|
134
135
|
const renderDragTipContents = (h: CreateElement, $xeTable: VxeTableConstructor & VxeTablePrivateMethods) => {
|
|
135
136
|
const props = $xeTable
|
|
136
137
|
const reactData = $xeTable as unknown as TableReactData
|
|
138
|
+
const crossTableDragRowInfo = getCrossTableDragRowInfo($xeTable)
|
|
137
139
|
|
|
138
140
|
const { dragConfig } = props
|
|
139
141
|
const { dragRow, dragCol, dragTipText } = reactData
|
|
@@ -143,9 +145,10 @@ const renderDragTipContents = (h: CreateElement, $xeTable: VxeTableConstructor &
|
|
|
143
145
|
const rTipSlot = rowDragSlots.tip || (dragConfig && dragConfig.slots ? dragConfig.slots.rowTip : null)
|
|
144
146
|
const columnDragSlots = columnDragOpts.slots || {}
|
|
145
147
|
const cTipSlot = columnDragSlots.tip
|
|
148
|
+
const dRow = dragRow || (rowDragOpts.isCrossTableDrag ? crossTableDragRowInfo.row : null)
|
|
146
149
|
|
|
147
|
-
if (
|
|
148
|
-
return $xeTable.callSlot(rTipSlot, { row:
|
|
150
|
+
if (dRow && rTipSlot) {
|
|
151
|
+
return $xeTable.callSlot(rTipSlot, { row: dRow }, h)
|
|
149
152
|
}
|
|
150
153
|
if (dragCol && cTipSlot) {
|
|
151
154
|
return $xeTable.callSlot(cTipSlot, { column: dragCol }, h)
|
|
@@ -155,12 +158,14 @@ const renderDragTipContents = (h: CreateElement, $xeTable: VxeTableConstructor &
|
|
|
155
158
|
|
|
156
159
|
const renderDragTip = (h: CreateElement, $xeTable: VxeTableConstructor & VxeTablePrivateMethods) => {
|
|
157
160
|
const reactData = $xeTable as unknown as TableReactData
|
|
161
|
+
const crossTableDragRowInfo = getCrossTableDragRowInfo($xeTable)
|
|
158
162
|
|
|
159
163
|
const { dragRow, dragCol } = reactData
|
|
160
164
|
const rowOpts = $xeTable.computeRowOpts
|
|
161
165
|
const columnOpts = $xeTable.computeColumnOpts
|
|
162
166
|
const rowDragOpts = $xeTable.computeRowDragOpts
|
|
163
167
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
168
|
+
const dRow = dragRow || (rowDragOpts.isCrossTableDrag ? crossTableDragRowInfo.row : null)
|
|
164
169
|
|
|
165
170
|
if (rowOpts.drag || columnOpts.drag) {
|
|
166
171
|
return h('div', {
|
|
@@ -178,7 +183,7 @@ const renderDragTip = (h: CreateElement, $xeTable: VxeTableConstructor & VxeTabl
|
|
|
178
183
|
'is--guides': columnDragOpts.showGuidesStatus
|
|
179
184
|
}]
|
|
180
185
|
}),
|
|
181
|
-
(
|
|
186
|
+
(dRow && rowDragOpts.showDragTip) || (dragCol && columnDragOpts.showDragTip)
|
|
182
187
|
? h('div', {
|
|
183
188
|
ref: 'refDragTipElem',
|
|
184
189
|
class: 'vxe-table--drag-sort-tip'
|
|
@@ -190,7 +195,7 @@ const renderDragTip = (h: CreateElement, $xeTable: VxeTableConstructor & VxeTabl
|
|
|
190
195
|
class: 'vxe-table--drag-sort-tip-status'
|
|
191
196
|
}, [
|
|
192
197
|
h('span', {
|
|
193
|
-
class: ['vxe-table--drag-sort-tip-normal-status',
|
|
198
|
+
class: ['vxe-table--drag-sort-tip-normal-status', dRow ? getIcon().TABLE_DRAG_STATUS_ROW : getIcon().TABLE_DRAG_STATUS_COLUMN]
|
|
194
199
|
}),
|
|
195
200
|
h('span', {
|
|
196
201
|
class: ['vxe-table--drag-sort-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
@@ -740,9 +745,9 @@ export default {
|
|
|
740
745
|
|
|
741
746
|
isCustomStatus: false,
|
|
742
747
|
|
|
743
|
-
|
|
748
|
+
isCrossDragRow: false,
|
|
744
749
|
dragRow: null,
|
|
745
|
-
|
|
750
|
+
isCrossDragCol: false,
|
|
746
751
|
dragCol: null,
|
|
747
752
|
dragTipText: '',
|
|
748
753
|
|
|
@@ -752,7 +757,9 @@ export default {
|
|
|
752
757
|
|
|
753
758
|
reScrollFlag: 0,
|
|
754
759
|
reLayoutFlag: 0,
|
|
755
|
-
footFlag: 0
|
|
760
|
+
footFlag: 0,
|
|
761
|
+
|
|
762
|
+
crossTableDragRowInfo: crossTableDragRowGlobal
|
|
756
763
|
}
|
|
757
764
|
},
|
|
758
765
|
computed: {
|
|
@@ -1545,6 +1552,7 @@ export default {
|
|
|
1545
1552
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts
|
|
1546
1553
|
const keyboardOpts = $xeTable.computeKeyboardOpts
|
|
1547
1554
|
const aggregateOpts = $xeTable.computeAggregateOpts
|
|
1555
|
+
const rowDragOpts = $xeTable.computeRowDragOpts
|
|
1548
1556
|
const { groupFields } = aggregateOpts
|
|
1549
1557
|
|
|
1550
1558
|
if (props.rowId) {
|
|
@@ -1652,7 +1660,10 @@ export default {
|
|
|
1652
1660
|
}
|
|
1653
1661
|
}
|
|
1654
1662
|
if (treeConfig && rowOpts.drag && !treeOpts.transform) {
|
|
1655
|
-
warnLog('vxe.error.notSupportProp', ['
|
|
1663
|
+
warnLog('vxe.error.notSupportProp', ['row-config.drag', 'tree-config.transform=false', 'tree-config.transform=true'])
|
|
1664
|
+
}
|
|
1665
|
+
if (treeConfig && rowDragOpts.isCrossTableDrag && !rowDragOpts.isCrossDrag) {
|
|
1666
|
+
errLog('vxe.error.reqSupportProp', ['tree-config & row-drag-config.isCrossTableDrag', 'row-drag-config.isCrossDrag'])
|
|
1656
1667
|
}
|
|
1657
1668
|
if (props.dragConfig) {
|
|
1658
1669
|
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config'])
|
|
@@ -1973,6 +1984,7 @@ export default {
|
|
|
1973
1984
|
const { isGroup, overflowX, overflowY, scrollXLoad, scrollYLoad, tableData, initStore, isRowGroupStatus, columnStore, filterStore, customStore } = reactData
|
|
1974
1985
|
const { leftList, rightList } = columnStore
|
|
1975
1986
|
const loadingSlot = slots.loading
|
|
1987
|
+
const rowDragOpts = $xeTable.computeRowDragOpts
|
|
1976
1988
|
const tableTipConfig = $xeTable.computeTableTipConfig
|
|
1977
1989
|
const validTipConfig = $xeTable.computeValidTipConfig
|
|
1978
1990
|
const validOpts = $xeTable.computeValidOpts
|
|
@@ -1992,6 +2004,11 @@ export default {
|
|
|
1992
2004
|
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
1993
2005
|
const scrollbarXToTop = $xeTable.computeScrollbarXToTop
|
|
1994
2006
|
const scrollbarYToLeft = $xeTable.computeScrollbarYToLeft
|
|
2007
|
+
const { isCrossTableDrag } = rowDragOpts
|
|
2008
|
+
const rwOns: Record<string, any> = {}
|
|
2009
|
+
if (isCrossTableDrag && !tableData.length) {
|
|
2010
|
+
rwOns.onDragover = $xeTable.handleCrossTableRowDragoverEmptyEvent
|
|
2011
|
+
}
|
|
1995
2012
|
return h('div', {
|
|
1996
2013
|
ref: 'refElem',
|
|
1997
2014
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${xID}`, `border--${tableBorder}`, `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
@@ -2058,7 +2075,8 @@ export default {
|
|
|
2058
2075
|
]),
|
|
2059
2076
|
h('div', {
|
|
2060
2077
|
key: 'tw',
|
|
2061
|
-
class: 'vxe-table--render-wrapper'
|
|
2078
|
+
class: 'vxe-table--render-wrapper',
|
|
2079
|
+
on: rwOns
|
|
2062
2080
|
}, scrollbarXToTop
|
|
2063
2081
|
? [
|
|
2064
2082
|
renderScrollX(h, $xeTable),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|