交易所前端蓝色ui 4.5 jiem
lxf
2025-04-18 02a3d94d359b34e915f34abec024cbc1504a6a7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { defineStore } from "pinia";
 
export const useCountryCodeStore = defineStore("countryCode", {
  // state 持久化
  persist: true,
  state: () => {
    return {
      code: "1",
      iso2: "us",
    };
  },
  getters: {},
  actions: {
    async updateCountry(val) {
      this.code = val;
    },
    async updateIso2(val) {
      this.iso2 = val;
    },
    async resetCountry() {
      this.code = "1";
      this.iso2 = "us";
    },
  },
});