Files
chazhi_admin_broker/public/h5/assets/wd-badge.B92bS3IB.js
2026-03-11 18:24:59 +08:00

2 lines
1.6 KiB
JavaScript

var C=Object.defineProperty,N=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var m=(s,e,a)=>e in s?C(s,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[e]=a,n=(s,e)=>{for(var a in e||(e={}))B.call(e,a)&&m(s,a,e[a]);if(p)for(var a of p(e))k.call(e,a)&&m(s,a,e[a]);return s},d=(s,e)=>N(s,S(e));import{a4 as i,aJ as D,a5 as P,a6 as x,d as V,T as u,bC as T,at as c,a7 as g,a8 as $,c as b,j as f,w as _,aq as j,af as z,l as I,aa as y,s as h,m as Z,t as q,x as G}from"./index-B-O76M86.js";const H=d(n({},x),{modelValue:i,showZero:P(!1),bgColor:String,max:Number,isDot:Boolean,hidden:Boolean,type:D(void 0),top:i,right:i}),J={name:"wd-badge",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"}},U=V(d(n({},J),{props:H,setup(s){const e=s,a=u(()=>{const{modelValue:o,max:l,isDot:r}=e;if(r)return"";let t=o;return t&&l&&T(t)&&!Number.isNaN(t)&&!Number.isNaN(l)&&(t=l<t?`${l}+`:t),t}),v=u(()=>{const o={};return c(e.bgColor)&&(o.backgroundColor=e.bgColor),c(e.top)&&(o.top=g(e.top)),c(e.right)&&(o.right=g(e.right)),$(o)}),w=u(()=>!e.hidden&&(a.value||a.value===0&&e.showZero||e.isDot));return(o,l)=>{const r=I;return f(),b(r,{class:h(["wd-badge",o.customClass]),style:y(o.customStyle)},{default:_(()=>[j(o.$slots,"default",{},void 0,!0),w.value?(f(),b(r,{key:0,class:h(["wd-badge__content","is-fixed",o.type?"wd-badge__content--"+o.type:"",o.isDot?"is-dot":""]),style:y(v.value)},{default:_(()=>[Z(q(a.value),1)]),_:1},8,["class","style"])):z("",!0)]),_:3},8,["class","style"])}}})),F=G(U,[["__scopeId","data-v-019b04f1"]]);export{F as w};