@eturnity/eturnity_reusable_components 7.12.6-EPDM-7951.3 → 7.12.6-EPDM-7951.4
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
|
|
3
3
|
<icon-image :size="size" :color="color" :hoveredColor="hoveredColor">
|
|
4
|
-
<i v-html="
|
|
4
|
+
<i v-html="iconTest.html" />
|
|
5
5
|
</icon-image>
|
|
6
6
|
<striked-line
|
|
7
7
|
v-if="isStriked"
|
|
@@ -109,6 +109,16 @@ const props = defineProps({
|
|
|
109
109
|
|
|
110
110
|
const icon = reactive({ html: '' })
|
|
111
111
|
|
|
112
|
+
const iconTest = reactive({ html: '' })
|
|
113
|
+
const iconName = ''
|
|
114
|
+
const loadSvg = async (fileName = props.name) => {
|
|
115
|
+
fileName = fileName.toLowerCase()
|
|
116
|
+
const url = new URL(`../../assets/svgIcons/${fileName}.svg`, import.meta.url)
|
|
117
|
+
.href
|
|
118
|
+
const fetchResponse = await fetch(url)
|
|
119
|
+
iconTest.html = await fetchResponse.text()
|
|
120
|
+
}
|
|
121
|
+
|
|
112
122
|
const handleLoadAsyncIcon = async (iconName = props.name) => {
|
|
113
123
|
const iconPath = `../../assets/svgIcons/${props.name.toLowerCase()}.svg?raw`
|
|
114
124
|
const module = await import(/* @vite-ignore */ iconPath)
|
|
@@ -117,6 +127,7 @@ const handleLoadAsyncIcon = async (iconName = props.name) => {
|
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
onMounted(() => handleLoadAsyncIcon())
|
|
130
|
+
onMounted(() => loadSvg())
|
|
120
131
|
|
|
121
132
|
watch(() => props.name, handleLoadAsyncIcon)
|
|
122
133
|
</script>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
|
14
14
|
// <spinner size="30px" />
|
|
15
15
|
import styled from 'vue3-styled-components'
|
|
16
|
-
import SpinnerSvg from '../../assets/icons/black_spinner.svg'
|
|
16
|
+
import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
|
|
17
17
|
|
|
18
18
|
const SpinnerContainer = styled.div`
|
|
19
19
|
position: fixed;
|