detect/detect.gui/Embedded/dist/assets/SwitchItem-c5c33d4b.js
2025-05-26 17:02:05 +08:00

2 lines
1.2 KiB
JavaScript

import{u as r,x as d,_ as l}from"./index.js";import{b as c}from"./index-e2d18bd1.js";import{d as p,c as m,Z as h,_ as u,$ as f,a0 as _,k as C,a9 as g,a1 as b,a6 as y}from"./vue-72a104e4.js";import{ao as k}from"./antd-9db9238b.js";import"./index-4d8a4acc.js";import"./index-3b5fc591.js";import"./index-681e7392.js";import"./index-bb305fdf.js";import"./useContentViewHeight-4d801f45.js";import"./useWindowSizeFn-c13a0e28.js";import"./lock-5aa7a686.js";const v=p({name:"SwitchItem",components:{Switch:k},props:{event:{type:Number},disabled:{type:Boolean},title:{type:String},def:{type:Boolean}},setup(e){const{prefixCls:t}=r("setting-switch-item"),{t:n}=d(),o=m(()=>e.def?{checked:e.def}:{});function a(s){e.event&&c(e.event,s)}return{prefixCls:t,t:n,handleChange:a,getBindValue:o}}});function S(e,t,n,o,a,s){const i=y("Switch");return h(),u("div",{class:b(e.prefixCls)},[f("span",null,_(e.title),1),C(i,g(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)}const Z=l(v,[["render",S],["__scopeId","data-v-0f0bf616"]]);export{Z as default};