lcny-vue3-antd-admin/dist/assets/SwitchItem.ed1a2ba8.js

2 lines
1.5 KiB
JavaScript

import{q as s,a as p,b as d,c as m,f as l,aC as c,o as h,h as u,i as f,t as C,p as g,aD as _,n as v}from"./index.b9edafc5.js";import{S as y}from"./index.42b29c86.js";import{b as S}from"./index.27f53be5.js";import"./index.c68a4867.js";import"./index.4c585e91.js";import"./ArrowLeftOutlined.70e6d78b.js";import"./index.0180ed58.js";import"./index.ca48e049.js";import"./FullscreenOutlined.6ed405b9.js";import"./index.a80f45e8.js";import"./useWindowSizeFn.163a2397.js";import"./useContentViewHeight.f1232089.js";import"./uniqBy.20331f76.js";import"./_baseIteratee.2ccd493f.js";import"./get.525b1412.js";import"./index.ed5889ff.js";import"./useRefs.6d27f120.js";import"./PlusOutlined.1ee62c6b.js";import"./RedoOutlined.864ed0d9.js";import"./index.95f26df7.js";import"./lock.2d61636a.js";const b=p({name:"SwitchItem",components:{Switch:y},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:Boolean}},setup(e){const{prefixCls:t}=d("setting-switch-item"),{t:n}=m(),o=l(()=>e.def?{checked:e.def}:{});function i(a){e.event&&S(e.event,a)}return{prefixCls:t,t:n,handleChange:i,getBindValue:o}}});function k(e,t,n,o,i,a){const r=c("Switch");return h(),u("div",{class:v(e.prefixCls)},[f("span",null,C(e.title),1),g(r,_(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 Q=s(b,[["render",k],["__scopeId","data-v-440e72fd"]]);export{Q as default};