lcny-vue3-antd-admin/dist/assets/SwitchItem.9b54160e.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.780f04fa.js";import{S as y}from"./index.683f0dce.js";import{b as S}from"./index.24d8ad08.js";import"./index.b20e2c99.js";import"./index.b418c68b.js";import"./ArrowLeftOutlined.3687b034.js";import"./index.822d31f7.js";import"./index.8e3f65ca.js";import"./FullscreenOutlined.4b275b33.js";import"./index.3041de60.js";import"./useWindowSizeFn.78a23c70.js";import"./useContentViewHeight.7cde386d.js";import"./uniqBy.f5569e46.js";import"./_baseIteratee.7b10b072.js";import"./get.7500bc78.js";import"./index.64f3dcd8.js";import"./useRefs.fe864f10.js";import"./PlusOutlined.d99b1e55.js";import"./RedoOutlined.074ad30d.js";import"./index.21f0301a.js";import"./lock.c9266ab5.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};