浏览代码

feat: 支持外部重置大小监听器

wxl 6 年之前
父节点
当前提交
9375af49f5
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/components/grid.vue

+ 6 - 0
src/components/grid.vue

@@ -189,6 +189,12 @@
             }
         },
         methods: {
+            resetWatchBoxSize(){
+                this.boxWatchHandler.destroy();
+                this.boxWatchHandler = new watchBoxSize(this.$el, () => {
+                    this.initCols();
+                })
+            },
             bindEvents(){
                 this.eventHandler.mousedown = this.mousedown.bind(this);
                 this.eventHandler.mousemove = this.mousemove.bind(this);