修复结账金额和后台类型

This commit is contained in:
yml
2026-05-27 10:28:05 +08:00
parent 6fb5de204c
commit c54e3936ab
7 changed files with 311 additions and 48 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import { ref, type Ref } from 'vue'
interface AdminQueryOptions<T> {
fetchFn: () => Promise<T>
immediate?: boolean
initialData?: T
}
interface AdminQueryResult<T> {
@@ -15,7 +16,7 @@ interface AdminQueryResult<T> {
export function useAdminQuery<T>(options: AdminQueryOptions<T>): AdminQueryResult<T> {
const loading = ref(false)
const error = ref<string | null>(null)
const data = ref<T>() as Ref<T>
const data = ref<T>(options.initialData as T) as Ref<T>
async function load() {
loading.value = true