Commit df8a81f6582b01cfe6b500b4bd8c3260c0586fe1
Committed by
Gitee
!705 修复 vben 代码生成错误
Merge pull request !705 from xingyu/fix/vben_codegen
Showing
3 changed files
with
12 additions
and
11 deletions
yudao-dependencies/pom.xml
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | <mybatis-plus.version>3.5.4</mybatis-plus.version> | 27 | <mybatis-plus.version>3.5.4</mybatis-plus.version> |
| 28 | <mybatis-plus-generator.version>3.5.4</mybatis-plus-generator.version> | 28 | <mybatis-plus-generator.version>3.5.4</mybatis-plus-generator.version> |
| 29 | <dynamic-datasource.version>3.6.1</dynamic-datasource.version> | 29 | <dynamic-datasource.version>3.6.1</dynamic-datasource.version> |
| 30 | - <mybatis-plus-join.version>1.4.6</mybatis-plus-join.version> | 30 | + <mybatis-plus-join.version>1.4.7</mybatis-plus-join.version> |
| 31 | <redisson.version>3.18.0</redisson.version> | 31 | <redisson.version>3.18.0</redisson.version> |
| 32 | <dm8.jdbc.version>8.1.3.62</dm8.jdbc.version> | 32 | <dm8.jdbc.version>8.1.3.62</dm8.jdbc.version> |
| 33 | <!-- 服务保障相关 --> | 33 | <!-- 服务保障相关 --> |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/api/api.ts.vm
| 1 | -import {defHttp} from '@/utils/http/axios' | 1 | +import { defHttp } from '@/utils/http/axios' |
| 2 | #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") | 2 | #set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}") |
| 3 | 3 | ||
| 4 | // 查询${table.classComment}列表 | 4 | // 查询${table.classComment}列表 |
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/index.vue.vm
| 1 | <script lang="ts" setup> | 1 | <script lang="ts" setup> |
| 2 | - import {columns, searchFormSchema} from './' | ||
| 3 | - import {useI18n} from '@/hooks/web/useI18n' | ||
| 4 | - import {useMessage} from '@/hooks/web/useMessage' | ||
| 5 | - import {useModal} from '@/components/Modal' | ||
| 6 | - import {useTable} from '@/components/Table' | ||
| 7 | - import { delete${ simpleClassName }, export${ simpleClassName }, get${ simpleClassName } Page } from '@/api/${table.moduleName}/${classNameVar}' | 2 | +import ${simpleClassName}Modal from './${simpleClassName}Modal.vue' |
| 3 | +import { columns, searchFormSchema } from './${classNameVar}.data' | ||
| 4 | +import { useI18n } from '@/hooks/web/useI18n' | ||
| 5 | +import { useMessage } from '@/hooks/web/useMessage' | ||
| 6 | +import { useModal } from '@/components/Modal' | ||
| 7 | +import { useTable } from '@/components/Table' | ||
| 8 | +import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${classNameVar}' | ||
| 8 | 9 | ||
| 9 | defineOptions({ name: '${table.className}' }) | 10 | defineOptions({ name: '${table.className}' }) |
| 10 | 11 | ||
| @@ -14,7 +15,7 @@ const [registerModal, { openModal }] = useModal() | @@ -14,7 +15,7 @@ const [registerModal, { openModal }] = useModal() | ||
| 14 | 15 | ||
| 15 | const [registerTable, { getForm, reload }] = useTable({ | 16 | const [registerTable, { getForm, reload }] = useTable({ |
| 16 | title: '${table.classComment}列表', | 17 | title: '${table.classComment}列表', |
| 17 | - api: get${ simpleClassName }Page, | 18 | + api: get${simpleClassName}Page, |
| 18 | columns, | 19 | columns, |
| 19 | formConfig: { labelWidth: 120, schemas: searchFormSchema }, | 20 | formConfig: { labelWidth: 120, schemas: searchFormSchema }, |
| 20 | useSearchForm: true, | 21 | useSearchForm: true, |
| @@ -41,14 +42,14 @@ async function handleExport() { | @@ -41,14 +42,14 @@ async function handleExport() { | ||
| 41 | iconType: 'warning', | 42 | iconType: 'warning', |
| 42 | content: t('common.exportMessage'), | 43 | content: t('common.exportMessage'), |
| 43 | async onOk() { | 44 | async onOk() { |
| 44 | - await export${ simpleClassName } (getForm().getFieldsValue()) | 45 | + await export${simpleClassName}(getForm().getFieldsValue()) |
| 45 | createMessage.success(t('common.exportSuccessText')) | 46 | createMessage.success(t('common.exportSuccessText')) |
| 46 | }, | 47 | }, |
| 47 | }) | 48 | }) |
| 48 | } | 49 | } |
| 49 | 50 | ||
| 50 | async function handleDelete(record: Recordable) { | 51 | async function handleDelete(record: Recordable) { |
| 51 | - await delete${ simpleClassName } (record.id) | 52 | + await delete${simpleClassName}(record.id) |
| 52 | createMessage.success(t('common.delSuccessText')) | 53 | createMessage.success(t('common.delSuccessText')) |
| 53 | reload() | 54 | reload() |
| 54 | } | 55 | } |