generated from maochaoying/dreamworks-frontend-template
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.
29 lines
593 B
29 lines
593 B
import { defineStore } from 'pinia'
|
|
|
|
export const useTabStore = defineStore({
|
|
id: 'tab', // id必填,且需要唯一
|
|
// state
|
|
state: () => {
|
|
return {
|
|
activeStep: 1,
|
|
activeTab: 1,
|
|
preActiveTab: 1,
|
|
isLogin: false,
|
|
}
|
|
},
|
|
// actions
|
|
actions: {
|
|
updateIsLogin(isLogin) {
|
|
this.isLogin = isLogin
|
|
},
|
|
updatePreActiveTab(preActiveTab) {
|
|
this.preActiveTab = preActiveTab
|
|
},
|
|
updateActiveStep(activeStep) {
|
|
this.activeStep = activeStep
|
|
},
|
|
updateActiveTab(activeTab) {
|
|
this.activeTab = activeTab
|
|
},
|
|
},
|
|
})
|