feat:统一两端 data.ts 关联数据的加载逻辑(写法)

This commit is contained in:
YunaiV
2025-10-18 17:14:28 +08:00
parent 2288748ca8
commit 769510c4f6
12 changed files with 29 additions and 60 deletions

View File

@@ -9,12 +9,9 @@ import { z } from '#/adapter/form';
import { getSimpleArticleCategoryList } from '#/api/mall/promotion/articleCategory';
import { getRangePickerDefaultProps } from '#/utils';
/** 关联数据 */
let categoryList: MallArticleCategoryApi.ArticleCategory[] = [];
async function getCategoryData() {
categoryList = await getSimpleArticleCategoryList();
}
getCategoryData();
getSimpleArticleCategoryList().then((data) => (categoryList = data));
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {