import { computed } from 'vue'
import { useRoute } from 'vue-router'

/**
 * Mock模式检测
 * 根据route.path是否以/mock开头判断
 */
export function useMockMode() {
  const route = useRoute()
  const isMock = computed(() => route.path.startsWith('/mock'))
  return { isMock }
}
