vxe-table 3.10.16 → 3.11.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/README.md +1 -1
- package/es/locale/lang/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +5 -1
- package/es/table/module/edit/mixin.js +32 -15
- package/es/table/src/body.js +40 -24
- package/es/table/src/cell.js +75 -32
- package/es/table/src/footer.js +159 -131
- package/es/table/src/header.js +128 -90
- package/es/table/src/methods.js +284 -65
- package/es/table/src/props.js +5 -1
- package/es/table/src/table.js +64 -20
- package/es/table/style.css +33 -20
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +9 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +33 -20
- package/es/vxe-table/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/index.umd.js +917 -449
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +5 -1
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/edit/mixin.js +34 -15
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/body.js +31 -15
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +82 -35
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/footer.js +198 -161
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +169 -128
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +313 -68
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +5 -1
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +70 -20
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +33 -20
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +9 -4
- 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 +33 -20
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/custom/mixin.ts +5 -1
- package/packages/table/module/edit/mixin.ts +32 -15
- package/packages/table/src/body.ts +43 -25
- package/packages/table/src/cell.ts +120 -67
- package/packages/table/src/footer.ts +164 -150
- package/packages/table/src/header.ts +136 -90
- package/packages/table/src/methods.ts +296 -67
- package/packages/table/src/props.ts +5 -1
- package/packages/table/src/table.ts +71 -19
- package/packages/ui/index.ts +8 -3
- package/styles/components/table.scss +42 -35
- /package/es/{iconfont.1731633464058.ttf → iconfont.1731937243466.ttf} +0 -0
- /package/es/{iconfont.1731633464058.woff → iconfont.1731937243466.woff} +0 -0
- /package/es/{iconfont.1731633464058.woff2 → iconfont.1731937243466.woff2} +0 -0
- /package/lib/{iconfont.1731633464058.ttf → iconfont.1731937243466.ttf} +0 -0
- /package/lib/{iconfont.1731633464058.woff → iconfont.1731937243466.woff} +0 -0
- /package/lib/{iconfont.1731633464058.woff2 → iconfont.1731937243466.woff2} +0 -0
|
@@ -98,6 +98,53 @@ function renderEmptyBody (h: CreateElement, _vm: any) {
|
|
|
98
98
|
return emptyContent
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
const renderDragTipContents = (h: CreateElement, $xeTable: any) => {
|
|
102
|
+
const props = $xeTable
|
|
103
|
+
const reactData = $xeTable
|
|
104
|
+
|
|
105
|
+
const { dragConfig } = props
|
|
106
|
+
const { dragRow, dragCol, dragTipText } = reactData
|
|
107
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts
|
|
108
|
+
const rowDragOpts = $xeTable.computeRowDragOpts
|
|
109
|
+
const rowDragSlots = rowDragOpts.slots || {}
|
|
110
|
+
const rTipSlot = rowDragSlots.tip || (dragConfig && dragConfig.slots ? dragConfig.slots.rowTip : null)
|
|
111
|
+
const columnDragSlots = columnDragOpts.slots || {}
|
|
112
|
+
const cTipSlot = columnDragSlots.tip
|
|
113
|
+
|
|
114
|
+
if (dragRow && rTipSlot) {
|
|
115
|
+
return $xeTable.callSlot(rTipSlot, { row: dragRow }, h)
|
|
116
|
+
}
|
|
117
|
+
if (dragCol && cTipSlot) {
|
|
118
|
+
return $xeTable.callSlot(cTipSlot, { column: dragCol }, h)
|
|
119
|
+
}
|
|
120
|
+
return [h('span', dragTipText)]
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const renderDragTip = (h: CreateElement, $xeTable: any) => {
|
|
124
|
+
const rowOpts = $xeTable.computeRowOpts
|
|
125
|
+
const columnOpts = $xeTable.computeColumnOpts
|
|
126
|
+
|
|
127
|
+
if (rowOpts.drag || columnOpts.drag) {
|
|
128
|
+
return h('div', {
|
|
129
|
+
class: 'vxe-table--drag-wrapper'
|
|
130
|
+
}, [
|
|
131
|
+
h('div', {
|
|
132
|
+
ref: 'refDragRowLineElem',
|
|
133
|
+
class: 'vxe-table--drag-row-line'
|
|
134
|
+
}),
|
|
135
|
+
h('div', {
|
|
136
|
+
ref: 'refDragColLineElem',
|
|
137
|
+
class: 'vxe-table--drag-col-line'
|
|
138
|
+
}),
|
|
139
|
+
h('div', {
|
|
140
|
+
ref: 'refDragTipElem',
|
|
141
|
+
class: 'vxe-table--drag-sort-tip'
|
|
142
|
+
}, renderDragTipContents(h, $xeTable))
|
|
143
|
+
])
|
|
144
|
+
}
|
|
145
|
+
return renderEmptyElement($xeTable)
|
|
146
|
+
}
|
|
147
|
+
|
|
101
148
|
function handleUupdateResize (_vm: any) {
|
|
102
149
|
const { $el } = _vm
|
|
103
150
|
if ($el && $el.clientWidth && $el.clientHeight) {
|
|
@@ -352,9 +399,15 @@ export default {
|
|
|
352
399
|
isHeader: false,
|
|
353
400
|
isFooter: false
|
|
354
401
|
},
|
|
402
|
+
|
|
403
|
+
scrollVMLoading: false,
|
|
355
404
|
isDragRowMove: false,
|
|
356
405
|
dragRow: null,
|
|
406
|
+
isDragColMove: false,
|
|
407
|
+
dragCol: null,
|
|
357
408
|
dragTipText: '',
|
|
409
|
+
|
|
410
|
+
_isResize: false,
|
|
358
411
|
_isLoading: false
|
|
359
412
|
}
|
|
360
413
|
},
|
|
@@ -433,8 +486,11 @@ export default {
|
|
|
433
486
|
computeRowOpts () {
|
|
434
487
|
return Object.assign({}, getConfig().table.rowConfig, this.rowConfig)
|
|
435
488
|
},
|
|
436
|
-
|
|
437
|
-
return Object.assign({}, getConfig().table.
|
|
489
|
+
computeRowDragOpts () {
|
|
490
|
+
return Object.assign({}, getConfig().table.rowDragConfig, this.rowDragConfig)
|
|
491
|
+
},
|
|
492
|
+
computeColumnDragOpts () {
|
|
493
|
+
return Object.assign({}, getConfig().table.columnDragConfig, this.columnDragConfig)
|
|
438
494
|
},
|
|
439
495
|
resizeOpts () {
|
|
440
496
|
return this.computeResizeOpts
|
|
@@ -857,7 +913,7 @@ export default {
|
|
|
857
913
|
if (this.rowOpts.height && !this.showOverflow) {
|
|
858
914
|
warnLog('vxe.error.notProp', ['table.show-overflow'])
|
|
859
915
|
}
|
|
860
|
-
if (!this.
|
|
916
|
+
if (!this.handleRecalculateCellAreas) {
|
|
861
917
|
if (this.clipConfig) {
|
|
862
918
|
warnLog('vxe.error.notProp', ['clip-config'])
|
|
863
919
|
}
|
|
@@ -869,6 +925,9 @@ export default {
|
|
|
869
925
|
return
|
|
870
926
|
}
|
|
871
927
|
}
|
|
928
|
+
if (this.dragConfig) {
|
|
929
|
+
warnLog('vxe.error.delProp', ['drag-config', 'row-drag-config'])
|
|
930
|
+
}
|
|
872
931
|
if (this.treeConfig && treeOpts.children) {
|
|
873
932
|
warnLog('vxe.error.delProp', ['tree-config.children', 'tree-config.childrenField'])
|
|
874
933
|
}
|
|
@@ -1064,7 +1123,6 @@ export default {
|
|
|
1064
1123
|
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
1065
1124
|
|
|
1066
1125
|
const $xeTable = this
|
|
1067
|
-
const reactData = $xeTable
|
|
1068
1126
|
|
|
1069
1127
|
const {
|
|
1070
1128
|
_e,
|
|
@@ -1084,6 +1142,7 @@ export default {
|
|
|
1084
1142
|
treeConfig,
|
|
1085
1143
|
mouseConfig,
|
|
1086
1144
|
mouseOpts,
|
|
1145
|
+
areaOpts,
|
|
1087
1146
|
computeSize,
|
|
1088
1147
|
validOpts,
|
|
1089
1148
|
showFooter,
|
|
@@ -1110,22 +1169,22 @@ export default {
|
|
|
1110
1169
|
loadingOpts,
|
|
1111
1170
|
editRules
|
|
1112
1171
|
} = $xeTable
|
|
1113
|
-
const { dragRow, dragTipText } = reactData
|
|
1114
1172
|
const { leftList, rightList } = columnStore
|
|
1115
1173
|
const currLoading = this._isLoading || loading
|
|
1116
1174
|
const vSize = computeSize
|
|
1117
|
-
const dragOpts = $xeTable.computeDragOpts
|
|
1118
1175
|
const virtualScrollBars = $xeTable.computeVirtualScrollBars
|
|
1119
|
-
const
|
|
1120
|
-
const rowTipSlot = dragSlots.rowTip
|
|
1176
|
+
const isArea = mouseConfig && mouseOpts.area
|
|
1121
1177
|
return h('div', {
|
|
1178
|
+
ref: 'refElem',
|
|
1122
1179
|
class: ['vxe-table', 'vxe-table--render-default', `tid_${tId}`, vSize ? `size--${vSize}` : '', `border--${tableBorder}`, {
|
|
1123
1180
|
[`valid-msg--${validOpts.msgMode}`]: !!editRules,
|
|
1124
1181
|
'vxe-editable': !!editConfig,
|
|
1125
1182
|
'old-cell-valid': editRules && getConfig().cellVaildMode === 'obsolete',
|
|
1126
1183
|
'cell--highlight': highlightCell,
|
|
1127
1184
|
'cell--selected': mouseConfig && mouseOpts.selected,
|
|
1128
|
-
'cell--area':
|
|
1185
|
+
'cell--area': isArea,
|
|
1186
|
+
'header-cell--area': isArea && areaOpts.selectCellByHeader,
|
|
1187
|
+
'body-cell--area': isArea && areaOpts.selectCellByBody,
|
|
1129
1188
|
'row--highlight': rowOpts.isHover || highlightHoverRow,
|
|
1130
1189
|
'column--highlight': columnOpts.isHover || highlightHoverColumn,
|
|
1131
1190
|
'checkbox--range': checkboxOpts.range,
|
|
@@ -1362,16 +1421,9 @@ export default {
|
|
|
1362
1421
|
})
|
|
1363
1422
|
: _e(),
|
|
1364
1423
|
/**
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
? h('div', {
|
|
1369
|
-
ref: 'refRowDragTipElem',
|
|
1370
|
-
class: 'vxe-table--row-drag-tip'
|
|
1371
|
-
}, rowTipSlot
|
|
1372
|
-
? (dragRow ? this.callSlot(rowTipSlot, { row: dragRow }, h) : [renderEmptyElement($xeTable)])
|
|
1373
|
-
: (dragTipText ? [h('span', dragTipText)] : [renderEmptyElement($xeTable)]))
|
|
1374
|
-
: _e(),
|
|
1424
|
+
* 拖拽提示
|
|
1425
|
+
*/
|
|
1426
|
+
renderDragTip(h, this),
|
|
1375
1427
|
h('div', {}, [
|
|
1376
1428
|
/**
|
|
1377
1429
|
* 提示相关
|
package/packages/ui/index.ts
CHANGED
|
@@ -43,8 +43,11 @@ VxeUI.setConfig({
|
|
|
43
43
|
// trigger: 'default'
|
|
44
44
|
strict: true
|
|
45
45
|
},
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
rowDragConfig: {
|
|
47
|
+
showIcon: true
|
|
48
|
+
},
|
|
49
|
+
columnDragConfig: {
|
|
50
|
+
showIcon: true
|
|
48
51
|
},
|
|
49
52
|
checkboxConfig: {
|
|
50
53
|
// trigger: 'default',
|
|
@@ -142,7 +145,8 @@ VxeUI.setConfig({
|
|
|
142
145
|
},
|
|
143
146
|
areaConfig: {
|
|
144
147
|
autoClear: true,
|
|
145
|
-
selectCellByHeader: true
|
|
148
|
+
selectCellByHeader: true,
|
|
149
|
+
selectCellByBody: true
|
|
146
150
|
},
|
|
147
151
|
clipConfig: {
|
|
148
152
|
isCopy: true,
|
|
@@ -241,6 +245,7 @@ VxeUI.setIcon({
|
|
|
241
245
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
242
246
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
243
247
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
248
|
+
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
244
249
|
|
|
245
250
|
// toolbar
|
|
246
251
|
TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
|
|
@@ -663,9 +663,13 @@
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
&.cell--area {
|
|
667
|
-
.vxe-table--
|
|
668
|
-
|
|
666
|
+
&.header-cell--area {
|
|
667
|
+
.vxe-table--header-wrapper {
|
|
668
|
+
user-select: none;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
&.body-cell--area {
|
|
672
|
+
.vxe-table--body-wrapper {
|
|
669
673
|
user-select: none;
|
|
670
674
|
}
|
|
671
675
|
}
|
|
@@ -1077,6 +1081,7 @@
|
|
|
1077
1081
|
width: 1px;
|
|
1078
1082
|
height: 100%;
|
|
1079
1083
|
z-index: 9;
|
|
1084
|
+
pointer-events: none;
|
|
1080
1085
|
cursor: col-resize;
|
|
1081
1086
|
&:before {
|
|
1082
1087
|
content: "";
|
|
@@ -1237,7 +1242,32 @@
|
|
|
1237
1242
|
}
|
|
1238
1243
|
}
|
|
1239
1244
|
|
|
1240
|
-
|
|
1245
|
+
/*拖拽列*/
|
|
1246
|
+
.vxe-table--drag-col-line {
|
|
1247
|
+
height: 100%;
|
|
1248
|
+
width: 1px;
|
|
1249
|
+
background-color: var(--vxe-ui-font-primary-color);
|
|
1250
|
+
}
|
|
1251
|
+
.vxe-header--column {
|
|
1252
|
+
&.col--drag-origin {
|
|
1253
|
+
& > .vxe-cell {
|
|
1254
|
+
opacity: 0.5;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
.vxe-header--col-list-move {
|
|
1259
|
+
transition: transform 0.35s;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.vxe-table--drag-col-line,
|
|
1263
|
+
.vxe-table--drag-row-line {
|
|
1264
|
+
display: none;
|
|
1265
|
+
position: absolute;
|
|
1266
|
+
top: 0;
|
|
1267
|
+
left: 0;
|
|
1268
|
+
z-index: 9;
|
|
1269
|
+
pointer-events: none;
|
|
1270
|
+
}
|
|
1241
1271
|
.vxe-cell--drag-handle {
|
|
1242
1272
|
user-select: none;
|
|
1243
1273
|
& + span {
|
|
@@ -1257,6 +1287,13 @@
|
|
|
1257
1287
|
cursor: not-allowed;
|
|
1258
1288
|
}
|
|
1259
1289
|
}
|
|
1290
|
+
|
|
1291
|
+
/*拖拽行*/
|
|
1292
|
+
.vxe-table--drag-row-line {
|
|
1293
|
+
width: 100%;
|
|
1294
|
+
height: 1px;
|
|
1295
|
+
background-color: var(--vxe-ui-font-primary-color);
|
|
1296
|
+
}
|
|
1260
1297
|
.vxe-body--row {
|
|
1261
1298
|
&.row--drag-origin {
|
|
1262
1299
|
& > .vxe-body--column {
|
|
@@ -1265,41 +1302,11 @@
|
|
|
1265
1302
|
}
|
|
1266
1303
|
}
|
|
1267
1304
|
}
|
|
1268
|
-
&.row--drag-active-target {
|
|
1269
|
-
& > .vxe-body--column {
|
|
1270
|
-
&::after {
|
|
1271
|
-
display: none;
|
|
1272
|
-
content: "";
|
|
1273
|
-
position: absolute;
|
|
1274
|
-
left: 0;
|
|
1275
|
-
width: 100%;
|
|
1276
|
-
height: 2px;
|
|
1277
|
-
background-color: var(--vxe-ui-font-primary-color);
|
|
1278
|
-
z-index: 12;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
&[drag-pos="top"] {
|
|
1282
|
-
& > .vxe-body--column {
|
|
1283
|
-
&::after {
|
|
1284
|
-
display: block;
|
|
1285
|
-
top: 0;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
&[drag-pos="bottom"] {
|
|
1290
|
-
& > .vxe-body--column {
|
|
1291
|
-
&::after {
|
|
1292
|
-
display: block;
|
|
1293
|
-
bottom: 0;
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
}
|
|
1298
1305
|
}
|
|
1299
1306
|
.vxe-body--row-list-move {
|
|
1300
1307
|
transition: transform 0.35s;
|
|
1301
1308
|
}
|
|
1302
|
-
.vxe-table--
|
|
1309
|
+
.vxe-table--drag-sort-tip {
|
|
1303
1310
|
display: none;
|
|
1304
1311
|
position: absolute;
|
|
1305
1312
|
top: 0;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|