!705 修复 vben 代码生成错误

Merge pull request !705 from xingyu/fix/vben_codegen
This commit is contained in:
芋道源码 2023-10-30 12:08:54 +00:00 committed by Gitee
commit df8a81f658
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 12 additions and 11 deletions

View File

@ -27,7 +27,7 @@
<mybatis-plus.version>3.5.4</mybatis-plus.version>
<mybatis-plus-generator.version>3.5.4</mybatis-plus-generator.version>
<dynamic-datasource.version>3.6.1</dynamic-datasource.version>
<mybatis-plus-join.version>1.4.6</mybatis-plus-join.version>
<mybatis-plus-join.version>1.4.7</mybatis-plus-join.version>
<redisson.version>3.18.0</redisson.version>
<dm8.jdbc.version>8.1.3.62</dm8.jdbc.version>
<!-- 服务保障相关 -->

View File

@ -1,4 +1,4 @@
import {defHttp} from '@/utils/http/axios'
import { defHttp } from '@/utils/http/axios'
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
// 查询${table.classComment}列表

View File

@ -1,10 +1,11 @@
<script lang="ts" setup>
import {columns, searchFormSchema} from './'
import {useI18n} from '@/hooks/web/useI18n'
import {useMessage} from '@/hooks/web/useMessage'
import {useModal} from '@/components/Modal'
import {useTable} from '@/components/Table'
import { delete${ simpleClassName }, export${ simpleClassName }, get${ simpleClassName } Page } from '@/api/${table.moduleName}/${classNameVar}'
import ${simpleClassName}Modal from './${simpleClassName}Modal.vue'
import { columns, searchFormSchema } from './${classNameVar}.data'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import { useTable } from '@/components/Table'
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${classNameVar}'
defineOptions({ name: '${table.className}' })
@ -14,7 +15,7 @@ const [registerModal, { openModal }] = useModal()
const [registerTable, { getForm, reload }] = useTable({
title: '${table.classComment}列表',
api: get${ simpleClassName }Page,
api: get${simpleClassName}Page,
columns,
formConfig: { labelWidth: 120, schemas: searchFormSchema },
useSearchForm: true,
@ -41,14 +42,14 @@ async function handleExport() {
iconType: 'warning',
content: t('common.exportMessage'),
async onOk() {
await export${ simpleClassName } (getForm().getFieldsValue())
await export${simpleClassName}(getForm().getFieldsValue())
createMessage.success(t('common.exportSuccessText'))
},
})
}
async function handleDelete(record: Recordable) {
await delete${ simpleClassName } (record.id)
await delete${simpleClassName}(record.id)
createMessage.success(t('common.delSuccessText'))
reload()
}