@icsmui/icsmui
Version:
京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)
413 lines (412 loc) • 12.9 kB
JavaScript
import { defineComponent, useSlots, h as h$1, openBlock, createBlock, computed, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createTextVNode } from "vue";
const c$3 = "nut-icon", h = /* @__PURE__ */ defineComponent({
__name: "IconFont",
props: {
name: { type: String, default: "" },
size: { type: [String, Number], default: "" },
width: { type: [String, Number], default: "" },
height: { type: [String, Number], default: "" },
classPrefix: { type: String, default: "nut-icon" },
fontClassName: { type: String, default: "nutui-iconfont" },
color: { type: String, default: "" },
tag: { type: String, default: "i" }
},
setup(e) {
var a2;
const t = e, o = useSlots(), s = () => t.name ? t.name.indexOf("/") !== -1 : false, r = (n) => {
if (n)
return isNaN(Number(n)) ? String(n) : n + "px";
}, i2 = s();
let l2 = h$1(
i2 ? "img" : t.tag,
{
class: i2 ? `${c$3}__img` : `${t.fontClassName} ${c$3} ${t.classPrefix}-${t.name}`,
style: {
color: t.color,
fontSize: r(t.size),
width: r(t.width || t.size),
height: r(t.height || t.size)
},
src: i2 ? t.name : ""
},
(a2 = o.default) == null ? void 0 : a2.call(o)
);
const u = () => l2;
return (n, y) => (openBlock(), createBlock(u));
}
});
function S(e) {
return e.name = "IconFont", e.install = (t) => {
t.component("IconFont", e);
}, e;
}
S(h);
const a$2 = (r) => defineComponent({
props: {
class: { type: String, default: "" },
name: { type: String, default: r },
color: { type: String, default: "" },
width: { type: [String, Number], default: "" },
height: { type: [String, Number], default: "" }
},
setup(e) {
const n = (t) => {
if (t)
return isNaN(Number(t)) ? String(t) : t + "px";
}, o = computed(() => {
const t = "nut-icon";
return {
[e.class]: e.class,
[t]: true,
[t + "-" + e.name]: e.name
};
}), c2 = computed(() => {
const t = {};
return t.height = n(e.height), t.width = n(e.width), t.color = e.color, t;
});
return { classes: o, style: c2 };
}
}), l = (r, e) => {
const n = r.__vccOpts || r;
for (const [o, c2] of e)
n[o] = c2;
return n;
};
a$2("add-circle");
a$2("add-rectangle");
a$2("add");
a$2("after-sale-service");
a$2("agenda");
a$2("alarm");
a$2("angle-double-down");
a$2("angle-double-left");
a$2("angle-double-right");
a$2("angle-double-up");
a$2("apps");
a$2("arrow-circle-down");
a$2("arrow-circle-left");
a$2("arrow-circle-right");
a$2("arrow-circle-sort");
a$2("arrow-circle-transfer");
a$2("arrow-circle-up");
a$2("arrow-corner-left");
a$2("arrow-corner-right");
a$2("arrow-down");
a$2("arrow-down2");
a$2("arrow-exchange");
a$2("arrow-left");
a$2("arrow-move");
a$2("arrow-right");
a$2("arrow-size-6");
a$2("arrow-size-8");
a$2("arrow-transfer");
a$2("arrow-up");
a$2("arrow-up2");
a$2("ask");
a$2("badge-percent");
a$2("bell-off");
a$2("bell-ring");
a$2("bell-unread");
a$2("bell");
a$2("board");
a$2("book-mark");
a$2("book");
a$2("brightness");
a$2("brush");
a$2("calculator");
a$2("calendar");
a$2("camera-off");
a$2("camera");
a$2("cart-add");
a$2("cart-arrow-down");
a$2("cart-arrow-up");
a$2("cart-check");
a$2("cart-remove");
a$2("cart");
a$2("category");
a$2("check-checked");
a$2("check-disabled");
a$2("check-normal");
const a$1 = a$2("check"), i$5 = /* @__PURE__ */ createElementVNode("path", {
d: "M998.4 245.03c-219.43 153.6-398.63 332.8-552.23 552.23-40.23 58.51-128 54.86-164.57-3.66-69.49-106.06-149.94-186.51-256-256-51.2-32.91-18.29-113.37 40.23-98.74 117.03 21.94 208.46 69.49 292.57 146.28 157.26-190.17 358.4-340.11 588.8-435.2 62.17-25.6 106.06 58.51 51.2 95.09",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), p$5 = [
i$5
];
function m$4(e, _, d2, f2, h2, u) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(e.classes),
style: normalizeStyle(e.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, p$5, 6);
}
const k = /* @__PURE__ */ l(a$1, [["render", m$4]]);
a$2("checked");
a$2("checklist");
a$2("clock");
const c$2 = a$2("close"), i$4 = /* @__PURE__ */ createElementVNode("path", {
d: "M865.83 926.17a42.67 42.67 0 1 0 60.36-60.34L572.35 512l353.84-353.83a42.67 42.67 0 0 0-60.36-60.34L512 451.67 158.19 97.83a42.67 42.67 0 0 0-60.36 60.34L451.67 512 97.83 865.83a42.67 42.67 0 1 0 60.34 60.34L512 572.33z",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), p$4 = [
i$4
];
function m$3(e, _, d2, f2, u, h2) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(e.classes),
style: normalizeStyle(e.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, p$4, 6);
}
const v$1 = /* @__PURE__ */ l(c$2, [["render", m$3]]);
a$2("cloud");
a$2("comment");
a$2("complaint");
a$2("computer");
a$2("copy-check");
a$2("copy");
a$2("coupon");
a$2("credit-card");
a$2("darkness");
a$2("date");
a$2("del");
a$2("disk");
a$2("dongdong");
a$2("double-arrow-up");
a$2("download");
a$2("download2");
a$2("edit");
a$2("eye");
a$2("fabulous");
a$2("face-angry");
a$2("face-mild");
a$2("face-smile");
a$2("failure");
a$2("file");
a$2("filter-h");
a$2("filter-v");
a$2("filter");
a$2("find");
a$2("flag");
a$2("follow-add");
a$2("follow");
a$2("footprint");
a$2("gift");
a$2("github");
a$2("globe");
a$2("headphones");
a$2("health");
a$2("heart-fill");
a$2("heart");
a$2("help-polygon");
a$2("home");
a$2("horizontal");
a$2("image-error");
a$2("image-rectangle");
a$2("image");
a$2("internation");
a$2("invoice");
a$2("jd");
a$2("jdl");
a$2("jimi");
a$2("jingdou");
a$2("joy-smile");
a$2("layers");
const c$1 = a$2("left"), i$3 = /* @__PURE__ */ createElementVNode("path", {
d: "M642.973 1005.542 321.912 587.098a123.28 123.28 0 0 1 0-150.17l321.06-418.443a47.182 47.182 0 0 1 74.83 57.422l-321.088 418.47a28.994 28.994 0 0 0 0 35.3l321.088 418.47a47.155 47.155 0 0 1-74.83 57.395",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), p$3 = [
i$3
];
function f(e, m2, _, d2, u, h2) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(e.classes),
style: normalizeStyle(e.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, p$3, 6);
}
const v = /* @__PURE__ */ l(c$1, [["render", f]]);
a$2("link");
a$2("list");
const c = a$2("loading"), i$2 = /* @__PURE__ */ createElementVNode("path", {
d: "M512 73.14a43.89 43.89 0 0 1 43.89 43.89v118.49a43.89 43.89 0 0 1-87.78 0V117.03A43.89 43.89 0 0 1 512 73.14M201.65 201.65a43.89 43.89 0 0 1 62.1 0l83.68 83.83a43.89 43.89 0 1 1-62.03 62.02l-83.75-83.75a43.89 43.89 0 0 1 0-62.1m620.7 0a43.89 43.89 0 0 1 0 62.1l-83.83 83.68a43.89 43.89 0 1 1-62.02-62.03l83.75-83.82a43.89 43.89 0 0 1 62.1 0zM73.14 512a43.89 43.89 0 0 1 43.89-43.89h118.49a43.89 43.89 0 0 1 0 87.78H117.03A43.89 43.89 0 0 1 73.14 512m671.45 0a43.89 43.89 0 0 1 43.89-43.89h118.49a43.89 43.89 0 1 1 0 87.78H788.48A43.89 43.89 0 0 1 744.59 512M347.5 676.5a43.89 43.89 0 0 1 0 62.02l-83.75 83.83a43.89 43.89 0 1 1-62.1-62.1l83.83-83.68a43.89 43.89 0 0 1 62.02 0zm329 0a43.89 43.89 0 0 1 62.02 0l83.83 83.75a43.89 43.89 0 1 1-62.1 62.1l-83.68-83.83a43.89 43.89 0 0 1 0-62.02zM512 744.59a43.89 43.89 0 0 1 43.89 43.89v118.49a43.89 43.89 0 1 1-87.78 0V788.48A43.89 43.89 0 0 1 512 744.59",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), m$2 = [
i$2
];
function p$2(a2, d2, _, f2, h2, g2) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(a2.classes),
style: normalizeStyle(a2.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, m$2, 6);
}
const w = /* @__PURE__ */ l(c, [["render", p$2]]);
a$2("loading1");
a$2("loading2");
const i$1 = a$2("location"), p$1 = /* @__PURE__ */ createElementVNode("path", {
d: "M682.67 470.04c0 94.4-76.42 170.94-170.67 170.94s-170.67-76.54-170.67-170.94S417.75 299.12 512 299.11s170.67 76.52 170.67 170.93m-85.34 0A85.4 85.4 0 0 0 512 384.58c-47.15 0-85.33 38.27-85.33 85.46A85.4 85.4 0 0 0 512 555.5c47.15 0 85.33-38.25 85.33-85.46",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), m$1 = /* @__PURE__ */ createElementVNode("path", {
d: "M981.33 470.04c0 277.76-312.75 465.73-464.15 552.53a10.22 10.22 0 0 1-10.36 0C355.42 935.79 42.67 747.82 42.67 470.06 42.67 210.45 252.8 0 512 0s469.33 210.45 469.33 470.04m-85.33 0c0-212.39-171.93-384.58-384-384.58S128 257.64 128 470.04c0 106.24 60.52 202.73 151.85 288.85 74.6 70.4 161.98 126.46 232.15 167.89 70.19-41.43 157.55-97.49 232.15-167.89C835.46 672.77 896 576.28 896 470.04",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1);
function d(e, f2, _, u, h2, C) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(e.classes),
style: normalizeStyle(e.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, [
p$1,
createTextVNode(","),
m$1
], 6);
}
const g$1 = /* @__PURE__ */ l(i$1, [["render", d]]);
const a = a$2("location2"), i = /* @__PURE__ */ createElementVNode("path", {
d: "m530.286 1005.714-25.6-10.971c-36.572-14.629-58.515-25.6-73.143-36.572-102.4-84.114-164.572-135.314-193.829-171.885-43.885-51.2-76.8-91.429-106.057-142.629C95.086 577.83 76.8 504.686 76.8 431.543c0-117.029 43.886-226.743 128-307.2C285.257 43.886 394.971 0 512 0s226.743 43.886 310.857 128c84.114 80.457 128 190.171 128 307.2 0 73.143-18.286 146.286-54.857 212.114-25.6 43.886-58.514 91.429-106.057 142.629-29.257 32.914-87.772 84.114-197.486 171.886 0 0-7.314 7.314-18.286 10.971zM497.37 874.057s3.658 3.657 14.629 7.314c3.657-3.657 7.314-3.657 10.971-7.314C621.714 797.257 683.886 742.4 705.83 716.8c40.228-47.543 69.485-87.771 91.428-128 25.6-47.543 40.229-102.4 40.229-157.257 0-87.772-32.915-168.229-95.086-230.4-58.514-58.514-142.629-91.429-230.4-91.429S340.114 142.63 277.943 204.8c-62.172 62.171-95.086 142.629-95.086 230.4 0 54.857 14.629 109.714 40.229 157.257 25.6 43.886 54.857 80.457 95.085 124.343 25.6 29.257 84.115 80.457 179.2 157.257m18.286-248.686c-102.4 0-182.857-80.457-182.857-182.857s80.457-182.857 182.857-182.857 182.857 80.457 182.857 182.857-80.457 182.857-182.857 182.857m0-256c-40.228 0-73.143 32.915-73.143 73.143s32.915 73.143 73.143 73.143 73.143-32.914 73.143-73.143-32.914-73.143-73.143-73.143",
fill: "currentColor",
"fill-opacity": "0.9"
}, null, -1), m = [
i
];
function p(e, _, d2, f2, u, C) {
return openBlock(), createElementBlock("svg", {
class: normalizeClass(e.classes),
style: normalizeStyle(e.style),
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 1024 1024",
role: "presentation"
}, m, 6);
}
const g = /* @__PURE__ */ l(a, [["render", p]]);
a$2("lock");
a$2("login");
a$2("logistics-error");
a$2("logout");
a$2("lower");
a$2("mail");
a$2("marshalling");
a$2("mask-close");
a$2("maximize");
a$2("message");
a$2("microphone-mute");
a$2("microphone");
a$2("minimize");
a$2("minus");
a$2("more");
a$2("mouse");
a$2("network-error");
a$2("no-receive");
a$2("notepad");
a$2("notice");
a$2("order");
a$2("orderlist");
a$2("package-add");
a$2("package-arrow-down");
a$2("package-arrow-up");
a$2("package-check");
a$2("package-delete");
a$2("package");
a$2("people");
a$2("phone");
a$2("photograph");
a$2("picked-up");
a$2("pin");
a$2("play-circle-fill");
a$2("play-double-back");
a$2("play-double-forward");
a$2("play-start");
a$2("play-stop");
a$2("plugin");
a$2("plus");
a$2("power");
a$2("poweroff-circle-fill");
a$2("presentation");
a$2("processing");
a$2("purse");
a$2("qr-code");
a$2("receipt");
a$2("received");
a$2("refresh");
a$2("refund");
a$2("reload");
a$2("remove-rectangle");
a$2("required");
a$2("retweet");
a$2("reward");
a$2("scan");
a$2("screen-little");
a$2("search");
a$2("service");
a$2("setting");
a$2("share");
a$2("shield-check");
a$2("shield-warning");
a$2("shield");
a$2("shop");
a$2("shopping-add");
a$2("shopping-check");
a$2("shopping-follow");
a$2("shopping-minus");
a$2("shopping-remove");
a$2("shopping");
a$2("sort-v");
a$2("star-fill");
a$2("star");
a$2("store");
a$2("success");
a$2("tag");
a$2("target");
a$2("thumbs-down");
a$2("thumbs-up");
a$2("ticket");
a$2("tips");
a$2("to-pay");
a$2("to-receive");
a$2("top");
a$2("transit");
a$2("trash");
a$2("triangle-down");
a$2("triangle-up");
a$2("truck");
a$2("undo");
a$2("unlink");
a$2("unlock");
a$2("upload");
a$2("user-add");
a$2("user");
a$2("video");
a$2("voice");
a$2("volume-max");
a$2("volume-mute");
a$2("voucher");
a$2("wait-receive");
a$2("wallet");
a$2("warning-polygon");
a$2("warning");
a$2("zoom-in");
a$2("zoom-out");
export {
g as a,
v as b,
g$1 as g,
k,
v$1 as v,
w
};