Commit 8562b3486ca9c1d4de8090f11104adcfa2df5ebd

Authored by 芋道源码
Committed by Gitee
2 parents 2866b587 b6df0c33

!241 fix: 代码生成vue3模板

Merge pull request !241 from W./master
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm
... ... @@ -5,31 +5,31 @@ const request = useAxios()
5 5  
6 6 #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
7 7 // 查询${table.classComment}列表
8   -export const getPostPageApi = async (params: ${simpleClassName}PageReqVO) => {
  8 +export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => {
9 9 return await request.get({ url: '${baseURL}/page', params })
10 10 }
11 11  
12 12 // 查询${table.classComment}详情
13   -export const getPostApi = async (id: number) => {
  13 +export const get${simpleClassName}Api = async (id: number) => {
14 14 return await request.get({ url: '${baseURL}/get?id=' + id })
15 15 }
16 16  
17 17 // 新增${table.classComment}
18   -export const createPostApi = async (data: ${simpleClassName}VO) => {
  18 +export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
19 19 return await request.post({ url: '${baseURL}/create', data })
20 20 }
21 21  
22 22 // 修改${table.classComment}
23   -export const updatePostApi = async (data: ${simpleClassName}VO) => {
  23 +export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
24 24 return await request.put({ url: '${baseURL}/update', data })
25 25 }
26 26  
27 27 // 删除${table.classComment}
28   -export const deletePostApi = async (id: number) => {
  28 +export const delete${simpleClassName}Api = async (id: number) => {
29 29 return await request.delete({ url: '${baseURL}/delete?id=' + id })
30 30 }
31 31  
32 32 // 导出${table.classComment} Excel
33   -export const exportPostApi = async (params: ${simpleClassName}ExcelReqVO) => {
  33 +export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => {
34 34 return await request.download({ url: '${baseURL}/export-excel', params })
35 35 }
... ...
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
... ... @@ -6,9 +6,9 @@
6 6 import { useTable } from '@/hooks/web/useTable'
7 7 import { useI18n } from '@/hooks/web/useI18n'
8 8 import { FormExpose } from '@/components/Form'
9   - import type { ${simpleClassName}VO } from '@/api/system/post/types'
10   - import { rules, allSchemas } from './post.data'
11   - import * as ${simpleClassName}Api from '@/api/system/post'
  9 + import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${simpleClassName}/types'
  10 + import { rules, allSchemas } from './${simpleClassName}.data'
  11 + import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}'
12 12 const { t } = useI18n() // 国际化
13 13  
14 14 // ========== 列表相关 ==========
... ...