UNPKG

@nutui/icons-vue

Version:

京东风格的轻量级移动端 Vue 组件库 NutUI 图标包

37 lines (36 loc) 890 B
import { defineComponent as i, computed as s } from "vue"; const a = (r) => i({ 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 = s(() => { const t = "nut-icon"; return { [e.class]: e.class, [t]: !0, [t + "-" + e.name]: e.name }; }), c = s(() => { const t = {}; return t.height = n(e.height), t.width = n(e.width), t.color = e.color, t; }); return { classes: o, style: c }; } }), l = (r, e) => { const n = r.__vccOpts || r; for (const [o, c] of e) n[o] = c; return n; }; export { l as _, a as d };