1 |
- import{a as c,e as u,o as p,g as h,F as e,G as l,H as w,D as s,l as o,x as $,X as y}from"./@vue.e84e1286.js";import{p as f}from"./preview.2bfe2f00.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */import"./index.c8cfbd6c.js";import"./vue-router.54876e93.js";const C=s("\u5DE6\u8FB9-left"),k=s("\u4E0A\u8FB9-top"),N=s("\u53F3\u8FB9-right"),x=s("\u4E0B\u8FB9-bottom"),U=o("div",null,"\u6211\u6765\u5566\u3002\u3002\u3002",-1),S={__name:"demo1",setup(v){const d=c(!1),r=c("left"),i=()=>{d.value=!0,r.value="left"},t=()=>{d.value=!0,r.value="top"},a=()=>{d.value=!0,r.value="right"},_=()=>{d.value=!0,r.value="bottom"};return(m,n)=>{const b=u("m-button"),V=u("m-space"),D=u("m-drawer");return p(),h(w,null,[e(V,null,{default:l(()=>[e(b,{onClick:i},{default:l(()=>[C]),_:1}),e(b,{onClick:t},{default:l(()=>[k]),_:1}),e(b,{onClick:a},{default:l(()=>[N]),_:1}),e(b,{onClick:_},{default:l(()=>[x]),_:1})]),_:1}),e(D,{modelValue:d.value,"onUpdate:modelValue":n[0]||(n[0]=g=>d.value=g),title:"\u57FA\u672C\u4F7F\u7528",direction:r.value},{default:l(()=>[U]),_:1},8,["modelValue","direction"])],64)}}},B=s("\u70B9\u51FB\u6253\u5F00"),E=o("div",null,"\u6211\u6765\u5566\u3002\u3002\u3002",-1),F={__name:"demo2",setup(v){const d=c(!1);return(r,i)=>{const t=u("m-button"),a=u("m-drawer");return p(),h(w,null,[e(t,{onClick:i[0]||(i[0]=_=>d.value=!0)},{default:l(()=>[B]),_:1}),e(a,{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=_=>d.value=_),title:"\u57FA\u672C\u4F7F\u7528","with-header":!1},{default:l(()=>[E]),_:1},8,["modelValue"])],64)}}},H=s("\u81EA\u5B9A\u4E49\u5185\u5BB9"),T={class:"drawer-footer"},z=s("\u53D6\u6D88"),A=s("\u786E\u5B9A"),G={__name:"demo3",setup(v){const d=c(!1),r=c("");return(i,t)=>{const a=u("m-button"),_=u("m-input"),m=u("m-drawer");return p(),h(w,null,[e(a,{onClick:t[0]||(t[0]=n=>d.value=!0)},{default:l(()=>[H]),_:1}),e(m,{modelValue:d.value,"onUpdate:modelValue":t[4]||(t[4]=n=>d.value=n),title:"\u57FA\u672C\u4F7F\u7528"},{footer:l(()=>[o("span",T,[e(a,{onClick:t[2]||(t[2]=n=>d.value=!1),style:{"margin-right":"20px"}},{default:l(()=>[z]),_:1}),e(a,{type:"primary",onClick:t[3]||(t[3]=n=>d.value=!1)},{default:l(()=>[A]),_:1})])]),default:l(()=>[o("div",null,[e(_,{modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=n=>r.value=n),placeholder:"\u8BF7\u8F93\u5165",clearable:""},null,8,["modelValue"]),o("p",null,"\u8F93\u5165\u7684\u503C\u4E3A\uFF1A"+$(r.value),1)])]),_:1},8,["modelValue"])],64)}}},X=s("\u70B9\u51FB\u6253\u5F00"),j=s("\u6253\u5F00\u91CC\u9762\u7684!"),q=o("p",null,"\u5FEB\u5230\u7897\u91CC\u6765\uFF01",-1),I={__name:"demo4",setup(v){const d=c(!1),r=c(!1);return(i,t)=>{const a=u("m-button"),_=u("m-drawer");return p(),h(w,null,[e(a,{onClick:t[0]||(t[0]=m=>d.value=!0)},{default:l(()=>[X]),_:1}),e(_,{title:"\u6211\u662F\u5916\u9762\u7684 Drawer",modelValue:d.value,"onUpdate:modelValue":t[3]||(t[3]=m=>d.value=m),width:"50%"},{default:l(()=>[o("div",null,[e(a,{onClick:t[1]||(t[1]=m=>r.value=!0)},{default:l(()=>[j]),_:1}),e(_,{title:"\u6211\u662F\u91CC\u9762\u7684 Drawer","append-to-body":!0,modelValue:r.value,"onUpdate:modelValue":t[2]||(t[2]=m=>r.value=m)},{default:l(()=>[q]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"])],64)}}},J=s("\u70B9\u51FB\u6253\u5F00"),K=o("i",{class:"iconfont icon-email",style:{"font-size":"17px"}},null,-1),L=s(" \u65B0\u7684\u90AE\u4EF6 "),M={class:"drawer-footer"},O=s("\u53D6\u6D88"),P=s("\u786E\u5B9A"),Q={__name:"demo5",setup(v){const d=c(!1),r=c("");return(i,t)=>{const a=u("m-button"),_=u("m-input"),m=u("m-drawer");return p(),h(w,null,[e(a,{onClick:t[0]||(t[0]=n=>d.value=!0)},{default:l(()=>[J]),_:1}),e(m,{modelValue:d.value,"onUpdate:modelValue":t[4]||(t[4]=n=>d.value=n),"custom-class":"customClass",wrapperClosable:!1},{header:l(()=>[K,L]),footer:l(()=>[o("span",M,[e(a,{onClick:t[2]||(t[2]=n=>d.value=!1),style:{"margin-right":"20px"}},{default:l(()=>[O]),_:1}),e(a,{type:"primary",onClick:t[3]||(t[3]=n=>d.value=!1)},{default:l(()=>[P]),_:1})])]),default:l(()=>[o("div",null,[e(_,{modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=n=>r.value=n),placeholder:"\u8BF7\u8F93\u5165",clearable:""},null,8,["modelValue"]),o("p",null,"\u8F93\u5165\u7684\u503C\u4E3A\uFF1A"+$(r.value),1)])]),_:1},8,["modelValue"])],64)}}},R={class:"markdown-body"},W=o("h1",null,"Drawer \u62BD\u5C49",-1),Y=o("h4",null,"\u4ECE\u5C4F\u5E55\u56DB\u8FB9\u51FA\u73B0\u7684\u8499\u7248\u7EC4\u4EF6",-1),Z=o("br",null,null,-1),tt=o("h2",null,"\u57FA\u672C\u7528\u6CD5",-1),et=o("h4",null,"\u547C\u51FA\u4E00\u4E2A\u4E34\u65F6\u7684\u4FA7\u8FB9\u680F, \u53EF\u4EE5\u4ECE\u591A\u4E2A\u65B9\u5411\u547C\u51FA",-1),ot={class:"source"},dt=o("h2",null,"\u4E0D\u6DFB\u52A0 Title",-1),lt=o("h4",null,"\u5F53\u4F60\u4E0D\u9700\u8981\u6807\u9898\u5230\u65F6\u5019, \u4F60\u8FD8\u53EF\u4EE5\u53BB\u6389\u6807\u9898",-1),rt={class:"source"},nt=o("h2",null,"\u81EA\u5B9A\u4E49\u5185\u5BB9",-1),at=o("h4",null,"\u50CF Dialog \u7EC4\u4EF6\u4E00\u6837\uFF0CDrawer \u4E5F\u53EF\u4EE5\u7528\u6765\u663E\u793A\u591A\u79CD\u4E0D\u540C\u7684\u4EA4\u4E92",-1),st={class:"source"},ut=o("h2",null,"\u5D4C\u5957\u62BD\u5C49",-1),_t=o("h4",null,"Drawer \u7EC4\u4EF6\u4E5F\u62E5\u6709\u591A\u5C42\u5D4C\u5957\u7684\u65B9\u6CD5",-1),it={class:"source"},mt=o("h2",null,"\u4F7F\u7528\u5177\u540D\u63D2\u69FD\u81EA\u5B9A\u4E49",-1),ct=o("h4",null,"\u4F7F\u7528\u5177\u540D\u63D2\u69FD #header \u3001#footer \u53EF\u5BF9\u62BD\u5C49\u6574\u4F53\u6839\u636E\u9700\u8981\u81EA\u5B9A\u4E49",-1),pt={class:"source"},ht=y("<br><h2>Attributes</h2><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u53EF\u9009\u503C</th><th>\u9ED8\u8BA4\u503C</th></tr></thead><tbody><tr><td>v-model</td><td>\u662F\u5426\u663E\u793A Drawer</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>title</td><td>Drawer \u7684\u6807\u9898\uFF0C\u4E5F\u53EF\u901A\u8FC7\u5177\u540D slot\u4F20\u5165</td><td>string</td><td>\u2014</td><td>\u2014</td></tr><tr><td>direction</td><td>Drawer \u6253\u5F00\u7684\u65B9\u5411</td><td>string</td><td>left / top / right / bottom</td><td>right</td></tr><tr><td>width</td><td>\u62BD\u5C49\u533A\u57DF\u5BBD\u5EA6\uFF0Cdirection \u4E3A left \u548C right \u65F6\u6709\u6548</td><td>string</td><td>\u2014</td><td>30%</td></tr><tr><td>height</td><td>\u62BD\u5C49\u533A\u57DF\u9AD8\u5EA6\uFF0Cdirection \u4E3A top \u548C bottom \u65F6\u6709\u6548</td><td>string</td><td>\u2014</td><td>40%</td></tr><tr><td>show-close</td><td>\u662F\u5426\u663E\u793A\u5173\u95ED\u6309\u94AE</td><td>boolean</td><td>\u2014</td><td>true</td></tr><tr><td>append-to-body</td><td>Drawer \u81EA\u8EAB\u662F\u5426\u63D2\u5165\u81F3 body \u5143\u7D20\u4E0A\u3002\u5D4C\u5957\u7684 Drawer \u5FC5\u987B\u6307\u5B9A\u8BE5\u5C5E\u6027\u5E76\u8D4B\u503C\u4E3A true</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>wrapperClosable</td><td>\u70B9\u51FB\u906E\u7F69\u5C42\u662F\u5426\u53EF\u4EE5\u5173\u95ED Drawer</td><td>boolean</td><td>-</td><td>true</td></tr><tr><td>withHeader</td><td>\u63A7\u5236\u662F\u5426\u663E\u793A header \u680F, \u9ED8\u8BA4\u4E3A true</td><td>boolean</td><td>-</td><td>true</td></tr><tr><td>custom-class</td><td>Drawer \u7684\u81EA\u5B9A\u4E49\u7C7B\u540D</td><td>string</td><td>\u2014</td><td>\u2014</td></tr></tbody></table><br><h2>Slot</h2><table><thead><tr><th>name</th><th>\u8BF4\u660E</th></tr></thead><tbody><tr><td>\u2014</td><td>Drawer \u7684\u5185\u5BB9</td></tr><tr><td>header</td><td>Drawer \u6807\u9898\u533A\u7684\u5185\u5BB9</td></tr><tr><td>footer</td><td>Drawer \u6309\u94AE\u64CD\u4F5C\u533A\u7684\u5185\u5BB9</td></tr></tbody></table><br><h2>Events</h2><table><thead><tr><th>\u4E8B\u4EF6\u540D\u79F0</th><th>\u8BF4\u660E</th><th>\u56DE\u8C03\u53C2\u6570</th></tr></thead><tbody><tr><td>open</td><td>Drawer \u6253\u5F00\u7684\u56DE\u8C03</td><td>\u2014</td></tr><tr><td>opened</td><td>Drawer \u6253\u5F00\u52A8\u753B\u7ED3\u675F\u65F6\u7684\u56DE\u8C03</td><td>\u2014</td></tr><tr><td>close</td><td>Drawer \u5173\u95ED\u7684\u56DE\u8C03</td><td>\u2014</td></tr><tr><td>closed</td><td>Drawer \u5173\u95ED\u52A8\u753B\u7ED3\u675F\u65F6\u7684\u56DE\u8C03</td><td>\u2014</td></tr></tbody></table>",9),gt={__name:"doc",setup(v,{expose:d}){return d({frontmatter:{}}),(i,t)=>(p(),h("div",R,[W,Y,Z,tt,et,o("div",ot,[e(S)]),e(f,{compName:"drawer",demoName:"demo1"}),dt,lt,o("div",rt,[e(F)]),e(f,{compName:"drawer",demoName:"demo2"}),nt,at,o("div",st,[e(G)]),e(f,{compName:"drawer",demoName:"demo3"}),ut,_t,o("div",it,[e(I)]),e(f,{compName:"drawer",demoName:"demo4"}),mt,ct,o("div",pt,[e(Q)]),e(f,{compName:"drawer",demoName:"demo5"}),ht]))}};export{gt as default};
|