mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
fix:代码生成模板修改
This commit is contained in:
parent
2866b58741
commit
b6df0c336c
@ -5,31 +5,31 @@ const request = useAxios()
|
|||||||
|
|
||||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||||
// 查询${table.classComment}列表
|
// 查询${table.classComment}列表
|
||||||
export const getPostPageApi = async (params: ${simpleClassName}PageReqVO) => {
|
export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => {
|
||||||
return await request.get({ url: '${baseURL}/page', params })
|
return await request.get({ url: '${baseURL}/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询${table.classComment}详情
|
// 查询${table.classComment}详情
|
||||||
export const getPostApi = async (id: number) => {
|
export const get${simpleClassName}Api = async (id: number) => {
|
||||||
return await request.get({ url: '${baseURL}/get?id=' + id })
|
return await request.get({ url: '${baseURL}/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增${table.classComment}
|
// 新增${table.classComment}
|
||||||
export const createPostApi = async (data: ${simpleClassName}VO) => {
|
export const create${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
|
||||||
return await request.post({ url: '${baseURL}/create', data })
|
return await request.post({ url: '${baseURL}/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改${table.classComment}
|
// 修改${table.classComment}
|
||||||
export const updatePostApi = async (data: ${simpleClassName}VO) => {
|
export const update${simpleClassName}Api = async (data: ${simpleClassName}VO) => {
|
||||||
return await request.put({ url: '${baseURL}/update', data })
|
return await request.put({ url: '${baseURL}/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除${table.classComment}
|
// 删除${table.classComment}
|
||||||
export const deletePostApi = async (id: number) => {
|
export const delete${simpleClassName}Api = async (id: number) => {
|
||||||
return await request.delete({ url: '${baseURL}/delete?id=' + id })
|
return await request.delete({ url: '${baseURL}/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出${table.classComment} Excel
|
// 导出${table.classComment} Excel
|
||||||
export const exportPostApi = async (params: ${simpleClassName}ExcelReqVO) => {
|
export const export${simpleClassName}Api = async (params: ${simpleClassName}ExcelReqVO) => {
|
||||||
return await request.download({ url: '${baseURL}/export-excel', params })
|
return await request.download({ url: '${baseURL}/export-excel', params })
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
import { useTable } from '@/hooks/web/useTable'
|
import { useTable } from '@/hooks/web/useTable'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { FormExpose } from '@/components/Form'
|
import { FormExpose } from '@/components/Form'
|
||||||
import type { ${simpleClassName}VO } from '@/api/system/post/types'
|
import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${simpleClassName}/types'
|
||||||
import { rules, allSchemas } from './post.data'
|
import { rules, allSchemas } from './${simpleClassName}.data'
|
||||||
import * as ${simpleClassName}Api from '@/api/system/post'
|
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}'
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
// ========== 列表相关 ==========
|
// ========== 列表相关 ==========
|
||||||
|
Loading…
Reference in New Issue
Block a user