vueless 0.0.429 → 0.0.430
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 +1 -1
- package/ui.image-icon/UIcon.vue +13 -4
- package/web-types.json +1 -1
package/package.json
CHANGED
package/ui.image-icon/UIcon.vue
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
<script setup>
|
|
13
13
|
import { computed, defineAsyncComponent } from "vue";
|
|
14
14
|
import { getDefault } from "../utils/utilUI.js";
|
|
15
|
+
import { isSSR } from "../utils/utilHelper.js";
|
|
15
16
|
|
|
16
17
|
import { UIcon } from "./constants.js";
|
|
17
18
|
import defaultConfig from "./config.js";
|
|
@@ -168,24 +169,32 @@ const dynamicComponent = computed(() => {
|
|
|
168
169
|
"vueless": async () => {
|
|
169
170
|
return import.meta.env.PROD
|
|
170
171
|
? await getIcon([name])
|
|
171
|
-
:
|
|
172
|
+
: isSSR
|
|
173
|
+
? import(/* @vite-ignore */ `node_modules/vueless/assets/icons/${name}.svg?component`)
|
|
174
|
+
: import(/* @vite-ignore */ `../assets/icons/${name}.svg?component`);
|
|
172
175
|
},
|
|
173
176
|
"@material-symbols": async () => {
|
|
174
177
|
return import.meta.env.PROD
|
|
175
178
|
? await getIcon([library, weight, style, name])
|
|
176
|
-
:
|
|
179
|
+
: isSSR
|
|
180
|
+
? import(/* @vite-ignore */ `node_modules/${library}/svg-${weight}/${style}/${name}.svg?component`)
|
|
181
|
+
: import(/* @vite-ignore */ `/node_modules/${library}/svg-${weight}/${style}/${name}.svg?component`);
|
|
177
182
|
},
|
|
178
183
|
"bootstrap-icons": async () => {
|
|
179
184
|
return import.meta.env.PROD
|
|
180
185
|
? await getIcon([library, name])
|
|
181
|
-
:
|
|
186
|
+
: isSSR
|
|
187
|
+
? import(/* @vite-ignore */ `node_modules/${library}/icons/${name}.svg?component`)
|
|
188
|
+
: import(/* @vite-ignore */ `/node_modules/${library}/icons/${name}.svg?component`);
|
|
182
189
|
},
|
|
183
190
|
"heroicons": async () => {
|
|
184
191
|
const fillType = isFill ? "solid" : "outline";
|
|
185
192
|
|
|
186
193
|
return import.meta.env.PROD
|
|
187
194
|
? await getIcon([library, fillType, name])
|
|
188
|
-
:
|
|
195
|
+
: isSSR
|
|
196
|
+
? import(/* @vite-ignore */ `node_modules/${library}/24/${fillType}/${name}.svg?component`)
|
|
197
|
+
: import(/* @vite-ignore */ `/node_modules/${library}/24/${fillType}/${name}.svg?component`);
|
|
189
198
|
},
|
|
190
199
|
};
|
|
191
200
|
/* eslint-enable vue/max-len, prettier/prettier */
|