|
|
@@ -586,16 +586,17 @@ export default {
|
|
|
})
|
|
|
const oldIndex = this.index
|
|
|
const nextIndex = this.data.length - 1
|
|
|
- this.handleSelectCanvas(nextIndex)
|
|
|
+ this.$emit('update:index',nextIndex)
|
|
|
this.$nextTick(() => {
|
|
|
- this.init()
|
|
|
// 新增画布后也需要滚动
|
|
|
setTimeout(()=>{
|
|
|
- this.handleSelectCanvas(oldIndex)
|
|
|
- },100)
|
|
|
+ this.$emit('update:index',oldIndex)
|
|
|
+ },10)
|
|
|
setTimeout(()=>{
|
|
|
- this.handleSelectCanvas(nextIndex)
|
|
|
- },200)
|
|
|
+ this.$emit('update:index',nextIndex)
|
|
|
+ },300)
|
|
|
+
|
|
|
+ this.init()
|
|
|
})
|
|
|
this.canvasForm.visible = false;
|
|
|
}else{
|