lcny-vue3-antd-admin/dist/assets/SwitchItem.2e77d8aa.js

2 lines
1.5 KiB
JavaScript

import{J as s,a as p,b as d,c as m,f as l,aA as c,o as h,h as u,i as f,t as C,p as g,aB as _,n as v}from"./index.43bf594c.js";import{S as y}from"./index.8af9b794.js";import{b as S}from"./index.acf31591.js";import"./index.8b84b49b.js";import"./index.e8d7800f.js";import"./ArrowLeftOutlined.ca6cf2fa.js";import"./index.7ad61a71.js";import"./index.5a6ec4e8.js";import"./FullscreenOutlined.859979b3.js";import"./index.6ad0a085.js";import"./useWindowSizeFn.26997faa.js";import"./useContentViewHeight.9e80c1b9.js";import"./uniqBy.aabb32fd.js";import"./_baseIteratee.762502d6.js";import"./get.9bd3ae6b.js";import"./index.c423fb66.js";import"./useRefs.f05e946f.js";import"./PlusOutlined.0a25e47f.js";import"./RedoOutlined.3e5f84aa.js";import"./index.075cff7b.js";import"./lock.5b0ad034.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 B(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",B],["__scopeId","data-v-440e72fd"]]);export{Q as default};