mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-03 11:48:14 +00:00
2 lines
441 B
JavaScript
2 lines
441 B
JavaScript
import{Y as r}from"./plugin-vue_export-helper-85a4d40b.js";const u=100,v=600,m={beforeMount(l,s){const e=s.value,{interval:i=u,delay:c=v}=r(e)?{}:e;let t,n;const o=()=>r(e)?e():e.handler(),a=()=>{n&&(clearTimeout(n),n=void 0),t&&(clearInterval(t),t=void 0)};l.addEventListener("mousedown",d=>{d.button===0&&(a(),o(),document.addEventListener("mouseup",()=>a(),{once:!0}),n=setTimeout(()=>{t=setInterval(()=>{o()},i)},c))})}};export{m as v};
|