From 29135b7d3c37b841a28d7b5f3a6068970914303f Mon Sep 17 00:00:00 2001 From: rca Date: Thu, 18 Jul 2024 23:07:27 +0900 Subject: [PATCH] =?UTF-8?q?mutation=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/account/mutations.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/store/account/mutations.ts b/src/store/account/mutations.ts index 70d45da..c1fc550 100644 --- a/src/store/account/mutations.ts +++ b/src/store/account/mutations.ts @@ -1,9 +1,15 @@ import { MutationTree } from 'vuex'; -import { ExampleStateInterface } from './state'; +import { AccountStateInterface } from './state'; -const mutation: MutationTree = { - someMutation (/* state: ExampleStateInterface */) { - // your code +const mutation: MutationTree = { + setToken(state: AccountStateInterface, token: string) { + state.token = token; + }, + setUsername(state: AccountStateInterface, username: string) { + state.username = username; + }, + setLoggedIn(state: AccountStateInterface, isLoggedIn: boolean) { + state.isLoggedIn = isLoggedIn; } };