layui/example/dist/assets/confirm.2baa1607.js

43 lines
8.7 KiB
JavaScript
Raw Normal View History

import"./index.8d5473b0.js";import{r as o,o as y,h as g,e as a,d as s,z as l,f as n,g as t,a0 as u}from"./vendor.e7911ee1.js";const f={class:"markdown-body"},_=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-button")]),t(),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"},'"'),t("primary"),n("span",{class:"token punctuation"},'"')]),t(),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"},'"'),t("openConfirm1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),t("\u4FE1\u606F\u6846"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-button")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" layer "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},'"../../../../src/index.ts"'),t(`
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"openConfirm1"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirm"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"layui-vue 1.0.0 \u5DF2\u7ECF\u53D1\u5E03"'),n("span",{class:"token punctuation"},")"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
openConfirm1
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
`)])],-1),b=t("\u4FE1\u606F\u6846"),x=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("lay-button")]),t(),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"},'"'),t("primary"),n("span",{class:"token punctuation"},'"')]),t(),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"},'"'),t("openConfirm2"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),t("\u8BE2\u95EE\u6846"),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("lay-button")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("template")]),n("span",{class:"token punctuation"},">")]),t(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),t("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[t(`
`),n("span",{class:"token keyword"},"import"),t(),n("span",{class:"token punctuation"},"{"),t(" layer "),n("span",{class:"token punctuation"},"}"),t(),n("span",{class:"token keyword"},"from"),t(),n("span",{class:"token string"},'"../../../../src/index.ts"'),t(`
`),n("span",{class:"token keyword"},"export"),t(),n("span",{class:"token keyword"},"default"),t(),n("span",{class:"token punctuation"},"{"),t(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
`),n("span",{class:"token keyword"},"const"),t(),n("span",{class:"token function-variable function"},"openConfirm2"),t(),n("span",{class:"token operator"},"="),t(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),t(),n("span",{class:"token punctuation"},"{"),t(`
layer`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirm"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u4F60\u5982\u4F55\u770B\u5F85 layui-vue \u7684\u53D1\u5E03"'),n("span",{class:"token punctuation"},","),t(),n("span",{class:"token punctuation"},"{"),t("btn"),n("span",{class:"token operator"},":"),t(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"{"),t("text"),n("span",{class:"token operator"},":"),n("span",{class:"token string"},"'\u7AD9\u7740\u770B'"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),n("span",{class:"token punctuation"},"{"),t("text"),n("span",{class:"token operator"},":"),n("span",{class:"token string"},"'\u5750\u7740\u770B'"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token keyword"},"return"),t(),n("span",{class:"token punctuation"},"{"),t(`
openConfirm2
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`),n("span",{class:"token punctuation"},"}"),t(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),t("script")]),n("span",{class:"token punctuation"},">")]),t(`
`)])],-1),v=t("\u8BE2\u95EE\u6846"),w=n("div",{class:"language-"},[n("pre",null,[n("code",{"v-pre":""},`layer.confirm(content, options)
`)])],-1),h=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,"\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, btn: \u6309\u94AE\u7EC4 }")])])],-1),z={setup(C,{expose:i}){i({frontmatter:{}});let k=function(){u.confirm("layui-vue 1.0.0 \u5DF2\u7ECF\u53D1\u5E03")},r=function(){u.confirm("\u4F60\u5982\u4F55\u770B\u5F85 layui-vue \u7684\u53D1\u5E03",{btn:[{text:"\u7AD9\u7740\u770B"},{text:"\u5750\u7740\u770B"}]})};return(q,B)=>{const e=o("lay-field"),c=o("lay-button"),p=o("lay-code"),m=o("lay-table-box"),d=o("lay-comment");return y(),g("div",f,[a(e,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),a(p,null,{code:s(()=>[_]),default:s(()=>[a(c,{type:"primary",onClick:l(k)},{default:s(()=>[b]),_:1},8,["onClick"])]),_:1}),a(e,{title:"\u6307\u5B9A\u64CD\u4F5C",style:{"margin-top":"20px","margin-bottom":"20px"}}),a(p,null,{code:s(()=>[x]),default:s(()=>[a(c,{type:"primary",onClick:l(r)},{default:s(()=>[v]),_:1},8,["onClick"])]),_:1}),a(e,{title:"\u7EC4\u4EF6\u65B9\u6CD5",style:{"margin-top":"20px","margin-bottom":"20px"}}),w,a(e,{title:"\u7EC4\u4EF6\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),a(m,null,{default:s(()=>[h]),_:1}),a(d)])}}};export{z as default};