@politicalwatch/tipi-uikit 1.6.6 → 1.6.8
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,12 +181,13 @@ export default {
|
|
|
178
181
|
},
|
|
179
182
|
computed: {
|
|
180
183
|
svg() {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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) ? this.icons[`${this.parties[this.party].logo}.svg`] : defineAsyncComponent(() => import('../../assets/svg/icon-error.svg')):
|
|
187
191
|
},
|
|
188
192
|
getBackground: function () {
|
|
189
193
|
const bg = this.parties[this.party]?.color ? this.parties[this.party].color : '#f4f6f8';
|