notice.js 347 B

1234567891011121314151617181920212223242526
  1. const state = {
  2. noticeItem: null
  3. };
  4. const mutations = {
  5. SET_NOTICE_ITEM(state, item) {
  6. state.noticeItem = item;
  7. },
  8. CLEAR_NOTICE_ITEM(state) {
  9. state.noticeItem = null;
  10. }
  11. };
  12. const actions = {};
  13. const getters = {
  14. getNoticeItem: (state) => state.noticeItem
  15. };
  16. export default {
  17. namespaced: true,
  18. state,
  19. mutations,
  20. actions,
  21. getters
  22. };