whyczyk
2021-03-17 428d91bdd30da7e8ddc4549f9936e63862a59055
提交地图BUG修改
1个文件已修改
13 ■■■■■ 已修改文件
src/components/settingModular.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/settingModular.vue
@@ -100,11 +100,6 @@
            card.h = height;
            card.x = x;
            card.y = y;
            this.modularArr.map(item => {
              if (item.id == `chart${this.draggableActived.id}`) {
                item.resize();
              }
            })
          }
          return true;
        });
@@ -192,18 +187,20 @@
            item.y *= clientHeight;
            item.w *= clientWidth;
            item.h *= clientHeight;
            let nowBox = this.$refs[`layout-box${item.id}`];
            let modular = require(`./charts/${item.type}.vue`).default;
            let modularExtend = Vue.extend(modular);
            let chartModular = new modularExtend().$mount();
            chartModular.id = `chart${item.id}`;
            let nowBox = this.$refs[`layout-box${item.id}`];
            if (nowBox[0].children.length == 0) {
              nowBox[0].appendChild(chartModular.$el)
              this.modularArr.push(chartModular);
            }
            if (this.nowlayOut.isremoved) {
            } else {
              nowBox[0].replaceChild(chartModular.$el, nowBox[0].children[0])
            }
            // if (this.nowlayOut.isremoved) {
            //   nowBox[0].replaceChild(chartModular.$el, nowBox[0].children[0])
            // }
            chartModular.setData(item.setData);
            chartModular.resize();
          })