交易所前端蓝色ui 4.5 jiem
jhzh
2025-05-19 c5487881d04780e03f4dd86ed1606c587f2c7952
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";
    },
  },
});