适配QX TF 390+特性

This commit is contained in:
Peng-YM
2020-10-04 10:37:04 +08:00
parent e6288b1355
commit d058762b45
6 changed files with 51 additions and 6 deletions

View File

@@ -15,13 +15,14 @@ const store = new Vuex.Store({
subscriptions: {},
collections: {},
env: {},
settings: {}
},
mutations: {
COPY(state, text) {
state.clipboard = text;
state.clipboard = text;
},
// UI
SET_NAV_TITLE(state, title) {
@@ -56,6 +57,12 @@ const store = new Vuex.Store({
state.collections = data;
});
},
// fetch env
async FETCH_ENV({state}) {
return axios.get("/env").then(resp => {
state.env = resp.data;
})
},
// update subscriptions
async UPDATE_SUBSCRIPTION({dispatch}, {name, sub}) {
return axios.patch(`/sub/${name}`, sub).then(() => {