chore: 完善代码生成模板

This commit is contained in:
Charles7c 2024-04-22 19:57:24 +08:00
parent 96db9948c5
commit da3a4e0756
2 changed files with 8 additions and 2 deletions

View File

@ -56,3 +56,8 @@ export function update${classNamePrefix}(data: any, id: string) {
export function delete${classNamePrefix}(id: string) {
return http.del(`${'$'}{BASE_URL}/${'$'}{id}`)
}
/** @desc 导出${businessName} */
export function export${classNamePrefix}(query: ${classNamePrefix}Query) {
return http.download<any>(`${'$'}{BASE_URL}/export`, query)
}

View File

@ -35,6 +35,9 @@
</a-button>
</a-tooltip>
</template>
<template #name="{ record }">
<a-link @click="onDetail(record)">{{ record.name }}</a-link>
</template>
<template #action="{ record }">
<a-space>
<a-link v-permission="['${apiModuleName}:${apiName}:update']" @click="onUpdate(record)">修改</a-link>
@ -60,8 +63,6 @@
import { list${classNamePrefix}, delete${classNamePrefix}, export${classNamePrefix}, type ${classNamePrefix}Resp, type ${classNamePrefix}Query } from '@/apis'
import ${classNamePrefix}AddModal from './${classNamePrefix}AddModal.vue'
import ${classNamePrefix}DetailDrawer from './${classNamePrefix}DetailDrawer.vue'
import { Message } from '@arco-design/web-vue'
import type { TreeInstance } from '@arco-design/web-vue'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable, useDownload } from '@/hooks'
import { isMobile } from '@/utils'