lock-click.js 367 B

123456789101112131415161718192021
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.lockClick = lockClick;
  4. var lockCount = 0;
  5. function lockClick(lock) {
  6. if (lock) {
  7. if (!lockCount) {
  8. document.body.classList.add('van-toast--unclickable');
  9. }
  10. lockCount++;
  11. } else {
  12. lockCount--;
  13. if (!lockCount) {
  14. document.body.classList.remove('van-toast--unclickable');
  15. }
  16. }
  17. }