frontend/src/store/meetingManagement.js

33 lines
536 B
JavaScript
Raw Normal View History

2024-06-24 03:56:21 +00:00
const state = {
meetings: []
}
const mutations = {
setMeetings(state, meetings) {
state.meetings = meetings
}
}
const actions = {
fetchMeetings({ commit }) {
// 模拟API调用
const meetings = [
{ id: 1, title: 'Meeting 1' },
{ id: 2, title: 'Meeting 2' }
]
commit('setMeetings', meetings)
}
}
const getters = {
allMeetings: state => state.meetings
}
export default {
namespaced: true,
state,
mutations,
actions,
getters
}