import{M as d}from"./index.c8cfbd6c.js";import{e as a,o as m,b as h,G as o,F as t,D as n,h as g,K as C,g as N,l as e,X as $}from"./@vue.e84e1286.js";import{p as u}from"./preview.2bfe2f00.js";import"./vue-router.54876e93.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */const k=n("\u6D88\u606F\u63D0\u793A"),y=n("\u6D88\u606F\u63D0\u793A(VNode)"),M=n("5\u79D2\u540E\u6D88\u5931"),v={__name:"demo1",setup(l){const s=()=>{d({text:"\u9ED8\u8BA4\u6D88\u606F\u63D0\u793A\uFF01"})},c=()=>{d({text:g("p",null,[g("span",null,"\u9ED8\u8BA4\u6D88\u606F\u63D0\u793A"),g("i",{style:"color: teal"},"VNode")])})},r=()=>{d({text:"5\u79D2\u540E\u6D88\u5931\uFF01",timeout:5e3})};return(_,p)=>{const f=a("m-button"),b=a("m-space");return m(),h(b,null,{default:o(()=>[t(f,{onClick:s},{default:o(()=>[k]),_:1}),t(f,{onClick:c},{default:o(()=>[y]),_:1}),t(f,{onClick:r},{default:o(()=>[M]),_:1})]),_:1})}}},w=n("\u6210\u529F"),V=n("\u8B66\u544A"),B=n("\u6D88\u606F"),I=n("\u9519\u8BEF"),E=n("\u81EA\u5B9A\u4E49"),S={__name:"demo2",setup(l){const s=()=>{d({type:"success",text:"\u6210\u529F\u72B6\u6001\u6D88\u606F\u63D0\u793A!"})},c=()=>{d({type:"warning",text:"\u8B66\u544A\u72B6\u6001\u6D88\u606F\u63D0\u793A!"})},r=()=>{d({text:"\u8FD9\u662F\u4E00\u6761\u6D88\u606F\u63D0\u793A!"})},_=()=>{d({type:"error",text:"\u9519\u8BEF\u72B6\u6001\u6D88\u606F\u63D0\u793A!"})},p=()=>{d({type:"custom",text:"\u81EA\u5B9A\u4E49\u6D88\u606F\u5F39\u7A97\u6837\u5F0F",icon:"icon-calendar",textColor:"#fff",bgColor:"#42B983"})};return(f,b)=>{const i=a("m-button"),x=a("m-space");return m(),h(x,null,{default:o(()=>[t(i,{onClick:s},{default:o(()=>[w]),_:1}),t(i,{onClick:c},{default:o(()=>[V]),_:1}),t(i,{onClick:r},{default:o(()=>[B]),_:1}),t(i,{onClick:_},{default:o(()=>[I]),_:1}),t(i,{onClick:p},{default:o(()=>[E]),_:1})]),_:1})}}},D=n("\u6587\u5B57\u5C45\u4E2D"),F={__name:"demo3",setup(l){const s=()=>{d({text:"\u5C45\u4E2D\u7684\u6587\u5B57\uFF01",center:!0})};return(c,r)=>{const _=a("m-button");return m(),h(_,{onClick:s},{default:o(()=>[D]),_:1})}}},G=n("\u6D88\u606F\u63D0\u793A"),K={__name:"demo4",setup(l){const s=()=>{d({text:"\u9ED8\u8BA4\u6D88\u606F\u63D0\u793A\uFF01",showClose:!0})};return(c,r)=>{const _=a("m-button");return m(),h(_,{onClick:s},{default:o(()=>[G]),_:1})}}},T=n("\u6D88\u606F\u63D0\u793A"),W={__name:"demo5",setup(l){const s=C(),c=()=>{s.proxy.$message({text:"\u9ED8\u8BA4\u6D88\u606F\u63D0\u793A\uFF01"})};return(r,_)=>{const p=a("m-button");return m(),h(p,{onClick:c},{default:o(()=>[T]),_:1})}}},X={class:"markdown-body"},j=e("h1",null,"Message \u6D88\u606F\u63D0\u793A",-1),q=e("h4",null,"\u5E38\u7528\u4E8E\u4E3B\u52A8\u64CD\u4F5C\u540E\u7684\u53CD\u9988\u63D0\u793A\u3002",-1),z=e("br",null,null,-1),A=e("h2",null,"\u57FA\u7840\u7528\u6CD5",-1),H=e("h4",null,"\u4ECE\u9876\u90E8\u51FA\u73B0\uFF0C3 \u79D2\u540E\u81EA\u52A8\u6D88\u5931\u3002\u6B64\u5916\uFF0Ctimeout\u5C5E\u6027 \u53EF\u4EE5\u63A7\u5236\u5173\u95ED\u65F6\u95F4\uFF0C \u9ED8\u8BA4\u7684\u5173\u95ED\u65F6\u95F4\u4E3A 3000 \u6BEB\u79D2\uFF0C\u5F53\u628A\u8FD9\u4E2A\u5C5E\u6027\u7684\u503C\u8BBE\u7F6E\u4E3A0\u4FBF\u8868\u793A\u8BE5\u6D88\u606F\u4E0D\u4F1A\u88AB\u81EA\u52A8\u5173\u95ED\u3002",-1),J={class:"source"},L=e("h2",null,"\u4E0D\u540C\u72B6\u6001",-1),O=e("h4",null,"\u53EF\u6839\u636E Message \u53C2\u6570\u7684 type \u6765\u5B9A\u4E49\u663E\u793A\u4E0D\u540C\u7684\u72B6\u6001\u3002",-1),P={class:"source"},Q=e("h2",null,"\u6587\u5B57\u5C45\u4E2D",-1),R=e("h4",null,"\u4F7F\u7528 center \u5C5E\u6027\u8BA9\u6587\u5B57\u6C34\u5E73\u5C45\u4E2D\u3002",-1),U={class:"source"},Y=e("h2",null,"\u53EF\u5173\u95ED",-1),Z=e("h4",null,"\u53EF\u4EE5\u6DFB\u52A0\u5173\u95ED\u6309\u94AE\u3002\u9ED8\u8BA4\u7684 Message \u662F\u4E0D\u53EF\u4EE5\u88AB\u4EBA\u5DE5\u5173\u95ED\u7684\uFF0C\u5982\u679C\u9700\u8981\u53EF\u624B\u52A8\u5173\u95ED\u7684 Message\uFF0C\u53EF\u4EE5\u4F7F\u7528showClose\u5B57\u6BB5",-1),tt={class:"source"},et=e("h2",null,"\u5168\u5C40\u65B9\u6CD5",-1),ot=e("h4",null,"\u53EF\u4EE5\u901A\u8FC7\u83B7\u53D6\u7EC4\u4EF6\u5B9E\u4F8B\u7684\u65B9\u5F0F\u6765\u8C03\u7528\u3002",-1),st={class:"source"},nt=$("
\u53C2\u6570 | \u8BF4\u660E | \u7C7B\u578B | \u53EF\u9009\u503C | \u9ED8\u8BA4\u503C |
---|---|---|---|---|
text | \u6D88\u606F\u6587\u5B57 | string / VNode | \u2014 | \u2014 |
type | \u4E3B\u9898 | string | success/warning/info/error | info |
icon | \u6D88\u606F\u63D0\u793AIcon\u56FE\u6807 | \u53C2\u8003\u56FE\u6807\u5E93 | \u2014 | \u2014 |
timeout | \u6D88\u606F\u63D0\u793A\u6846\u6D88\u5931\u65F6\u95F4\uFF08\u5355\u4F4D\uFF1A\u6BEB\u79D2ms\uFF09 | number | \u2014 | 3000 |
textColor | \u6587\u672C\u989C\u8272\uFF0Ctype \u4E3A custom \u65F6\u6709\u6548 | string | \u2014 | \u2014 |
bgColor | \u80CC\u666F\u989C\u8272\uFF0Ctype \u4E3A custom \u65F6\u6709\u6548 | string | \u2014 | \u2014 |
customClass | \u81EA\u5B9A\u4E49\u7EC4\u4EF6\u7C7B\u540D | string | \u2014 | \u2014 |
showClose | \u662F\u5426\u663E\u793A\u5173\u95ED\u6309\u94AE | boolean | \u2014 | false |
center | \u6587\u5B57\u662F\u5426\u5C45\u4E2D | boolean | \u2014 | false |