土壤
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

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineStore } from 'pinia'
  2. export const useTabStore = defineStore({
  3. id: 'tab', // id必填,且需要唯一
  4. // state
  5. state: () => {
  6. return {
  7. activeStep: 1,
  8. activeTab: 1,
  9. preActiveTab: 1,
  10. isLogin: false,
  11. }
  12. },
  13. // actions
  14. actions: {
  15. updateIsLogin(isLogin) {
  16. this.isLogin = isLogin
  17. },
  18. updatePreActiveTab(preActiveTab) {
  19. this.preActiveTab = preActiveTab
  20. },
  21. updateActiveStep(activeStep) {
  22. this.activeStep = activeStep
  23. },
  24. updateActiveTab(activeTab) {
  25. this.activeTab = activeTab
  26. },
  27. },
  28. })