import { defineStore } from 'pinia'
import { isMobile } from "@/utils"

const useAppStore = defineStore("app", {
  state: () => ({
    device: isMobile() ? "phone" : "pc"
  }),
  actions: {
    // 手动更换，再pc端中，视口少于768px会使用
   setDevice(device){
    this.device = device
   }
  },
});

export default useAppStore;
