62 lines
17 KiB
JavaScript
62 lines
17 KiB
JavaScript
|
import"./index.8d5473b0.js";import{r as e,o as b,h as v,e as s,d as t,z as c,f as n,g as a,a0 as p}from"./vendor.e7911ee1.js";const w={class:"markdown-body"},x=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openMsg"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u666E\u901A\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" layer "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},'"../../../../src/index.ts"'),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openMsg"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u666E\u901A\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),a(),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
openMsg
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),h=a("\u666E\u901A\u6D88\u606F"),C=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openSuccess"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u6210\u529F\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openFailure"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u5931\u8D25\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openWarning"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u8B66\u544A\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openPrimary"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u8BE6\u60C5\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-button")]),a(),n("span",{class:"token attr-name"},"type"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("primary"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@click"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("openLoading"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),a("\u52A0\u8F7D\u6D88\u606F"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-button")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" layer "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},'"../../../../src/index.ts"'),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openSuccess"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u6210\u529F\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" icon "),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},","),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openFailure"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u5931\u8D25\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" icon "),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"2"),n("span",{class:"token punctuation"},","),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openWarning"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u8B66\u544A\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" icon "),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"3"),n("span",{class:"token punctuation"},","),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openPrimary"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u8BE6\u60C5\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" icon "),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"4"),n("span",{class:"token punctuation"},","),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"openLoading"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"msg"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u52A0\u8F7D\u6D88\u606F"'),n("span",{class:"token punctuation"},","),a(),n("span",{class:"token punctuation"},"{"),a(" icon "),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),a(" time"),n("span",{class:"token operator"},":"),a(),n("span",{class:"token number"},"1000"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
openSuccess`),n("span",{class:"token punctuation"},","),a(" openFailure"),n("span",{class:"token punctuation"},","),a(" openWarning"),n("span",{class:"token punctuation"},","),a(" openPrimary"),n("span",{class:"token punctuation"},","),a(` openLoading
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),q=a("\u6210\u529F\u6D88\u606F"),j=a("\u5931\u8D25\u6D88\u606F"),F=a("\u8B66\u544A\u6D88\u606F"),L=a("\u8BE6\u60C5\u6D88\u606F"),M=a("\u52A0\u8F7D\u6D88\u606F"),P=n("div",{class:"language-"},[n("pre",null,[n("code",{"v-pre":""},`layer.msg(content, options)
|
||
|
`)])],-1),S=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u5907\u6CE8")])]),n("tbody",null,[n("tr",null,[n("td",null,"content"),n("td",null,"\u6D88\u606F\u5185\u5BB9"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"options"),n("td",null,"\u9009\u914D\u5C5E\u6027"),n("td",null,"{ time: \u52A0\u8F7D\u65F6\u957F, icon: \u56FE\u6807 }")])])],-1),T={setup(W,{expose:k}){k({frontmatter:{}});let i=function(){p.msg("\u666E\u901A\u6D88\u606F",{time:1e3})},r=function(){p.msg("\u6210\u529F\u6D88\u606F",{icon:1,time:1e3})},m=function(){p.msg("\u5931\u8D25\u6D88\u606F",{icon:2,time:1e3})},g=function(){p.msg("\u8B66\u544A\u6D88\u606F",{icon:3,time:1e3})},y=function(){p.msg("\u8BE6\u60C5\u6D88\u606F",{icon:4,time:1e3})},d=function(){p.msg("\u52A0\u8F7D\u6D88\u606F",{icon:16,time:1e3})};return(N,V)=>{const l=e("lay-field"),o=e("lay-button"),u=e("lay-code"),f=e("lay-table-box"),_=e("lay-comment");return b(),v("div",w,[s(l,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),s(u,null,{code:t(()=>[x]),default:t(()=>[s(o,{type:"primary",onClick:c(i)},{default:t(()=>[h]),_:1},8,["onClick"])]),_:1}),s(l,{title:"\u6307\u5B9A\u56FE\u6807",style:{"margin-top":"20px","margin-bottom":"20px"}}),s(u,null,{code:t(()=>[C]),default:t(()=>[s(o,{type:"primary",onClick:c(r)},{default:t(()=>[q]),_:1},8,["onClick"]),s(o,{type:"primary",onClick:c(m)},{default:t(()=>[j]),_:1},8,["onClick"]),s(o,{type:"primary",onClick:c(g)},{default:t(()=>[F]),_:1},8,["onClick"]),s(o,{type:"primary",onClick:c(y)},{default:t(()=>[L]),_:1},8,["onClick"]),s(o,{type:"primary",onClick:c(d)},{default:t(()=>[M]),_:1},8,["onClick"])]),_:1}),s(l,{title:"\u7EC4\u4EF6\u65B9\u6CD5",style:{"margin-top":"20px","margin-bottom":"20px"}}),P,s(l,{title:"\u7EC4\u4EF6\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),s(f,null,{default:t(()=>[S]),_:1}),s(_)])}}};export{T as default};
|