image icon indicating copy to clipboard operation
image copied to clipboard

fallbackImage will not work when with a own placeholder image

Open Quineone opened this issue 2 years ago • 0 comments

<nuxt-img
  v-bind="$attrs"
  placeholder="/images/loading.svg'"
  @error="setFallbackImage"
/>

maybe:

mounted() {
    if (this.nPlaceholder) {
      ...
      img.onerror = () => {
        this.$refs.img.src = this.nMainSrc
        this.placeholderLoaded = true
      }
    }
    ...
  }

Quineone avatar Jul 26 '22 10:07 Quineone