Commit 28af9e3ea0f113bf2fab7e7631c0786faa8b0c1a

Authored by ww
1 parent 417e64f3

fix: 修复组态导入时图表组件未渲染示例

... ... @@ -378,17 +378,15 @@
378 378 /**
379 379 * @description 初始化图表
380 380 */
381   - // const openFileHandle = EditorUi.prototype.openFileHandle
382   - // EditorUi.prototype.openFileHandle = function () {
383   - // console.log('enter open file')
384   - // try {
385   - // openFileHandle.apply(this, arguments)
386   - // } finally {
387   - // console.log('openFileHandle')
388   - // const graph = this.editor.graph
389   - // Sidebar.prototype.initChartInstance(graph)
390   - // }
391   - // }
  381 + const openFileHandle = EditorUi.prototype.openFileHandle
  382 + EditorUi.prototype.openFileHandle = function () {
  383 + try {
  384 + openFileHandle.apply(this, arguments)
  385 + } finally {
  386 + const graph = this.editor.graph
  387 + Sidebar.prototype.initChartInstance(graph)
  388 + }
  389 + }
392 390
393 391 /**
394 392 * @description 实例化 echarts
... ... @@ -416,7 +414,6 @@
416 414 // EditorUi.prototype.selectPage = function () {
417 415 // try {
418 416 // selectPage.apply(this, arguments)
419   -
420 417 // } finally {
421 418 // Sidebar.prototype.chartsInstanceMapping.clear()
422 419 // const graph = this.editor.graph
... ... @@ -948,9 +945,3 @@ function getFlowmeterType() {
948 945 CIRCLE: type.CIRCLE
949 946 }
950 947 }
951   -
952   -
953   -function getComponentType() {
954   - const componentType = Sidebar.prototype.enumComponentType
955   - return
956   -}
... ...