lock-click.js 300 B

12345678910111213141516
  1. var lockCount = 0;
  2. export function lockClick(lock) {
  3. if (lock) {
  4. if (!lockCount) {
  5. document.body.classList.add('van-toast--unclickable');
  6. }
  7. lockCount++;
  8. } else {
  9. lockCount--;
  10. if (!lockCount) {
  11. document.body.classList.remove('van-toast--unclickable');
  12. }
  13. }
  14. }