SwitchItem.1da3060a.js 1.5 KB

1
  1. import{av as s,a as p,b as m,c as d,f as l,a_ as c,o as h,h as u,m as f,t as C,n as _,b0 as g,q as v}from"./index.386d9fb7.js";import{S as b}from"./index.2741d802.js";import{b as y}from"./index.82a61f10.js";import"./index.b36a1201.js";import"./index.0fd57566.js";import"./ArrowLeftOutlined.f1e0008b.js";import"./index.aed3fcbc.js";import"./index.a81048fc.js";import"./FullscreenOutlined.9b13e7c7.js";import"./index.3a7a7a02.js";import"./useWindowSizeFn.b46c26df.js";import"./useContentViewHeight.c723fc13.js";import"./uniqBy.3999e323.js";import"./_baseIteratee.3f358b05.js";import"./get.b8c3006a.js";import"./index.581efe0b.js";import"./useRefs.4d8307d4.js";import"./PlusOutlined.a5dd0864.js";import"./RedoOutlined.0f4a624f.js";import"./index.1a1e98a0.js";import"./TabPane.cca26f83.js";import"./lock.c03bf47d.js";const S=p({name:"SwitchItem",components:{Switch:b},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:Boolean}},setup(e){const{prefixCls:t}=m("setting-switch-item"),{t:o}=d(),n=l(()=>e.def?{checked:e.def}:{});function i(a){e.event&&y(e.event,a)}return{prefixCls:t,t:o,handleChange:i,getBindValue:n}}});function k(e,t,o,n,i,a){const r=c("Switch");return h(),u("div",{class:v(e.prefixCls)},[f("span",null,C(e.title),1),_(r,g(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)}var R=s(S,[["render",k],["__scopeId","data-v-fd7354e2"]]);export{R as default};