doc: add methods to store

This commit is contained in:
Leon Xu
2021-12-31 12:05:03 -08:00
parent 0b7267194f
commit 624c14caff
+7
View File
@@ -4,6 +4,13 @@ const state = reactive({
user: null,
});
const methods = {
setUser(payload) {
state.user = payload ? payload.user : null;
},
};
export default {
state,
methods,
};