SwitchItem-cc897f4c.js
1.29 KB
import{d as r,e as d,a8 as c,_ as l,$ as p,a0 as m,a1 as h,f as u,ad as f,a2 as _}from"./vue-5a35c3f5.js";import{h as g,c as C,_ as y}from"./index.js";import{b as v}from"./index-89fb8d68.js";import{aX as S}from"./antd-6b087f69.js";import"./index-76664154.js";import"./index-41c7d0dd.js";import"./index-08baf4f4.js";import"./useContentViewHeight-d0a5c58e.js";import"./useWindowSizeFn-cc2fb57c.js";import"./uniqBy-0cd5a663.js";import"./lock-f2fae4f2.js";const w=r({name:"SwitchItem",components:{Switch:S},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:Boolean}},setup(e){const{prefixCls:t}=g("setting-switch-item"),{t:n}=C(),a=d(()=>e.def?{checked:e.def}:{});function o(s){e.event&&v(e.event,s)}return{prefixCls:t,t:n,handleChange:o,getBindValue:a}}});function b(e,t,n,a,o,s){const i=c("Switch");return l(),p("div",{class:_(e.prefixCls)},[m("span",null,h(e.title),1),u(i,f(e.getBindValue,{onChange:e.handleChange,disabled:e.disabled,checkedChildren:e.t("layout.setting.on"),unCheckedChildren:e.t("layout.setting.off")}),null,16,["onChange","disabled","checkedChildren","unCheckedChildren"])],2)}const X=y(w,[["render",b],["__scopeId","data-v-6a9c2d6c"],["__file","E:/allcode/erp/test7901/order-erp-front/src/layouts/default/setting/components/SwitchItem.vue"]]);export{X as default};