|
@@ -326,16 +326,19 @@ export default {
|
|
|
multi_goods_mode: this.canvasForm.multi_goods_mode || '',
|
|
multi_goods_mode: this.canvasForm.multi_goods_mode || '',
|
|
|
max_goods_count: this.canvasForm.multi_goods_mode ? (this.canvasForm.max_goods_count || null) : null,
|
|
max_goods_count: this.canvasForm.multi_goods_mode ? (this.canvasForm.max_goods_count || null) : null,
|
|
|
})
|
|
})
|
|
|
|
|
+ const oldIndex = this.index
|
|
|
const nextIndex = this.data.length - 1
|
|
const nextIndex = this.data.length - 1
|
|
|
- this.$emit('update:index',nextIndex)
|
|
|
|
|
- if(nextIndex === this.index){
|
|
|
|
|
|
|
+ this.handleSelectCanvas(nextIndex)
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.init()
|
|
this.init()
|
|
|
// 新增画布后也需要滚动
|
|
// 新增画布后也需要滚动
|
|
|
- this.scrollToCanvas(nextIndex)
|
|
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ this.handleSelectCanvas(oldIndex)
|
|
|
|
|
+ },100)
|
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
|
+ this.handleSelectCanvas(nextIndex)
|
|
|
|
|
+ },200)
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
-/* this.index = this.data.length - 1*/
|
|
|
|
|
this.canvasForm.visible = false;
|
|
this.canvasForm.visible = false;
|
|
|
}else{
|
|
}else{
|
|
|
|
|
|