
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{Bt as e,Kt as t,M as n,_ as r,an as i,b as a,on as o}from"./src-CLMBPGj1.js";import{B as s,C as c,m as l}from"./reactivity.esm-bundler-D9OPVc9J.js";import{D as u,E as d,Ht as f,_ as p,b as m,k as h,mt as g,qt as _,v,y}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{t as b}from"./page-header-CflkT4MF.js";import{t as x}from"./useToast-aEPMbKJy.js";var S=h({__name:`vueuse`,setup(h){function S(){x().success(`Toast`)}let C=i(()=>{S()},1e3),w=o(()=>{S()},1e3),T=c(`test`),{text:E,copy:D,copied:O,isSupported:k}=t({legacy:!0});f(O,e=>{e&&x().success(E.value)});function A(e){window.open(e,`_blank`)}return(t,i)=>{let o=e,c=n,f=b,h=r,x=a;return g(),m(`div`,null,[u(f,{title:`VueUse`,description:`VueUse 是一个 Vue Composition API 实用程序的集合，更多 API 和例子请查看 VueUse 官网。`},{default:_(()=>[u(c,{variant:`outline`,size:`icon`,onClick:i[0]||(i[0]=e=>A(`https://github.com/vueuse/vueuse`))},{default:_(()=>[u(o,{name:`i-simple-icons:github`})]),_:1})]),_:1}),u(h,{title:`debounce`,"main-class":`flex-col-start gap-2`},{default:_(()=>[i[4]||(i[4]=p(`p`,{class:`mt-0`},` 所谓防抖，就是指触发事件后在 n 秒内函数只能执行一次，如果在 n 秒内又触发了事件，则会重新计算函数执行时间。 `,-1)),u(c,{onClick:s(C)},{default:_(()=>[...i[3]||(i[3]=[d(` 连续点击我，只会执行最后一次点击事件 `,-1)])]),_:1},8,[`onClick`])]),_:1}),u(h,{title:`throttle`,"main-class":`flex-col-start gap-2`},{default:_(()=>[i[6]||(i[6]=p(`p`,{class:`mt-0`},` 所谓节流，就是指连续触发事件但是在 n 秒中只执行一次函数。节流会稀释函数的执行频率。 `,-1)),u(c,{onClick:s(w)},{default:_(()=>[...i[5]||(i[5]=[d(` 连续点击我，每一秒只会执行一次点击事件 `,-1)])]),_:1},8,[`onClick`])]),_:1}),s(k)?(g(),v(h,{key:0,title:`clipboard`,"main-class":`flex-center-start gap-2`},{default:_(()=>[u(x,{modelValue:s(T),"onUpdate:modelValue":i[1]||(i[1]=e=>l(T)?T.value=e:null)},null,8,[`modelValue`]),u(c,{onClick:i[2]||(i[2]=e=>s(D)(s(T)))},{default:_(()=>[...i[7]||(i[7]=[d(` 复制 `,-1)])]),_:1})]),_:1})):y(``,!0)])}}});export{S as default};