import { h } from "vue"; const icons = { search: { viewBox: "0 0 1024 1024", path: ` `, }, refresh: { viewBox: "0 0 1024 1024", path: ` `, }, more: { viewBox: "0 0 1024 1024", path: ` `, }, caiwu: { viewBox: "0 0 1024 1024", path: ` `, }, tongji: { viewBox: "0 0 1024 1024", path: ` `, }, shenpi: { viewBox: "0 0 1024 1024", path: ` `, }, svghome: { viewBox: "0 0 1024 1024", path: ` `, }, }; export default { install(app) { app.component("SvgIcon", { name: "SvgIcon", props: { name: { type: String, required: true }, size: { type: [String, Number], default: 12 }, color: { type: String, default: "#606266" }, }, render() { const icon = icons[this.name]; if (!icon) return null; return h("svg", { width: this.size, height: this.size, viewBox: icon.viewBox, fill: this.color, xmlns: "http://www.w3.org/2000/svg", innerHTML: icon.path, }); }, }); }, };