vxe-table 3.13.14 → 3.14.0-beta.0
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/grid/src/grid.js +41 -31
- package/es/locale/lang/ar-EG.js +1 -0
- package/es/locale/lang/de-DE.js +1 -0
- package/es/locale/lang/en-US.js +3 -2
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/fr-FR.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/hy-AM.js +1 -0
- package/es/locale/lang/id-ID.js +1 -0
- package/es/locale/lang/it-IT.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/nb-NO.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/th-TH.js +1 -0
- package/es/locale/lang/ug-CN.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/table/module/custom/panel.js +18 -16
- package/es/table/module/edit/mixin.js +3 -1
- package/es/table/src/cell.js +2 -1
- package/es/table/src/methods.js +297 -178
- package/es/table/src/table.js +170 -165
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +41 -32
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +1743 -2683
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -2
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -2
- 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/fr-FR.js +1 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- 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/hy-AM.js +1 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/id-ID.js +1 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/it-IT.js +1 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- 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/nb-NO.js +1 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- 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/th-TH.js +1 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- 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/table/module/custom/panel.js +18 -16
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +3 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +312 -184
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +179 -180
- 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/grid/src/grid.ts +41 -31
- package/packages/locale/lang/ar-EG.ts +1 -0
- package/packages/locale/lang/de-DE.ts +1 -0
- package/packages/locale/lang/en-US.ts +3 -2
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/fr-FR.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/hy-AM.ts +1 -0
- package/packages/locale/lang/id-ID.ts +1 -0
- package/packages/locale/lang/it-IT.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/nb-NO.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/th-TH.ts +1 -0
- package/packages/locale/lang/ug-CN.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/panel.ts +22 -20
- package/packages/table/module/edit/mixin.ts +3 -1
- package/packages/table/src/cell.ts +2 -1
- package/packages/table/src/methods.ts +308 -182
- package/packages/table/src/table.ts +172 -165
- /package/es/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/es/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/es/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
- /package/lib/{iconfont.1740640529071.ttf → iconfont.1740732119954.ttf} +0 -0
- /package/lib/{iconfont.1740640529071.woff → iconfont.1740732119954.woff} +0 -0
- /package/lib/{iconfont.1740640529071.woff2 → iconfont.1740732119954.woff2} +0 -0
|
@@ -1067,12 +1067,13 @@ export default {
|
|
|
1067
1067
|
if (prevDragCol && dragCol) {
|
|
1068
1068
|
// 判断是否有拖动
|
|
1069
1069
|
if (prevDragCol !== dragCol) {
|
|
1070
|
-
const
|
|
1070
|
+
const dragColumn = dragCol;
|
|
1071
1071
|
const newColumn = prevDragCol;
|
|
1072
1072
|
Promise.resolve(dragEndMethod
|
|
1073
1073
|
? dragEndMethod({
|
|
1074
|
-
oldColumn,
|
|
1074
|
+
oldColumn: dragColumn,
|
|
1075
1075
|
newColumn,
|
|
1076
|
+
dragColumn,
|
|
1076
1077
|
dragPos: prevDragPos,
|
|
1077
1078
|
dragToChild: !!prevDragToChild,
|
|
1078
1079
|
offsetIndex: dragOffsetIndex
|
|
@@ -1084,13 +1085,13 @@ export default {
|
|
|
1084
1085
|
let oafIndex = -1;
|
|
1085
1086
|
let nafIndex = -1;
|
|
1086
1087
|
const oldAllMaps = {};
|
|
1087
|
-
XEUtils.eachTree([
|
|
1088
|
+
XEUtils.eachTree([dragColumn], column => {
|
|
1088
1089
|
oldAllMaps[column.id] = column;
|
|
1089
1090
|
});
|
|
1090
1091
|
let isSelfToChildStatus = false;
|
|
1091
1092
|
// 只有实时拖拽支持跨层级
|
|
1092
1093
|
if (immediate) {
|
|
1093
|
-
if (
|
|
1094
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
1094
1095
|
// 子到子
|
|
1095
1096
|
if (!isCrossDrag) {
|
|
1096
1097
|
return;
|
|
@@ -1108,7 +1109,7 @@ export default {
|
|
|
1108
1109
|
}
|
|
1109
1110
|
}
|
|
1110
1111
|
}
|
|
1111
|
-
else if (
|
|
1112
|
+
else if (dragColumn.parentId) {
|
|
1112
1113
|
// 子到根
|
|
1113
1114
|
if (!isCrossDrag) {
|
|
1114
1115
|
return;
|
|
@@ -1135,17 +1136,17 @@ export default {
|
|
|
1135
1136
|
else {
|
|
1136
1137
|
// 根到根
|
|
1137
1138
|
}
|
|
1138
|
-
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id ===
|
|
1139
|
+
const oldewMatchRest = XEUtils.findTree(collectColumn, item => item.id === dragColumn.id);
|
|
1139
1140
|
// 改变层级
|
|
1140
1141
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
1141
1142
|
if (oldewMatchRest) {
|
|
1142
1143
|
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
1143
|
-
const childList =
|
|
1144
|
+
const childList = dragColumn.children || [];
|
|
1144
1145
|
childList.forEach(column => {
|
|
1145
|
-
column.parentId =
|
|
1146
|
+
column.parentId = dragColumn.parentId;
|
|
1146
1147
|
});
|
|
1147
1148
|
oCols.splice(oIndex, 1, ...childList);
|
|
1148
|
-
|
|
1149
|
+
dragColumn.children = [];
|
|
1149
1150
|
}
|
|
1150
1151
|
}
|
|
1151
1152
|
else {
|
|
@@ -1162,12 +1163,12 @@ export default {
|
|
|
1162
1163
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
1163
1164
|
// 转子级
|
|
1164
1165
|
if ((isCrossDrag && isToChildDrag) && prevDragToChild) {
|
|
1165
|
-
|
|
1166
|
-
newColumn.children = (newColumn.children || []).concat([
|
|
1166
|
+
dragColumn.parentId = newColumn.id;
|
|
1167
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
1167
1168
|
}
|
|
1168
1169
|
else {
|
|
1169
|
-
|
|
1170
|
-
nCols.splice(nIndex + dragOffsetIndex, 0,
|
|
1170
|
+
dragColumn.parentId = newColumn.parentId;
|
|
1171
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn);
|
|
1171
1172
|
}
|
|
1172
1173
|
if (!nParent) {
|
|
1173
1174
|
nafIndex = nIndex;
|
|
@@ -1181,10 +1182,10 @@ export default {
|
|
|
1181
1182
|
});
|
|
1182
1183
|
}
|
|
1183
1184
|
else {
|
|
1184
|
-
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id ===
|
|
1185
|
+
oafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === dragColumn.id);
|
|
1185
1186
|
customColumnList.splice(oafIndex, 1);
|
|
1186
1187
|
nafIndex = XEUtils.findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
1187
|
-
customColumnList.splice(nafIndex + dragOffsetIndex, 0,
|
|
1188
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
1188
1189
|
}
|
|
1189
1190
|
reactData.isDragColMove = true;
|
|
1190
1191
|
if (mouseConfig) {
|
|
@@ -1197,8 +1198,9 @@ export default {
|
|
|
1197
1198
|
}
|
|
1198
1199
|
}
|
|
1199
1200
|
$xeTable.dispatchEvent('column-dragend', {
|
|
1200
|
-
oldColumn,
|
|
1201
|
+
oldColumn: dragColumn,
|
|
1201
1202
|
newColumn,
|
|
1203
|
+
dragColumn,
|
|
1202
1204
|
dragPos: prevDragPos,
|
|
1203
1205
|
offsetIndex: dragOffsetIndex,
|
|
1204
1206
|
_index: {
|
|
@@ -854,7 +854,9 @@ export default {
|
|
|
854
854
|
let isPos = false;
|
|
855
855
|
if (fieldOrColumn) {
|
|
856
856
|
isPos = true;
|
|
857
|
-
|
|
857
|
+
if (fieldOrColumn !== true) {
|
|
858
|
+
column = XEUtils.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
859
|
+
}
|
|
858
860
|
}
|
|
859
861
|
return handleEditCell($xeTable, row, column, isPos);
|
|
860
862
|
},
|
package/es/table/src/cell.js
CHANGED
|
@@ -81,12 +81,13 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
81
81
|
const { treeConfig, dragConfig } = tableProps;
|
|
82
82
|
const rowOpts = $table.computeRowOpts;
|
|
83
83
|
const rowDragOpts = $table.computeRowDragOpts;
|
|
84
|
+
const treeOpts = $table.computeTreeOpts;
|
|
84
85
|
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
|
|
85
86
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
86
87
|
const vns = XEUtils.isArray(content) ? content : [content];
|
|
87
88
|
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
88
89
|
if (treeConfig) {
|
|
89
|
-
if (isPeerDrag || isCrossDrag || !level) {
|
|
90
|
+
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
90
91
|
vns.unshift(renderCellDragIcon(h, params));
|
|
91
92
|
}
|
|
92
93
|
}
|