Ver Fonte

feat: increase support for multiple time zones

 * 优化实现方法
zhongming4762 há 7 meses atrás
pai
commit
f46ae023ba
1 ficheiros alterados com 6 adições e 5 exclusões
  1. 6 5
      playground/src/api/core/timezone.ts

+ 6 - 5
playground/src/api/core/timezone.ts

@@ -1,14 +1,15 @@
-import type { TimezoneOption } from '@vben/types';
-
 import { requestClient } from '#/api/request';
 
 /**
  * 获取系统支持的时区列表
  */
 export async function getTimezoneOptionsApi() {
-  return await requestClient.get<TimezoneOption[]>(
-    '/timezone/getTimezoneOptions',
-  );
+  return await requestClient.get<
+    {
+      label: string;
+      value: string;
+    }[]
+  >('/timezone/getTimezoneOptions');
 }
 /**
  * 获取用户时区