@redseed/redseed-ui-vue3 2.11.13 → 2.11.14
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
|
@@ -24,6 +24,10 @@ const props = defineProps({
|
|
|
24
24
|
type: Boolean,
|
|
25
25
|
default: false,
|
|
26
26
|
},
|
|
27
|
+
alt: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '',
|
|
30
|
+
},
|
|
27
31
|
})
|
|
28
32
|
|
|
29
33
|
const large = computed(() => props.largeUrl ?? props.originalUrl)
|
|
@@ -83,6 +87,7 @@ const imageClass = computed(() => [
|
|
|
83
87
|
'rsui-image',
|
|
84
88
|
{
|
|
85
89
|
'rsui-image--rounded': props.rounded,
|
|
90
|
+
'rsui-image--error': error.value,
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
])
|
|
@@ -116,16 +121,19 @@ const imageClass = computed(() => [
|
|
|
116
121
|
:media="media"
|
|
117
122
|
:srcset="srcset"
|
|
118
123
|
>
|
|
119
|
-
<img :src="originalUrl">
|
|
124
|
+
<img :src="originalUrl" :alt="alt">
|
|
120
125
|
</picture>
|
|
121
126
|
</div>
|
|
122
127
|
</template>
|
|
123
128
|
<style lang="scss" scoped>
|
|
124
129
|
.rsui-image {
|
|
125
|
-
@apply w-full h-full flex items-center justify-center
|
|
130
|
+
@apply w-full h-full flex items-center justify-center overflow-hidden;
|
|
126
131
|
&--rounded {
|
|
127
132
|
@apply rounded-lg;
|
|
128
133
|
}
|
|
134
|
+
&--error {
|
|
135
|
+
@apply bg-rsui-grey-100;
|
|
136
|
+
}
|
|
129
137
|
&__empty {
|
|
130
138
|
@apply flex items-center justify-center text-rsui-light;
|
|
131
139
|
}
|