import { router } from "@/router/index.ts";
import { ref } from 'vue'
export const useMain = () => {
    const taskId = ref('')
  // 获取页面传参
  const getQuery = () => {
    const { id } = router.currentRoute.value.query;
    taskId.value = ( id || '') as string
  }

  const state = {
    taskId,
  }

  return {
    state: state,
    api: {
      getQuery
    },
    requestMap: {
    }
  }
}
