feat:【infra】移动端 admin uniapp 的代码生成的优化(components 调整成 modules)
This commit is contained in:
parent
1979084ca9
commit
67ed6d0a55
@ -96,7 +96,7 @@ public class CodegenEngine {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后端的配置模版
|
* 前端的配置模版
|
||||||
*
|
*
|
||||||
* key1:UI 模版的类型 {@link CodegenFrontTypeEnum#getType()}
|
* key1:UI 模版的类型 {@link CodegenFrontTypeEnum#getType()}
|
||||||
* key2:模板在 resources 的地址
|
* key2:模板在 resources 的地址
|
||||||
@ -141,8 +141,8 @@ public class CodegenEngine {
|
|||||||
vue3UniappFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
vue3UniappFilePath("api/${table.moduleName}/${table.businessName}/index.ts"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/index.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/index.vue"),
|
||||||
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/index.vue"))
|
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("components/search-form.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("modules/search-form.vue"),
|
||||||
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/components/search-form.vue"))
|
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/modules/search-form.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/form/index.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/form/index.vue"),
|
||||||
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/form/index.vue"))
|
vue3UniappFilePath("pages-${table.moduleName}/${table.businessName}/form/index.vue"))
|
||||||
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/detail/index.vue"),
|
.put(CodegenFrontTypeEnum.VUE3_ADMIN_UNIAPP_WOT.getType(), vue3AdminUniappTemplatePath("views/detail/index.vue"),
|
||||||
|
|||||||
@ -28,6 +28,7 @@ export interface ${simpleClassName} {
|
|||||||
#end
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @AI:`/system/operate-log/get?id=${id}` 类似这种
|
||||||
/** 获取${table.classComment}分页列表 */
|
/** 获取${table.classComment}分页列表 */
|
||||||
export function get${simpleClassName}Page(params: PageParam) {
|
export function get${simpleClassName}Page(params: PageParam) {
|
||||||
return http.get<PageResult<${simpleClassName}>>('/${table.moduleName}/${simpleClassName_strikeCase}/page', params)
|
return http.get<PageResult<${simpleClassName}>>('/${table.moduleName}/${simpleClassName_strikeCase}/page', params)
|
||||||
@ -48,6 +49,7 @@ export function update${simpleClassName}(data: ${simpleClassName}) {
|
|||||||
return http.put<boolean>('/${table.moduleName}/${simpleClassName_strikeCase}/update', data)
|
return http.put<boolean>('/${table.moduleName}/${simpleClassName_strikeCase}/update', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO @AI:`/system/operate-log/get?id=${id}` 类似这种
|
||||||
/** 删除${table.classComment} */
|
/** 删除${table.classComment} */
|
||||||
export function delete${simpleClassName}(id: ${primaryTsType}) {
|
export function delete${simpleClassName}(id: ${primaryTsType}) {
|
||||||
return http.delete<boolean>('/${table.moduleName}/${simpleClassName_strikeCase}/delete?id=' + id)
|
return http.delete<boolean>('/${table.moduleName}/${simpleClassName_strikeCase}/delete?id=' + id)
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
import type { SearchFormData } from './components/search-form.vue'
|
import type { SearchFormData } from './modules/search-form.vue'
|
||||||
import type { ${simpleClassName} } from '@/api/${table.moduleName}/${table.businessName}'
|
import type { ${simpleClassName} } from '@/api/${table.moduleName}/${table.businessName}'
|
||||||
import type { LoadMoreState } from '@/http/types'
|
import type { LoadMoreState } from '@/http/types'
|
||||||
import { onReachBottom } from '@dcloudio/uni-app'
|
import { onReachBottom } from '@dcloudio/uni-app'
|
||||||
@ -125,7 +125,7 @@ import { DICT_TYPE } from '@/utils/constants'
|
|||||||
#if ($hasDateTime == 1)
|
#if ($hasDateTime == 1)
|
||||||
import { formatDateTime } from '@/utils/date'
|
import { formatDateTime } from '@/utils/date'
|
||||||
#end
|
#end
|
||||||
import SearchForm from './components/search-form.vue'
|
import SearchForm from './modules/search-form.vue'
|
||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
style: {
|
style: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user