lcny-vue3-antd-admin/dist/assets/SwitchItem.944adf36.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.2ba75b20.js";import{S as y}from"./index.a68fc977.js";import{b as S}from"./index.9c1beda4.js";import"./index.eceda1dc.js";import"./index.b40b7369.js";import"./ArrowLeftOutlined.c67ad991.js";import"./index.8cad6346.js";import"./index.835641d4.js";import"./FullscreenOutlined.7342633f.js";import"./index.25e3d6c8.js";import"./useWindowSizeFn.82dcdf74.js";import"./useContentViewHeight.c7fbc61a.js";import"./uniqBy.d68fdb3a.js";import"./_baseIteratee.a541afd2.js";import"./get.f89a3030.js";import"./index.470b22bd.js";import"./useRefs.d2ef520a.js";import"./PlusOutlined.f55abd55.js";import"./RedoOutlined.86c18aa7.js";import"./index.e883dc80.js";import"./lock.3a20c061.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};