mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{aw as o,ag as s,y as n,z as l,A as e,P as d,b0 as h,L as a,H as i}from"./chunks/framework.BCBheFgR.js";const v=JSON.parse('{"title":"Switch 开关","description":"","frontmatter":{},"headers":[],"relativePath":"form-config/fields/switch.md","filePath":"form-config/fields/switch.md"}'),c={name:"form-config/fields/switch.md"};function m(b,t,f,u,p,w){const r=s("demo-block");return l(),n("div",null,[t[2]||(t[2]=e("h1",{id:"switch-开关",tabindex:"-1"},[a("Switch 开关 "),e("a",{class:"header-anchor",href:"#switch-开关","aria-label":'Permalink to "Switch 开关"'},"")],-1)),t[3]||(t[3]=e("p",null,"表示两种相互对立的状态间的切换,多用于触发「开/关」。",-1)),t[4]||(t[4]=e("h2",{id:"基本用法",tabindex:"-1"},[a("基本用法 "),e("a",{class:"header-anchor",href:"#基本用法","aria-label":'Permalink to "基本用法"'},"")],-1)),d(r,{type:"form",config:[{type:"switch",name:"switch",text:"开关"}]}),t[5]||(t[5]=e("h2",{id:"扩展的-value-类型",tabindex:"-1"},[a("扩展的 value 类型 "),e("a",{class:"header-anchor",href:"#扩展的-value-类型","aria-label":'Permalink to "扩展的 value 类型"'},"")],-1)),d(r,{type:"form",config:[{type:"switch",name:"switch",text:"开关",activeValue:"on",inactiveValue:"off"}]},{source:i(()=>t[0]||(t[0]=[e("p",null," 设置 activeValue 和 inactiveValue 属性,接受 Boolean , String 或 Number 类型的值。 ",-1)])),_:1}),t[6]||(t[6]=e("h2",{id:"禁用状态",tabindex:"-1"},[a("禁用状态 "),e("a",{class:"header-anchor",href:"#禁用状态","aria-label":'Permalink to "禁用状态"'},"")],-1)),d(r,{type:"form",config:[{type:"switch",name:"switch",text:"开关",disabled:!0}]},{source:i(()=>t[1]||(t[1]=[e("p",null," 设置 disabled 属性,接受一个 Boolean,设置 true 即可禁用。 ",-1)])),_:1}),t[7]||(t[7]=h("",2))])}const x=o(c,[["render",m]]);export{v as __pageData,x as default};
|