import{e8 as E,l as v,d as N,r as i,d9 as P,aE as R,o as V,c as A,w as o,i as j,j as t,W as I,al as X,B as h,p as c,e9 as q,X as z,v as G}from"./index-9PRMimni.js";function y(r){let a,s=document.body;if(Reflect.has(r,"target")||Reflect.has(r,"props")){const n=r;a=n.props||{},s=n.target||document.body}else a=r;const l=E(a,void 0,!0);return[()=>{const n=v(s);n&&l.open(n)},()=>{l.close()},n=>{l.setTip(n)}]}const H=N({__name:"basic",setup(r){const a=i(null),s=i(!1),l=i(!1),p=i(!1),f=i("rgba(0, 0, 0, 0.4)"),g=i("加载中..."),[n,b]=y({tip:"加载中..."}),[L,k]=y({target:a,props:{tip:"加载中...",absolute:!0}});function C(){L(),setTimeout(()=>{k()},2e3)}function _(m){l.value=m,p.value=!0,setTimeout(()=>{p.value=!1},2e3)}function T(){_(!0)}function w(){_(!1)}function x(){n(),setTimeout(()=>{b()},2e3)}function B(){s.value=!0,setTimeout(()=>{s.value=!1},2e3)}return(m,e)=>{const d=X,u=h,F=I,W=z,D=P("loading");return R((V(),A(W,{title:"Loading 组件示例",content:"通常用于，加载数据，或者操作数据，需要一定等待时间使用，从而缓解用户焦躁情绪","loading-tip":"加载中..."},{default:o(()=>[j("div",{ref_key:"wrapEl",ref:a},[t(F,{bordered:!1,class:"mt-3 proCard loading"},{default:o(()=>[t(d,{title:"组件方式",type:"info"}),t(u,{class:"my-4 mr-4",type:"primary",onClick:w},{default:o(()=>e[0]||(e[0]=[c(" 全屏 Loading ")])),_:1}),t(u,{class:"my-4 mr-4",type:"primary",onClick:T},{default:o(()=>e[1]||(e[1]=[c(" 容器内 Loading ")])),_:1}),t(d,{title:"函数方式",type:"info"}),t(u,{class:"my-4 mr-4",type:"primary",onClick:x},{default:o(()=>e[2]||(e[2]=[c(" 全屏 Loading ")])),_:1}),t(u,{class:"my-4 mr-4",type:"primary",onClick:C},{default:o(()=>e[3]||(e[3]=[c(" 容器内 Loading ")])),_:1}),t(d,{title:"指令方式",type:"info"}),t(u,{class:"my-4 mr-4",type:"primary",onClick:B},{default:o(()=>e[4]||(e[4]=[c(" 打开指令Loading ")])),_:1}),t(v(q),{loading:p.value,absolute:l.value,background:f.value,tip:g.value},null,8,["loading","absolute","background","tip"])]),_:1})],512)]),_:1})),[[D,s.value]])}}}),K=G(H,[["__scopeId","data-v-a696c371"]]);export{K as default};
