detect/detect.gui/Embedded/dist/assets/SwitchItem-60139ab7.js
2024-11-21 17:47:13 +08:00

2 lines
1.2 KiB
JavaScript

import{u as r,t as d,_ as l}from"./index.js";import{b as c}from"./index-e6774c62.js";import{d as p,c as m,Z as f,_ as h,$ as u,a0 as _,k as C,a9 as g,a1 as b,a6 as y}from"./vue-72a104e4.js";import{af as k}from"./antd-029ed741.js";import"./index-e0942325.js";import"./index-84c053aa.js";import"./index-dee58fb5.js";import"./index-b210030c.js";import"./useContentViewHeight-f46e6f8d.js";import"./useWindowSizeFn-46f0db92.js";import"./lock-ba03254e.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(),a=m(()=>e.def?{checked:e.def}:{});function o(s){e.event&&c(e.event,s)}return{prefixCls:t,t:n,handleChange:o,getBindValue:a}}});function S(e,t,n,a,o,s){const i=y("Switch");return f(),h("div",{class:b(e.prefixCls)},[u("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};