@vuux/icons 1.0.0-beta.3 → 1.0.0-beta.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/dist/es/Icon.vue.mjs +16 -10
- package/dist/es/icon-groups.d.ts +2 -18
- package/dist/es/icon-groups.mjs +16 -16
- package/dist/es/icon-runtime.d.ts +1 -6
- package/dist/es/icon-runtime.mjs +22 -33
- package/dist/es/name-map.d.ts +981 -981
- package/dist/es/name-map.mjs +981 -981
- package/dist/lib/Icon.vue.cjs +1 -1
- package/dist/lib/icon-groups.cjs +1 -1
- package/dist/lib/icon-groups.d.ts +2 -18
- package/dist/lib/icon-runtime.cjs +1 -1
- package/dist/lib/icon-runtime.d.ts +1 -6
- package/dist/lib/name-map.cjs +1 -1
- package/dist/lib/name-map.d.ts +981 -981
- package/package.json +1 -1
package/dist/es/Icon.vue.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { loadIcon as
|
|
3
|
-
const y = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as c, shallowRef as n, watch as l, openBlock as i, createBlock as r, resolveDynamicComponent as m, mergeProps as s, createCommentVNode as u } from "vue";
|
|
2
|
+
import { loadIcon as h } from "./icon-runtime.mjs";
|
|
3
|
+
const y = /* @__PURE__ */ c({
|
|
4
4
|
__name: "Icon",
|
|
5
5
|
props: {
|
|
6
6
|
name: {},
|
|
@@ -8,15 +8,21 @@ const y = /* @__PURE__ */ a({
|
|
|
8
8
|
size: {},
|
|
9
9
|
opacity: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
() =>
|
|
15
|
-
async (
|
|
16
|
-
|
|
11
|
+
setup(e) {
|
|
12
|
+
const a = e, o = n(null);
|
|
13
|
+
return l(
|
|
14
|
+
() => a.name,
|
|
15
|
+
async (t) => {
|
|
16
|
+
o.value = await h(t);
|
|
17
17
|
},
|
|
18
18
|
{ immediate: !0 }
|
|
19
|
-
), (
|
|
19
|
+
), (t, f) => o.value ? (i(), r(m(o.value), s({ key: 0 }, t.$attrs, {
|
|
20
|
+
color: e.color,
|
|
21
|
+
fill: e.color,
|
|
22
|
+
width: e.size,
|
|
23
|
+
height: e.size,
|
|
24
|
+
opacity: e.opacity
|
|
25
|
+
}), null, 16, ["color", "fill", "width", "height", "opacity"])) : u("", !0);
|
|
20
26
|
}
|
|
21
27
|
});
|
|
22
28
|
export {
|
package/dist/es/icon-groups.d.ts
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Buildings: () => Promise<typeof import("./Buildings/icon-map")>;
|
|
4
|
-
Business: () => Promise<typeof import("./Business/icon-map")>;
|
|
5
|
-
Cloud: () => Promise<typeof import("./Cloud/icon-map")>;
|
|
6
|
-
Communication: () => Promise<typeof import("./Communication/icon-map")>;
|
|
7
|
-
Design: () => Promise<typeof import("./Design/icon-map")>;
|
|
8
|
-
Editor: () => Promise<typeof import("./Editor/icon-map")>;
|
|
9
|
-
Folder: () => Promise<typeof import("./Folder/icon-map")>;
|
|
10
|
-
Food: () => Promise<typeof import("./Food/icon-map")>;
|
|
11
|
-
Map: () => Promise<typeof import("./Map/icon-map")>;
|
|
12
|
-
Math: () => Promise<typeof import("./Math/icon-map")>;
|
|
13
|
-
Media: () => Promise<typeof import("./Media/icon-map")>;
|
|
14
|
-
Result: () => Promise<typeof import("./Result/icon-map")>;
|
|
15
|
-
Spinners: () => Promise<typeof import("./Spinners/icon-map")>;
|
|
16
|
-
System: () => Promise<typeof import("./System/icon-map")>;
|
|
17
|
-
User: () => Promise<typeof import("./User/icon-map")>;
|
|
18
|
-
};
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
export declare const iconGroups: Record<string, () => Promise<Component>>;
|
package/dist/es/icon-groups.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
const o = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
Cloud: () => import("./Cloud/icon-map.mjs").then((t) => t),
|
|
3
|
+
Folder: () => import("./Folder/icon-map.mjs").then((t) => t),
|
|
4
|
+
Food: () => import("./Food/icon-map.mjs").then((t) => t),
|
|
5
|
+
Communication: () => import("./Communication/icon-map.mjs").then((t) => t),
|
|
6
|
+
Media: () => import("./Media/icon-map.mjs").then((t) => t),
|
|
7
|
+
Business: () => import("./Business/icon-map.mjs").then((t) => t),
|
|
8
|
+
Result: () => import("./Result/icon-map.mjs").then((t) => t),
|
|
9
|
+
User: () => import("./User/icon-map.mjs").then((t) => t),
|
|
10
|
+
Math: () => import("./Math/icon-map.mjs").then((t) => t),
|
|
11
|
+
System: () => import("./System/icon-map.mjs").then((t) => t),
|
|
12
|
+
Editor: () => import("./Editor/icon-map.mjs").then((t) => t),
|
|
13
|
+
Map: () => import("./Map/icon-map.mjs").then((t) => t),
|
|
14
|
+
Buildings: () => import("./Buildings/icon-map.mjs").then((t) => t),
|
|
15
|
+
Design: () => import("./Design/icon-map.mjs").then((t) => t),
|
|
16
|
+
Spinners: () => import("./Spinners/icon-map.mjs").then((t) => t),
|
|
17
|
+
Arrows: () => import("./Arrows/icon-map.mjs").then((t) => t)
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
20
|
o as iconGroups
|
package/dist/es/icon-runtime.mjs
CHANGED
|
@@ -1,37 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { nameToGroupMap as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
async function
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
-
return console.warn(`[Icon]
|
|
11
|
-
const t =
|
|
1
|
+
import { iconGroups as p } from "./icon-groups.mjs";
|
|
2
|
+
import { nameToGroupMap as l } from "./name-map.mjs";
|
|
3
|
+
import { defineAsyncComponent as s } from "vue";
|
|
4
|
+
const c = /* @__PURE__ */ new Map();
|
|
5
|
+
async function M(o) {
|
|
6
|
+
if (c.has(o))
|
|
7
|
+
return c.get(o);
|
|
8
|
+
const r = l[o];
|
|
9
|
+
if (!r)
|
|
10
|
+
return console.warn(`[Icon] 未找到分组: ${o}`), null;
|
|
11
|
+
const t = p[r];
|
|
12
12
|
if (!t)
|
|
13
|
-
return console.warn(`[Icon]
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
loadingComponent: {
|
|
24
|
-
template: '<span style="opacity:.5">`···`</span>'
|
|
25
|
-
},
|
|
26
|
-
errorComponent: {
|
|
27
|
-
template: '<span style="color:red">×</span>'
|
|
28
|
-
},
|
|
29
|
-
onError(y, c, l, i) {
|
|
30
|
-
i <= 2 ? c() : l();
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
return e.set(o, s), s;
|
|
13
|
+
return console.warn(`[Icon] 分组加载失败: ${r}`), null;
|
|
14
|
+
try {
|
|
15
|
+
const n = (await t())[`${r}Map`];
|
|
16
|
+
if (!n || !n[o])
|
|
17
|
+
return console.warn(`[Icon] 图标未找到: ${o}`), null;
|
|
18
|
+
const e = s(n[o]);
|
|
19
|
+
return c.set(o, e), e;
|
|
20
|
+
} catch (u) {
|
|
21
|
+
return console.error(`[Icon] 加载失败: ${o}`, u), null;
|
|
22
|
+
}
|
|
34
23
|
}
|
|
35
24
|
export {
|
|
36
|
-
|
|
25
|
+
M as loadIcon
|
|
37
26
|
};
|