text: "use strict";(self.webpackChunkdocuments=self.webpackChunkdocuments||[]).push([[2182],{644:function(n,a,s){s.r(a),s.d(a,{data:function(){return t}});const t={key:"v-07a6a2ba",path:"/component/switch.html",title:"Switch 开关",lang:"zh-CN",frontmatter:{},excerpt:"",headers:[{level:2,title:"基础使用",slug:"基础使用",children:[]}],filePathRelative:"component/switch.md",git:{updatedTime:1638887014e3,contributors:[{name:"song",email:"3224266014@qq.com",commits:1}]}}},9702:function(n,a,s){s.r(a),s.d(a,{default:function(){return p}});var t=s(6252);const e=(0,t.uE)('<h1 id="switch-开关" tabindex="-1"><a class="header-anchor" href="#switch-开关" aria-hidden="true">#</a> Switch 开关</h1><div class="custom-container warning"><p class="custom-container-title">WARNING</p></div><h2 id="基础使用" tabindex="-1"><a class="header-anchor" href="#基础使用" aria-hidden="true">#</a> 基础使用</h2><p><strong>示例</strong>（移入鼠标即可预览）：</p>',4),c={class:"magnifier-container"},l=(0,t.Uk)(" Label "),o=(0,t._)("details",{class:"custom-container details"},[(0,t._)("summary",null,[(0,t._)("i",{class:"iconfont df-icon-script"})]),(0,t._)("div",{class:"language-vue ext-vue line-numbers-mode"},[(0,t._)("pre",{class:"language-vue"},[(0,t._)("code",null,[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token punctuation"},"<"),(0,t.Uk)("template")]),(0,t._)("span",{class:"token punctuation"},">")]),(0,t.Uk)("\n  "),(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token punctuation"},"<"),(0,t.Uk)("div")]),(0,t.Uk)(),(0,t._)("span",{class:"token attr-name"},"class"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("magnifier-container"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)(),(0,t._)("span",{class:"token attr-name"},"align"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("center"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t._)("span",{class:"token punctuation"},">")]),(0,t.Uk)("\n    "),(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token punctuation"},"<"),(0,t.Uk)("df-magnifier")]),(0,t.Uk)("\n      "),(0,t._)("span",{class:"token attr-name"},":blank"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("true"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)("\n      "),(0,t._)("span",{class:"token attr-name"},"imgUrl"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("https://cdn.jsdelivr.net/gh/yesmore/img/v2/1/09.jpg"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)("\n      "),(0,t._)("span",{class:"token attr-name"},"imgAlt"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("放大镜"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)("\n      "),(0,t._)("span",{class:"token attr-name"},"cursor"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("crosshair"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)("\n      "),(0,t._)("span",{class:"token attr-name"},":scale"),(0,t._)("span",{class:"token attr-value"},[(0,t._)("span",{class:"token punctuation attr-equals"},"="),(0,t._)("span",{class:"token punctuation"},'"'),(0,t.Uk)("1.7"),(0,t._)("span",{class:"token punctuation"},'"')]),(0,t.Uk)("\n    "),(0,t._)("span",{class:"token punctuation"},"/>")]),(0,t.Uk)("\n  "),(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token punctuation"},"</"),(0,t.Uk)("div")]),(0,t._)("span",{class:"token punctuation"},">")]),(0,t.Uk)("\n"),(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token tag"},[(0,t._)("span",{class:"token punctuation"},"</"),(0,t.Uk)("template")]),(0,t._)("span",{class:"token punctuation"},">")]),(0,t.Uk)("\n")])]),(0,t._)("div",{class:"line-numbers"},[(0,t._)("span",{class:"line-number"},"1"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"2"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"3"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"4"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"5"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"6"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"7"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"8"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"9"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"10"),(0,t._)("br"),(0,t._)("span",{class:"line-number"},"11"),(0,t._)("br")])])],-1),u={};var p=(0,s(3744).Z)(u,[["render",function(n,a){const s=(0,t.up)("df-switch"),u=(0,t.up)("df-template");return(0,t.wg)(),(0,t.iD)(t.HY,null,[e,(0,t.Wm)(u,null,{demo:(0,t.w5)((()=>[(0,t._)("div",c,[(0,t.Wm)(s,{class:"df-p-3"},{label:(0,t.w5)((()=>[l])),_:1})])])),src:(0,t.w5)((()=>[o])),_:1})],64)}]])},3744:function(n,a){a.Z=(n,a)=>{const s=n.__vccOpts||n;for(const[n,t]of a)s[n]=t;return s}}}]);