wave-ui 3.23.0 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-ui",
3
- "version": "3.23.0",
3
+ "version": "3.24.0",
4
4
  "description": "A UI framework for Vue.js 3 (and 2) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -1,5 +1,10 @@
1
1
  <template lang="pug">
2
- component.w-image(:is="wrapperTag" :class="wrapperClasses" :style="wrapperStyles")
2
+ component.w-image(
3
+ :is="wrapperTag"
4
+ ref="imageWrap"
5
+ :class="wrapperClasses"
6
+ :style="wrapperStyles"
7
+ @error="error = true")
3
8
  transition(:name="transition" appear)
4
9
  component.w-image__image(
5
10
  v-if="loaded"
@@ -60,6 +65,7 @@ export default {
60
65
  return {
61
66
  loading: false,
62
67
  loaded: false,
68
+ error: false,
63
69
  // The computed image source, and real image dimensions.
64
70
  computedImg: {
65
71
  src: '',
@@ -92,7 +98,8 @@ export default {
92
98
  return {
93
99
  'w-image--absolute': this.absolute,
94
100
  'w-image--fixed': this.fixed,
95
- 'w-image--has-ratio': this.normalized.ratio
101
+ 'w-image--has-ratio': this.normalized.ratio,
102
+ 'w-image--error': this.error
96
103
  }
97
104
  },
98
105
 
@@ -160,7 +167,8 @@ export default {
160
167
  return resolve(img)
161
168
  }
162
169
  img.onerror = error => {
163
- this.$emit('error', error)
170
+ this.error = true
171
+ this.$emit('error', error, this.$refs.imageWrap)
164
172
  // If a fallback is provided & not already trying to load it, load the fallback src.
165
173
  if (this.fallback && !loadFallback) {
166
174
  this.loading = false
@@ -410,7 +410,7 @@ $inactive-color: #777;
410
410
  border: $border;
411
411
  transition: border $transition-duration;
412
412
 
413
- .w-ui.h-auto & {height: auto;}
413
+ .w-input.h-auto & {height: auto;}
414
414
  .w-input--floating-label & {margin-top: 3 * $base-increment;}
415
415
  .w-input[class^="bdrs"] &, .w-input[class*=" bdrs"] & {border-radius: inherit;}
416
416