wctdreamlandwebsite-front/store/storageData.js

42 lines
646 B
JavaScript
Raw Normal View History

2023-03-15 15:30:46 +08:00
export const state = () => ({
ip: "",
headers: "",
newsList: [],
count: 0,
total: 0,
});
export const mutations = {
addIp(state, text) {
state.ip = text;
},
addHeaders(state, text) {
state.headers = text;
},
changeNewsList(state, text) {
state.newsList = text;
},
changeCount(state, text) {
state.count = text;
},
};
export const actions = {
setData(store) {
setTimeout(() => {
store.commit("addIp");
}, 3000);
},
setHeaders(store) {
setTimeout(() => {
store.commit("addHeaders");
}, 3000);
},
};
// export default {
// state,
// mutations,
// actions,
// };