@politicalwatch/tipi-uikit 1.6.5 → 1.6.7
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,6 +16,7 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
data: function () {
|
|
18
18
|
return {
|
|
19
|
+
icons: import.meta.glob(`../../assets/party_logos/icon/*.svg`),
|
|
19
20
|
parties: {
|
|
20
21
|
Cs: {
|
|
21
22
|
name: 'Ciudadanos',
|
|
@@ -177,17 +178,11 @@ export default {
|
|
|
177
178
|
},
|
|
178
179
|
computed: {
|
|
179
180
|
svg() {
|
|
180
|
-
let svg
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
);
|
|
186
|
-
} else {
|
|
187
|
-
svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
|
|
188
|
-
}
|
|
189
|
-
} catch (error) {
|
|
190
|
-
svg = this.icon;
|
|
181
|
+
let svg;
|
|
182
|
+
if (this.party in this.parties) {
|
|
183
|
+
svg = defineAsyncComponent(() => this.icons[`${this.parties[this.party].logo}.svg`]());
|
|
184
|
+
} else {
|
|
185
|
+
svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
|
|
191
186
|
}
|
|
192
187
|
return svg;
|
|
193
188
|
},
|