ll-package
Version:
2 lines (1 loc) • 1.51 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../assets/iconfont/iconfont.json.js"),f={class:"ll-icon-picker"},v={class:"ll-icon-picker-input-warpper"},m={class:"ll-icon-picker-container"},k=e.defineComponent({__name:"IconData",props:{icon:{}},setup(h){const r=e.inject("changeIcon"),t=e.ref(""),i=s.default.glyphs,c=e.ref(s.default.glyphs);e.watch(t,()=>{c.value=i.filter(n=>~n.font_class.indexOf(t.value))});const p=n=>{r(n.font_class)};return(n,l)=>{const a=e.resolveComponent("ll-icon"),u=e.resolveComponent("a-input"),_=e.resolveComponent("a-button"),d=e.resolveComponent("a-space");return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",v,[e.createVNode(u,{class:"ll-icon-picker-input",value:t.value,"onUpdate:value":l[0]||(l[0]=o=>t.value=o),allowClear:"",placeholder:"搜索..."},{prefix:e.withCtx(()=>[e.createVNode(a,{"icon-name":"icon-search"})]),_:1},8,["value"])]),e.createElementVNode("div",m,[e.createVNode(d,{size:[16,16],wrap:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createBlock(_,{key:o.icon_id,type:n.icon===o.font_class?"primary":"default",onClick:C=>p(o),class:"ll-icon-picker-button"},{icon:e.withCtx(()=>[e.createVNode(a,{"icon-name":"icon-"+o.font_class,style:{"font-size":"28px"}},null,8,["icon-name"])]),_:2},1032,["type","onClick"]))),128))]),_:1})])])}}});exports.default=k;
;