fix: Top-level await is not available in the configured target environment

This commit is contained in:
xingyu4j
2025-10-13 10:55:54 +08:00
parent a4561b3dd8
commit 7b7ca39d83
4 changed files with 30 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemTenantPackageApi } from '#/api/system/tenant-package';
import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
@@ -8,7 +9,13 @@ import { z } from '#/adapter/form';
import { getTenantPackageList } from '#/api/system/tenant-package';
import { getRangePickerDefaultProps } from '#/utils';
const tenantPackageList = await getTenantPackageList();
let tenantPackageList: SystemTenantPackageApi.TenantPackage[] = [];
async function getTenantPackageData() {
tenantPackageList = await getTenantPackageList();
}
getTenantPackageData();
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {