feat: 前端搭建

This commit is contained in:
Gsh
2025-06-17 22:37:37 +08:00
parent 4830be6388
commit 0cd795f57a
1228 changed files with 23627 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
import type { GetSessionListVO } from '@/api/model/types';
import { defineStore } from 'pinia';
import { getModelList } from '@/api';
// 模型管理
export const useModelStore = defineStore('model', () => {
// 当前模型
const currentModelInfo = ref<GetSessionListVO>({});
// 设置当前模型
const setCurrentModelInfo = (modelInfo: GetSessionListVO) => {
currentModelInfo.value = modelInfo;
};
// 模型菜单列表
const modelList = ref<GetSessionListVO[]>([]);
// 请求模型菜单列表
const requestModelList = async () => {
try {
const res = await getModelList();
modelList.value = res.data;
}
catch (error) {
console.error('requestModelList错误', error);
}
};
return {
currentModelInfo,
setCurrentModelInfo,
modelList,
requestModelList,
};
});