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.
 
 
 
 
 

37 lines
787 B

/** @format */
import { defineStore } from "pinia";
import { ref } from "vue";
// 定义 Store
export const useMarketSituationStore = defineStore(
"marketSituation",
() => {
const cardData = ref([]);
const gloablCardData = ref([]);
const marketDetailCardData = ref([]);
const countryMarketCardData = ref([]);
// 记得 return
return {
cardData,
gloablCardData,
marketDetailCardData,
countryMarketCardData,
};
},
// TODO: 持久化
{
// 网页端持久化
// persist: true,
// 小程序端持久化
persist: {
storage: {
getItem(key) {
return uni.getStorageSync(key);
},
setItem(key, value) {
uni.setStorageSync(key, value);
},
},
},
}
);