lcny-vue3-antd-admin/dist/assets/SwitchItem.5d87f4e9.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.9e26db16.js";import{S as y}from"./index.997bafd2.js";import{b as S}from"./index.09a7bb33.js";import"./index.cd8be4a7.js";import"./index.26c91074.js";import"./ArrowLeftOutlined.922b4a38.js";import"./index.8f20a84d.js";import"./index.8dd6add7.js";import"./FullscreenOutlined.67f6bcc5.js";import"./index.a32d97ff.js";import"./useWindowSizeFn.50141f6b.js";import"./useContentViewHeight.565c0178.js";import"./uniqBy.b027f4bb.js";import"./_baseIteratee.91ef6f6e.js";import"./get.2a8de9b0.js";import"./index.0cccde80.js";import"./useRefs.6585326c.js";import"./PlusOutlined.d9f5443a.js";import"./RedoOutlined.1b3316bd.js";import"./index.3b443b68.js";import"./lock.0cdfa2ca.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-fd7354e2"]]);export{Q as default};