"use strict";const e=require("./props.js"),i=require("../../libs/mixin/mpMixin.js"),o=require("../../libs/mixin/mixin.js"),t=require("../../libs/function/test.js"),s=require("../../../../common/vendor.js"),n={name:"u-tag",mixins:[i.mpMixin,o.mixin,e.props],data:()=>({}),computed:{style(){const e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.color&&(e.color=this.color),this.borderColor&&(e.borderColor=this.borderColor),e},textColor(){const e={};return this.color&&(e.color=this.color),e},imgStyle(){const e="large"===this.size?"17px":"medium"===this.size?"15px":"13px";return{width:e,height:e}},closeSize(){return"large"===this.size?15:"medium"===this.size?13:12},iconSize(){return"large"===this.size?21:"medium"===this.size?19:16},elIconColor(){return this.iconColor?this.iconColor:this.plain?this.type:"#ffffff"}},emits:["click","close"],methods:{testImage:t.test.image,closeHandler(){this.$emit("close",this.name)},clickHandler(){this.$emit("click",this.name)}}};if(!Array){(s.resolveComponent("u-icon")+s.resolveComponent("u-transition"))()}Math||((()=>"../u-icon/u-icon.js")+(()=>"../u-transition/u-transition.js"))();const r=s._export_sfc(n,[["render",function(e,i,o,t,n,r){return s.e({a:e.icon},e.icon?s.e({b:r.testImage(e.icon)},r.testImage(e.icon)?{c:e.icon,d:s.s(r.imgStyle)}:{e:s.p({color:r.elIconColor,name:e.icon,size:r.iconSize})}):{},{f:s.t(e.text),g:s.s(r.textColor),h:s.n(`u-tag__text--${e.type}`),i:s.n(e.plain&&`u-tag__text--${e.type}--plain`),j:s.n(`u-tag__text--${e.size}`),k:s.n(`u-tag--${e.shape}`),l:s.n(!e.plain&&`u-tag--${e.type}`),m:s.n(e.plain&&`u-tag--${e.type}--plain`),n:s.n(`u-tag--${e.size}`),o:s.n(e.plain&&e.plainFill&&`u-tag--${e.type}--plain--fill`),p:s.o(((...e)=>r.clickHandler&&r.clickHandler(...e))),q:s.s({marginRight:e.closable?"10px":0,marginTop:e.closable?"10px":0}),r:s.s(r.style),s:e.closable},e.closable?{t:s.p({name:"close",size:r.closeSize,color:"#ffffff"}),v:s.n(`u-tag__close--${e.size}`),w:s.o(((...e)=>r.closeHandler&&r.closeHandler(...e))),x:e.closeColor}:{},{y:s.p({mode:"fade",show:e.show})})}],["__scopeId","data-v-6108dc0d"]]);wx.createComponent(r);
