|
|
@@ -457,6 +457,7 @@
|
|
|
if (item.colspanKey.length) {
|
|
|
this.columns.forEach((cell) => {
|
|
|
cell.forEach((row) => {
|
|
|
+
|
|
|
if (item.colspanKey.includes(row.id)) {
|
|
|
width += Number(row.style.width);
|
|
|
}
|
|
|
@@ -541,13 +542,13 @@
|
|
|
copy() {
|
|
|
let columns = JSON.parse(JSON.stringify(this.columns));
|
|
|
columns.forEach((item, index) => {
|
|
|
- item.forEach((cell, _index) => {
|
|
|
- if (cell.colspanKey.length) {
|
|
|
- cell.colspanKey.forEach((key, index) => {
|
|
|
+ item.forEach((cell) => {
|
|
|
+ if (cell.colspanKey.length&&!cell.copyId) {
|
|
|
+ cell.colspanKey.forEach((key, _index) => {
|
|
|
let id = generateRandomString(5);
|
|
|
let { columnIndex, rowIndex } = this.getIndex(key);
|
|
|
columns[columnIndex][rowIndex]['copyId'] = id;
|
|
|
- cell.colspanKey[index] = id;
|
|
|
+ cell.colspanKey[_index] = id;
|
|
|
});
|
|
|
}
|
|
|
if (cell.copyId) {
|