Checker.7cede1aa.js 2.8 KB

12345
  1. <<<<<<<< HEAD:dist/assets/Checker.7cede1aa.js
  2. import{O as v,u as g,z as P,d as C,N as S,av as z,v as y,R as x,y as r,c as d,a5 as B,U as D}from"./index.ffe80dbe.js";const R={name:v,shape:g("round"),disabled:Boolean,iconSize:P,modelValue:v,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var I=C({props:S({},R,{bem:z(Function),role:String,parent:Object,checked:Boolean,bindGroup:y}),emits:["click","toggle"],setup(e,{emit:s,slots:c}){const u=x(),l=n=>{if(e.parent&&e.bindGroup)return e.parent.props[n]},a=r(()=>l("disabled")||e.disabled),f=r(()=>l("direction")),m=r(()=>{const n=e.checkedColor||l("checkedColor");if(n&&e.checked&&!a.value)return{borderColor:n,backgroundColor:n}}),h=n=>{const{target:i}=n,o=u.value,t=o===i||(o==null?void 0:o.contains(i));!a.value&&(t||!e.labelDisabled)&&s("toggle"),s("click",n)},b=()=>{const{bem:n,shape:i,checked:o}=e,t=e.iconSize||l("iconSize");return d("div",{ref:u,class:n("icon",[i,{disabled:a.value,checked:o}]),style:{fontSize:D(t)}},[c.icon?c.icon({checked:o,disabled:a.value}):d(B,{name:"success",style:m.value},null)])},k=()=>{if(c.default)return d("span",{class:e.bem("label",[e.labelPosition,{disabled:a.value}])},[c.default()])};return()=>{const n=e.labelPosition==="left"?[k(),b()]:[b(),k()];return d("div",{role:e.role,class:e.bem([{disabled:a.value,"label-disabled":e.labelDisabled},f.value]),tabindex:a.value?void 0:0,"aria-checked":e.checked,onClick:h},[n])}}});export{R as c,I as s};
  3. ========
  4. import{O as v,u as g,z as P,d as C,N as S,aB as z,v as y,R as B,y as r,c as d,a5 as x,U as D}from"./index.1c621181.js";const R={name:v,shape:g("round"),disabled:Boolean,iconSize:P,modelValue:v,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var I=C({props:S({},R,{bem:z(Function),role:String,parent:Object,checked:Boolean,bindGroup:y}),emits:["click","toggle"],setup(e,{emit:s,slots:c}){const u=B(),l=n=>{if(e.parent&&e.bindGroup)return e.parent.props[n]},a=r(()=>l("disabled")||e.disabled),f=r(()=>l("direction")),m=r(()=>{const n=e.checkedColor||l("checkedColor");if(n&&e.checked&&!a.value)return{borderColor:n,backgroundColor:n}}),h=n=>{const{target:i}=n,o=u.value,t=o===i||(o==null?void 0:o.contains(i));!a.value&&(t||!e.labelDisabled)&&s("toggle"),s("click",n)},b=()=>{const{bem:n,shape:i,checked:o}=e,t=e.iconSize||l("iconSize");return d("div",{ref:u,class:n("icon",[i,{disabled:a.value,checked:o}]),style:{fontSize:D(t)}},[c.icon?c.icon({checked:o,disabled:a.value}):d(x,{name:"success",style:m.value},null)])},k=()=>{if(c.default)return d("span",{class:e.bem("label",[e.labelPosition,{disabled:a.value}])},[c.default()])};return()=>{const n=e.labelPosition==="left"?[k(),b()]:[b(),k()];return d("div",{role:e.role,class:e.bem([{disabled:a.value,"label-disabled":e.labelDisabled},f.value]),tabindex:a.value?void 0:0,"aria-checked":e.checked,onClick:h},[n])}}});export{R as c,I as s};
  5. >>>>>>>> online:dist/assets/Checker.6bb59ec3.js