feat:统一两端 data.ts 关联数据的加载逻辑(写法)
This commit is contained in:
@@ -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[] {
|
||||
|
||||
Reference in New Issue
Block a user