[Vuejs]-How to completely destroy a function on component closed?

0👍

instead of destroy the cropper, i just destroyed whole child component with v-if so when click the button it will remounted the components

0👍

  watch: {
    uploadedImage() {
      this.initialImage = this.uploadedImage;
      this.cropper.destroy(); //==> use destroy function here
      this.cropImage();
    },
  },

Leave a comment