lcny-vue3-antd-admin/dist/assets/SwitchItem.7aa95bde.js

2 lines
1.5 KiB
JavaScript

import{L as s,a as p,b as d,c as m,f as l,aG as c,o as h,h as u,i as f,t as C,n as g,aH as _,q as v}from"./index.6439bb26.js";import{S as y}from"./index.93ccf031.js";import{b as S}from"./index.3e876407.js";import"./index.f646240f.js";import"./index.cf1e7e0b.js";import"./ArrowLeftOutlined.180eb633.js";import"./index.ca3536b8.js";import"./index.d953fabd.js";import"./FullscreenOutlined.19455141.js";import"./index.de658af8.js";import"./useWindowSizeFn.cb31d0c4.js";import"./useContentViewHeight.2862c352.js";import"./uniqBy.96e7f320.js";import"./_baseIteratee.253a2d04.js";import"./get.cffab685.js";import"./index.587a6226.js";import"./useRefs.41331479.js";import"./RedoOutlined.601f48e9.js";import"./index.60cd9faf.js";import"./lock.cb0b5c88.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 O=s(b,[["render",k],["__scopeId","data-v-fd7354e2"]]);export{O as default};