mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	feat: 新增生成代码接口(后端代码)
This commit is contained in:
		| @@ -75,3 +75,7 @@ export interface GeneratorConfigRecord { | ||||
| export function saveConfig(tableName: string, req: GeneratorConfigRecord) { | ||||
|   return axios.post(`${BASE_URL}/config/${tableName}`, req); | ||||
| } | ||||
|  | ||||
| export function generate(tableName: string) { | ||||
|   return axios.post(`${BASE_URL}/${tableName}`); | ||||
| } | ||||
|   | ||||
| @@ -298,6 +298,7 @@ | ||||
|     getGenConfig, | ||||
|     GeneratorConfigRecord, | ||||
|     saveConfig, | ||||
|     generate, | ||||
|   } from '@/api/tool/generator'; | ||||
|  | ||||
|   const { proxy } = getCurrentInstance() as any; | ||||
| @@ -434,7 +435,9 @@ | ||||
|    * @param tableName 表名称 | ||||
|    */ | ||||
|   const handleGenerate = (tableName: string) => { | ||||
|     proxy.$message.info('功能尚在开发中'); | ||||
|     generate(tableName).then((res) => { | ||||
|       proxy.$message.success(res.msg); | ||||
|     }); | ||||
|   }; | ||||
|  | ||||
|   /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user