| 1 |
- import{c as o,T as t}from"./mobile.802c6d51.js";import{r as s,o as i,e as n,j as a,g as l}from"./vendor.b923255f.js";import"./index.639e5353.js";const{createDemo:e}=o("toast"),r=e({setup:()=>({textToast:o=>{t.text(o)},successToast:o=>{t.success(o)},errorToast:o=>{t.fail(o)},warningToast:o=>{t.warn(o)},loadingToast:o=>{t.loading(o)},NoToast:o=>{t.text(o,{duration:0})},NoLoading:o=>{t.loading(o,{cover:!0})}})}),c={class:"demo"},T=l("h2",null,"基本用法",-1),d=l("h2",null,"Toast不消失",-1),k=l("h2",null,"Loading带透明遮罩",-1);r.render=function(o,t,l,e,r,u){const g=s("nut-cell");return i(),n("div",c,[T,a(g,{title:"Text 文字提示","is-link":"",onClick:t[0]||(t[0]=t=>o.textToast("网络失败,请稍后再试~"))}),a(g,{title:"Success 成功提示","is-link":"",onClick:t[1]||(t[1]=t=>o.successToast("成功提示"))}),a(g,{title:"Error 失败提示","is-link":"",onClick:t[2]||(t[2]=t=>o.errorToast("失败提示"))}),a(g,{title:"Warning 警告提示","is-link":"",onClick:t[3]||(t[3]=t=>o.warningToast("警告提示"))}),a(g,{title:"Loading 加载提示","is-link":"",onClick:t[4]||(t[4]=t=>o.loadingToast("加载中"))}),d,a(g,{title:"Toast 文字提示不消失","is-link":"",onClick:t[5]||(t[5]=t=>o.NoToast("Toast不消失~"))}),k,a(g,{title:"带文案+带透明遮罩+自动消失","is-link":"",onClick:t[6]||(t[6]=t=>o.NoLoading("加载中~"))})])};export{r as default};
|