提交 75abcf91 authored 作者: jianglw's avatar jianglw

修改部分预览和列表加载bug

上级 bec10753
...@@ -36,16 +36,6 @@ export default { ...@@ -36,16 +36,6 @@ export default {
require: true, require: true,
}, },
}, },
watch: {
canvasData: {
handler(n, o) {
this.$nextTick(() => {
this.init();
});
},
deep: true,
},
},
data() { data() {
return { return {
canvas: {}, canvas: {},
...@@ -82,7 +72,7 @@ export default { ...@@ -82,7 +72,7 @@ export default {
// 或 用window.topology对象 === 上面的canvas // 或 用window.topology对象 === 上面的canvas
// topology.open(json); // topology.open(json);
// 4. 如果json发送变化,重绘 // 4. 如果json发送变化,重绘
this.canvas.render(); // this.canvas.render();
this.imgData = this.canvas.toImage(); this.imgData = this.canvas.toImage();
this.canvas.destroy(); this.canvas.destroy();
}, },
......
...@@ -87,11 +87,11 @@ export default { ...@@ -87,11 +87,11 @@ export default {
} }
this.canvas.open(this.topologyData); this.canvas.open(this.topologyData);
this.canvas.lock(2); this.canvas.lock(1);
// 或 用window.topology对象 === 上面的canvas // 或 用window.topology对象 === 上面的canvas
// topology.open(json); // topology.open(json);
// 4. 如果json发送变化,重绘 // 4. 如果json发送变化,重绘
this.canvas.render(); // this.canvas.render();
this.$nextTick(()=>{ this.$nextTick(()=>{
this.onSizeWindow(); this.onSizeWindow();
}) })
......
...@@ -315,6 +315,7 @@ export default { ...@@ -315,6 +315,7 @@ export default {
destroyed() { destroyed() {
document.removeEventListener("keydown", this.saveContent); document.removeEventListener("keydown", this.saveContent);
this.canvas.destroy(); this.canvas.destroy();
}, },
computed: { computed: {
scalecom: { scalecom: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论