Sfoglia il codice sorgente

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

wxl 6 anni fa
parent
commit
9375af49f5
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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);