vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
2 lines (1 loc) • 623 B
JavaScript
;const e=require("vue"),r=require("@vuux/icons"),c=e.defineComponent({name:"Tag",__name:"index",props:{type:{default:"primary"},icon:{},size:{default:11}},setup(t){const n=t,s=e.computed(()=>({"--tag-size":`${n.size}px`}));return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["app-tag",n.type]),style:e.normalizeStyle(s.value)},[e.renderSlot(o.$slots,"icon"),n.icon?(e.openBlock(),e.createBlock(e.unref(r.Icon),{key:0,name:n.icon,size:n.size+2,color:"rgb(255, 255, 255)"},null,8,["name","size"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")],6))}});module.exports=c;