42 lines
646 B
JavaScript
42 lines
646 B
JavaScript
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,
|
|
// };
|