Commit b5a4a5446eaf74ebbf02d515f216e33758520654
1 parent
3eb11e26
fix: vue3 代码生成错误
Showing
2 changed files
with
4 additions
and
6 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/api/api.ts.vm
| 1 | -import { useAxios } from '@/hooks/web/useAxios' | |
| 1 | +import request from '@/config/axios' | |
| 2 | 2 | import { ${simpleClassName}VO, ${simpleClassName}PageReqVO, ${simpleClassName}ExcelReqVO } from './types' |
| 3 | 3 | |
| 4 | -const request = useAxios() | |
| 5 | - | |
| 6 | 4 | #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") |
| 7 | 5 | // 查询${table.classComment}列表 |
| 8 | 6 | export const get${simpleClassName}PageApi = async (params: ${simpleClassName}PageReqVO) => { | ... | ... |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
| ... | ... | @@ -6,9 +6,9 @@ import { DICT_TYPE } from '@/utils/dict' |
| 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/${table.moduleName}/${simpleClassName}/types' | |
| 10 | -import { rules, allSchemas } from './${simpleClassName}.data' | |
| 11 | -import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${simpleClassName}' | |
| 9 | +import type { ${simpleClassName}VO } from '@/api/${table.moduleName}/${classNameVar}/types' | |
| 10 | +import { rules, allSchemas } from './${classNameVar}.data' | |
| 11 | +import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${classNameVar}' | |
| 12 | 12 | const { t } = useI18n() // 国际化 |
| 13 | 13 | |
| 14 | 14 | // ========== 列表相关 ========== | ... | ... |