mutations.js 523 Bytes
Newer Older
wanli's avatar
wanli committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
export default {
  /**
   * Modal window state
   * @param state
   * @param show
   * @param modalName
   */
  setModalState(state, { show, modalName }) {
    state.showModal = show;
    state.modalName = modalName;
  },

  /**
   * Clear modal
   * @param state
   */
  clearModal(state) {
    state.showModal = false;
    state.modalName = null;
  },

  /**
   * Main modal block - set height
   * @param state
   * @param height
   */
  setModalBlockHeight(state, height) {
    state.modalBlockHeight = height;
  },
};