@politicalwatch/tipi-uikit 1.6.7 → 1.6.9
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
|
@@ -16,7 +16,10 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
data: function () {
|
|
18
18
|
return {
|
|
19
|
-
icons: import.meta.glob(
|
|
19
|
+
icons: import.meta.glob('../../assets/party_logos/icon/*.svg', {
|
|
20
|
+
as: 'raw',
|
|
21
|
+
eager: true,
|
|
22
|
+
}),
|
|
20
23
|
parties: {
|
|
21
24
|
Cs: {
|
|
22
25
|
name: 'Ciudadanos',
|
|
@@ -178,13 +181,15 @@ export default {
|
|
|
178
181
|
},
|
|
179
182
|
computed: {
|
|
180
183
|
svg() {
|
|
181
|
-
let svg;
|
|
182
|
-
if (this.party in this.parties) {
|
|
183
|
-
|
|
184
|
-
} else {
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
return
|
|
184
|
+
// let svg;
|
|
185
|
+
// if (this.party in this.parties) {
|
|
186
|
+
// svg = defineAsyncComponent(() => this.icons[`${this.parties[this.party].logo}.svg`]());
|
|
187
|
+
// } else {
|
|
188
|
+
// svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
|
|
189
|
+
// }
|
|
190
|
+
return this.party in this.parties
|
|
191
|
+
? this.icons[`${this.parties[this.party].logo}.svg`]
|
|
192
|
+
: defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
|
|
188
193
|
},
|
|
189
194
|
getBackground: function () {
|
|
190
195
|
const bg = this.parties[this.party]?.color ? this.parties[this.party].color : '#f4f6f8';
|