修复粘贴功能
This commit is contained in:
parent
f217adec10
commit
7bcae39c0f
@ -33,7 +33,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleOnPaste"
|
@click="handleOnPaste(scope.row.type)"
|
||||||
v-if="canCopyMenuTypes.includes(scope.row.type)"
|
v-if="canCopyMenuTypes.includes(scope.row.type)"
|
||||||
>粘贴</el-button
|
>粘贴</el-button
|
||||||
>
|
>
|
||||||
@ -337,7 +337,9 @@ export default {
|
|||||||
}
|
}
|
||||||
arr[typePos].typeSpan.rowspan += 1;
|
arr[typePos].typeSpan.rowspan += 1;
|
||||||
}
|
}
|
||||||
lastNameHit = arr[arr.length - 1].name === cur.name;
|
lastNameHit =
|
||||||
|
arr[arr.length - 1].name === cur.name &&
|
||||||
|
arr[arr.length - 1].type === cur.type;
|
||||||
if (lastNameHit) {
|
if (lastNameHit) {
|
||||||
let namePos = arr.length - 1;
|
let namePos = arr.length - 1;
|
||||||
for (let i = namePos; i >= 0; i--) {
|
for (let i = namePos; i >= 0; i--) {
|
||||||
@ -460,12 +462,12 @@ export default {
|
|||||||
this.$message.error(err);
|
this.$message.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOnPaste() {
|
handleOnPaste(type) {
|
||||||
// console.log(this.copyData);
|
// console.log(this.copyData);
|
||||||
if (this.copyData) {
|
if (this.copyData) {
|
||||||
this.addDishes({
|
this.addDishes({
|
||||||
num: this.num,
|
num: this.num,
|
||||||
data: this.copyData,
|
data: { ...this.copyData, type },
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.$message.error(err);
|
this.$message.error(err);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user