export default {
  data() {
    return {
      setTs: [],
    };
  },
  methods: {
    addSetTime(action, time = 1 * 1000) {
      this.setTs.push(setTimeout(action, time));
    },
    clearSetTs() {
      if (!this.setTs.length) return;
      this.setTs.forEach((t) => clearTimeout(t));
      this.setTs = [];
    },
  },
};