nav.js 351 B

123456789101112131415161718192021
  1. export default {
  2. state: {
  3. channelId: 'rec'
  4. },
  5. getters: {
  6. channelId (state) {
  7. return state.channelId
  8. }
  9. },
  10. mutations: {
  11. CHANGE_CHANNEL_ID (state, channelId) {
  12. state.channelId = channelId
  13. }
  14. },
  15. actions: {
  16. changeChannelId ({ commit }, channelId) {
  17. commit('CHANGE_CHANNEL_ID', channelId)
  18. }
  19. }
  20. }