const state = { courseId: '', testId: '', shareCourseId: '' } const mutations = { SET_COURSEID: (state, courseId) => { state.courseId = courseId }, SET_TESTID: (state, courseId) => { state.testId = courseId }, SET_SHARECOURSEID: (state, courseId) => { state.shareCourseId = courseId } } const actions = {} export default { state, mutations, actions }