| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import {
- WorkspaceAddDatas,
- SceneListType,
- GetListWorkshop,
- getSceneList,
- LabelModuleListType,
- } from '@/api/scene/sceneOperate';
- import { WorkShopTempleteType } from '@/api/scene/secene-templet';
- import { defineStore } from 'pinia';
- import { ref } from 'vue';
- // export function useScene() {
- // //场景数据
- // const tableData = ref<
- // SceneListType<GetListWorkshop<WorkspaceAddDatas, WorkShopTempleteType>, LabelModuleListType>[]
- // >([]);
- // const getSceneDetail = () => {
- // getSceneList().then((res) => {
- // tableData.value = res;
- // });
- // };
- // return { tableData, getSceneDetail };
- // }
- export const useScene = defineStore('scene-data', () => {
- //场景数据
- const tableData = ref<
- SceneListType<GetListWorkshop<WorkspaceAddDatas, WorkShopTempleteType>, LabelModuleListType>[]
- >([]);
- const getSceneDetail = () => {
- getSceneList().then((res) => {
- tableData.value = res;
- });
- };
- return { tableData, getSceneDetail };
- });
- export default useScene;
|