From 04a019e35695179ee03cc0eae4eccb9b9a6e5c7a Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Tue, 30 Jul 2024 00:23:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=94=AF=E6=8C=81=E5=AD=97=E5=85=B8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dict.ts | 15 +++++++-- src/views/generator/index.vue | 62 +++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 24 deletions(-) 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 @@ + + + + - +