| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import { defineStore } from 'pinia';
- import { ref, computed } from 'vue';
- import client from "./client";
- import icpList from "../../utils/ipc";
- const clientStore = client();
- export const configInfo = defineStore('config',()=>{
- //作废了
- const digiCamControlPath = ref("C:\\Program Files (x86)\\digiCamControl")
- const updateDigiCamControlPath = (data:string)=>{
- digiCamControlPath.value = data
- }
- const userDataPath = ref("")
- clientStore.ipc.send(icpList.utils.getUserDir);
- clientStore.ipc.on(icpList.utils.getUserDir, async (event, result) => {
- userDataPath.value = result;
- })
- // 1 为拍照并处理图像 2 为仅处理图像
- const appModel = ref(1)
- const updateAppModel = (data:number)=>{
- appModel.value = data
- }
- return {
- digiCamControlPath,
- updateDigiCamControlPath,
- appModel,
- updateAppModel,
- userDataPath,
- }
- },{
- persist:true,
- })
- export default configInfo;
|