1 |
- import{a as m,e as r,o as _,b as V,G as v,F as e,D as n,g as f,l as t,X as g}from"./@vue.e84e1286.js";import{p as h}from"./preview.2bfe2f00.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */import"./index.c8cfbd6c.js";import"./vue-router.54876e93.js";const N={__name:"demo1",setup(p){const o=m("");return(s,l)=>{const d=r("m-input");return _(),V(d,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),placeholder:"\u57FA\u672C\u4F7F\u7528"},null,8,["modelValue"])}}},x={__name:"demo2",setup(p){const o=m("");return(s,l)=>{const d=r("m-input");return _(),V(d,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),placeholder:"\u7981\u7528\u72B6\u6001",disabled:""},null,8,["modelValue"])}}},U={__name:"demo3",setup(p){const o=m("");return(s,l)=>{const d=r("m-input");return _(),V(d,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),placeholder:"\u53EF\u6E05\u7A7A",clearable:""},null,8,["modelValue"])}}},y={__name:"demo4",setup(p){const o=m(""),s=m("");return(l,d)=>{const a=r("m-input"),u=r("m-space");return _(),V(u,null,{default:v(()=>[e(a,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=c=>o.value=c),placeholder:"\u8BF7\u8F93\u5165",leftIcon:"icon-search"},null,8,["modelValue"]),e(a,{modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=c=>s.value=c),placeholder:"\u8BF7\u8F93\u5165",rightIcon:"icon-calendar"},null,8,["modelValue"])]),_:1})}}},I={__name:"demo5",setup(p){const o=m(""),s=m(""),l=m(""),d=m("");return(a,u)=>{const c=r("m-input"),b=r("m-space");return _(),V(b,null,{default:v(()=>[e(c,{modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=i=>o.value=i),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"]),e(c,{modelValue:s.value,"onUpdate:modelValue":u[1]||(u[1]=i=>s.value=i),placeholder:"\u8BF7\u8F93\u5165",size:"medium"},null,8,["modelValue"]),e(c,{modelValue:l.value,"onUpdate:modelValue":u[2]||(u[2]=i=>l.value=i),placeholder:"\u8BF7\u8F93\u5165",size:"small"},null,8,["modelValue"]),e(c,{modelValue:d.value,"onUpdate:modelValue":u[3]||(u[3]=i=>d.value=i),placeholder:"\u8BF7\u8F93\u5165",size:"mini"},null,8,["modelValue"])]),_:1})}}},w={__name:"demo6",setup(p){const o=m("");return(s,l)=>{const d=r("m-input");return _(),V(d,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=a=>o.value=a),placeholder:"\u8BF7\u8F93\u5165\u5BC6\u7801",showPassword:""},null,8,["modelValue"])}}},$=n("\u641C\u7D22"),z=n("\u641C\u7D22"),E={__name:"demo7",setup(p){const o=m(""),s=m("");return(l,d)=>{const a=r("m-button"),u=r("m-input"),c=r("m-space");return _(),V(c,null,{default:v(()=>[e(u,{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=b=>o.value=b),clearable:""},{prepend:v(()=>[e(a,{type:"primary",leftIcon:"icon-search"},{default:v(()=>[$]),_:1})]),_:1},8,["modelValue"]),e(u,{modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=b=>s.value=b),clearable:""},{append:v(()=>[e(a,{type:"primary",leftIcon:"icon-search"},{default:v(()=>[z]),_:1})]),_:1},8,["modelValue"])]),_:1})}}},k={class:"markdown-body"},B=t("h1",null,"Input \u8F93\u5165\u6846",-1),P=t("h4",null,"\u6570\u636E\u8F93\u5165\u6846\u7C7B\u578B\uFF0C\u901A\u8FC7\u952E\u76D8\u8F93\u5165\u5B57\u7B26",-1),C=t("br",null,null,-1),A=t("h2",null,"\u57FA\u672C\u4F7F\u7528",-1),D=t("h4",null,"input \u7684\u57FA\u672C\u4F7F\u7528",-1),F={class:"source"},G=t("h2",null,"\u7981\u7528\u72B6\u6001",-1),S=t("h4",null,[n("\u901A\u8FC7 "),t("em",null,"disabled"),n(" \u5C5E\u6027\u6307\u5B9A\u662F\u5426\u7981\u7528 input \u7EC4\u4EF6")],-1),T={class:"source"},X=t("h2",null,"\u53EF\u6E05\u7A7A\u6570\u636E",-1),j=t("h4",null,[n("\u4F7F\u7528 "),t("em",null,"clearable"),n(" \u5C5E\u6027\u5373\u53EF\u5F97\u5230\u4E00\u4E2A\u53EF\u6E05\u7A7A\u7684\u8F93\u5165\u6846")],-1),q={class:"source"},H=t("h2",null,"\u5E26\u56FE\u6807",-1),J=t("h4",null,[n("\u53EF\u4F7F\u7528 "),t("em",null,"leftIcon"),n(" \u6216\u8005 "),t("em",null,"rightIcon"),n(" \u6765\u5B9A\u4E49\u663E\u793A\u56FE\u6807\u5E76\u786E\u5B9A\u663E\u793A\u7684\u4F4D\u7F6E")],-1),K={class:"source"},L=t("h2",null,"\u4E0D\u540C\u5927\u5C0F",-1),M=t("h4",null,[n("\u901A\u8FC7\u8BBE\u7F6E "),t("em",null,"size"),n(" \u5C5E\u6027\u6765\u9002\u5E94\u4E0D\u540C\u5927\u5C0F")],-1),O={class:"source"},Q=t("h2",null,"\u5BC6\u7801\u7C7B\u578B",-1),R=t("h4",null,[n("\u5BC6\u7801\u7C7B\u578B\u7684\u8F93\u5165\u6846\uFF0C\u53EF\u901A\u8FC7 "),t("em",null,"showPassword"),n(" \u6765\u542F\u7528\u662F\u5426\u5F00\u542F\u663E\u793A\u5BC6\u7801")],-1),W={class:"source"},Y=t("h2",null,"\u590D\u5408\u578B\u8F93\u5165\u6846",-1),Z=t("h4",null,[n("\u53EF\u901A\u8FC7 "),t("em",null,"slot"),n(" \u6765\u6307\u5B9A\u5728 input \u4E2D\u524D\u7F6E\u6216\u8005\u540E\u7F6E\u5185\u5BB9\u3002")],-1),tt={class:"source"},et=g("<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>type</td><td>\u7C7B\u578B</td><td>string</td><td>text</td><td>text</td></tr><tr><td>value / v-model</td><td>\u7ED1\u5B9A\u503C</td><td>string / number</td><td>\u2014</td><td>\u2014</td></tr><tr><td>placeholder</td><td>\u8F93\u5165\u6846\u5360\u4F4D\u6587\u672C</td><td>string</td><td>\u2014</td><td>\u2014</td></tr><tr><td>clearable</td><td>\u662F\u5426\u53EF\u6E05\u7A7A</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>showPassword</td><td>\u662F\u5426\u663E\u793A\u5207\u6362\u5BC6\u7801\u56FE\u6807</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>disabled</td><td>\u7981\u7528</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>size</td><td>\u5C3A\u5BF8\u5927\u5C0F</td><td>string</td><td>medium / small / mini</td><td>\u2014</td></tr><tr><td>readonly</td><td>\u539F\u751F\u5C5E\u6027\uFF0C\u662F\u5426\u53EA\u8BFB</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>autofocus</td><td>\u539F\u751F\u5C5E\u6027\uFF0C\u81EA\u52A8\u83B7\u53D6\u7126\u70B9</td><td>boolean</td><td>true, false</td><td>false</td></tr></tbody></table><h2>Events</h2><table><thead><tr><th>\u4E8B\u4EF6\u540D</th><th>\u8BF4\u660E</th><th>\u56DE\u8C03\u53C2\u6570</th><th>\u793A\u4F8B</th></tr></thead><tbody><tr><td>blur</td><td>\u5728 Input \u5931\u53BB\u7126\u70B9\u65F6\u89E6\u53D1</td><td>(event: Event)</td><td>blur=(e)=>{console.log(e)}</td></tr><tr><td>focus</td><td>\u5728 Input \u83B7\u5F97\u7126\u70B9\u65F6\u89E6\u53D1</td><td>(event: Event)</td><td>focus=(e)=>{console.log(e)}</td></tr><tr><td>change</td><td>\u5728 Input \u5931\u53BB\u7126\u70B9\u6216\u7528\u6237\u6309\u4E0B\u56DE\u8F66\u65F6\u89E6\u53D1</td><td>(event: Event)</td><td>change=(e)=>{console.log(e)}</td></tr><tr><td>input</td><td>\u5728 Input \u503C\u6539\u53D8\u65F6\u89E6\u53D1</td><td>(value: string | number)</td><td>input=(e)=>{console.log(e)}</td></tr><tr><td>clear</td><td>\u5728\u70B9\u51FB\u7531 <code>clearable</code> \u5C5E\u6027\u751F\u6210\u7684\u6E05\u7A7A\u6309\u94AE\u65F6\u89E6\u53D1</td><td>\u2014</td><td>\u2014</td></tr></tbody></table><br>",5),mt={__name:"doc",setup(p,{expose:o}){return o({frontmatter:{}}),(l,d)=>(_(),f("div",k,[B,P,C,A,D,t("div",F,[e(N)]),e(h,{compName:"input",demoName:"demo1"}),G,S,t("div",T,[e(x)]),e(h,{compName:"input",demoName:"demo2"}),X,j,t("div",q,[e(U)]),e(h,{compName:"input",demoName:"demo3"}),H,J,t("div",K,[e(y)]),e(h,{compName:"input",demoName:"demo4"}),L,M,t("div",O,[e(I)]),e(h,{compName:"input",demoName:"demo5"}),Q,R,t("div",W,[e(w)]),e(h,{compName:"input",demoName:"demo6"}),Y,Z,t("div",tt,[e(E)]),e(h,{compName:"input",demoName:"demo7"}),et]))}};export{mt as default};
|