context.js 487 B

1234567891011121314151617181920212223
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.context = void 0;
  4. var context = {
  5. zIndex: 2000,
  6. lockCount: 0,
  7. stack: [],
  8. find: function find(vm) {
  9. return this.stack.filter(function (item) {
  10. return item.vm === vm;
  11. })[0];
  12. },
  13. remove: function remove(vm) {
  14. var item = this.find(vm);
  15. if (!item) return;
  16. item.vm = null;
  17. item.overlay = null;
  18. var index = this.stack.indexOf(item);
  19. this.stack.splice(index, 1);
  20. }
  21. };
  22. exports.context = context;