diff --git a/src/api/dict.ts b/src/api/dict.ts index b9512005..83cd675d 100644 --- a/src/api/dict.ts +++ b/src/api/dict.ts @@ -34,7 +34,6 @@ class DictAPI { * 新增字典 * * @param data 字典表单数据 - * @returns 请求结果 */ static add(data: DictForm) { return request({ @@ -49,7 +48,6 @@ class DictAPI { * * @param id 字典ID * @param data 字典表单数据 - * @returns 请求结果 */ static update(id: number, data: DictForm) { return request({ @@ -63,7 +61,6 @@ class DictAPI { * 删除字典 * * @param ids 字典ID,多个以英文逗号(,)分隔 - * @returns 请求结果 */ static deleteByIds(ids: string) { return request({ @@ -72,6 +69,18 @@ class DictAPI { }); } + /** + * 获取字典列表 + * + * @returns 字典列表 + */ + static getList() { + return request({ + url: `${DICT_BASE_URL}/list`, + method: "get", + }); + } + /** * 获取字典的数据项 * diff --git a/src/views/generator/index.vue b/src/views/generator/index.vue index 07563aec..4e73a093 100644 --- a/src/views/generator/index.vue +++ b/src/views/generator/index.vue @@ -223,6 +223,21 @@ + + + + - +