vueless 0.0.478 → 0.0.479
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 +12 -3
- package/web-types.json +1 -1
package/package.json
CHANGED
package/ui.image-icon/UIcon.vue
CHANGED
|
@@ -127,6 +127,12 @@ const emit = defineEmits([
|
|
|
127
127
|
const { config, iconAttrs } = useAttrs(props);
|
|
128
128
|
|
|
129
129
|
const generatedIcons = computed(() => {
|
|
130
|
+
if (isSSR) {
|
|
131
|
+
Object.entries(
|
|
132
|
+
import.meta.glob(`/assets/.vueless/icons/**/*.svg`, { eager: true, query: "?component" }),
|
|
133
|
+
) || [];
|
|
134
|
+
}
|
|
135
|
+
|
|
130
136
|
return (
|
|
131
137
|
Object.entries(
|
|
132
138
|
import.meta.glob(`../assets/icons/**/*.svg`, { eager: true, query: "?component" }),
|
|
@@ -157,9 +163,12 @@ const dynamicComponent = computed(() => {
|
|
|
157
163
|
if (!name) return "";
|
|
158
164
|
|
|
159
165
|
function getIcon(params) {
|
|
160
|
-
const [, component] =
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
const [, component] =
|
|
167
|
+
generatedIcons.value.find(([path]) =>
|
|
168
|
+
params.every(
|
|
169
|
+
(param) => (isFill || !path.includes(FILL_SUFFIX)) && path.includes(String(param)),
|
|
170
|
+
),
|
|
171
|
+
) || [];
|
|
163
172
|
|
|
164
173
|
return component;
|
|
165
174
|
}
|