comand-component-library 3.3.19 → 3.3.20

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.3.19",
3
+ "version": "3.3.20",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -0,0 +1,2 @@
1
+ export * as de from "./flag-de.svg"
2
+ export * as en from "./flag-en.svg"
@@ -6,7 +6,7 @@
6
6
  <a v-if="language.link.type === 'href'" :href="language.link.path"
7
7
  :class="['flag', language.iso2, {'active': activeLanguage(language)}]"
8
8
  :title="language.tooltip"
9
- @click="$emit('click', { originalEvent: $event, language} )">
9
+ @click="$emit('click', { originalEvent: $event, language} )">
10
10
  <img :src="imageSources[index]" :alt="language.name" />
11
11
  </a>
12
12
  <!-- end link-type 'href' -->
@@ -15,7 +15,7 @@
15
15
  <router-link v-else
16
16
  :class="['flag', language.iso2]"
17
17
  :to="getRoute(language)" :title="language.tooltip"
18
- @click="$emit('click', { originalEvent: $event, language})">
18
+ @click="$emit('click', { originalEvent: $event, language})">
19
19
  <img :src="imageSources[index]" :alt="language.name" />
20
20
  </router-link>
21
21
  <!-- end link-type 'router' -->
@@ -26,7 +26,7 @@
26
26
 
27
27
  <script>
28
28
  import {getRoute} from '../utilities.js'
29
-
29
+ import * as flags from "../assets/images/flags"
30
30
  export default {
31
31
  name: "CmdSwitchLanguage",
32
32
  emits: ["click"],
@@ -62,13 +62,14 @@ export default {
62
62
  const isoCode = item.iso2
63
63
 
64
64
  // get path of current flag
65
- const path = "../assets/images/flags/flag-" + isoCode + ".svg"
65
+ // const path = "../assets/images/flags/flag-" + isoCode + ".svg"
66
66
 
67
67
  // assign value of imported file (returns object with default-key)
68
- const { default: dynamicImage } = await import(/*@vite-ignore*/ path)
68
+ //const { default: dynamicImage } = await import(/* @vite-ignore */ path)
69
69
 
70
70
  // push image to data-property-array
71
- this.imageSources.push(dynamicImage)
71
+ // this.imageSources.push(dynamicImage)
72
+ this.imageSources.push(flags[isoCode].default)
72
73
  }
73
74
  )
74
75
  },