You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import {createStore} from 'vuex';
|
|
|
|
|
|
|
|
export default createStore({
|
|
|
|
modules: {},
|
|
|
|
state: {
|
|
|
|
update_dialog_show: false,
|
|
|
|
update_config: {},
|
|
|
|
update_status: {},
|
|
|
|
ec_api_data: {},
|
|
|
|
ec_select_api: []
|
|
|
|
},
|
|
|
|
getters: {
|
|
|
|
dialog_change: state => {
|
|
|
|
state.update_dialog_show = !state.update_dialog_show
|
|
|
|
return state.update_dialog_show
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
add_update_cine: (state, payload) => {
|
|
|
|
state.update_config[payload.ip] = payload.config
|
|
|
|
},
|
|
|
|
add_update_status: (state, payload) => {
|
|
|
|
state.update_status[payload.ip] = payload.status
|
|
|
|
},
|
|
|
|
change_update_status: (state, ip) => {
|
|
|
|
if (state.update_status[ip] !== undefined) {
|
|
|
|
state.update_status[ip] = !state.update_status[ip]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
clear_update_status: (state, ip) => {
|
|
|
|
if (state.update_status[ip]) {
|
|
|
|
delete state.update_status[ip]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
actions: {},
|
|
|
|
})
|