mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 16:57:12 +08:00
refactor(generator): 更新代码生成列表模板
This commit is contained in:
@@ -102,10 +102,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { TableInstance } from '@arco-design/web-vue'
|
||||||
import ${classNamePrefix}AddModal from './${classNamePrefix}AddModal.vue'
|
import ${classNamePrefix}AddModal from './${classNamePrefix}AddModal.vue'
|
||||||
import ${classNamePrefix}DetailDrawer from './${classNamePrefix}DetailDrawer.vue'
|
import ${classNamePrefix}DetailDrawer from './${classNamePrefix}DetailDrawer.vue'
|
||||||
import { type ${classNamePrefix}Resp, type ${classNamePrefix}Query, delete${classNamePrefix}, export${classNamePrefix}, list${classNamePrefix} } from '@/apis/${apiModuleName}/${apiName}'
|
import { type ${classNamePrefix}Resp, type ${classNamePrefix}Query, delete${classNamePrefix}, export${classNamePrefix}, list${classNamePrefix} } from '@/apis/${apiModuleName}/${apiName}'
|
||||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
|
||||||
import { useDownload, useTable } from '@/hooks'
|
import { useDownload, useTable } from '@/hooks'
|
||||||
import { useDict } from '@/hooks/app'
|
import { useDict } from '@/hooks/app'
|
||||||
import { isMobile } from '@/utils'
|
import { isMobile } from '@/utils'
|
||||||
@@ -133,7 +133,7 @@ const {
|
|||||||
search,
|
search,
|
||||||
handleDelete
|
handleDelete
|
||||||
} = useTable((page) => list${classNamePrefix}({ ...queryForm, ...page }), { immediate: true })
|
} = useTable((page) => list${classNamePrefix}({ ...queryForm, ...page }), { immediate: true })
|
||||||
const columns = ref<TableInstanceColumns[]>([
|
const columns: TableInstance['columns'] = [
|
||||||
<#if fieldConfigs??>
|
<#if fieldConfigs??>
|
||||||
<#list fieldConfigs as fieldConfig>
|
<#list fieldConfigs as fieldConfig>
|
||||||
<#if fieldConfig.showInList>
|
<#if fieldConfig.showInList>
|
||||||
@@ -156,7 +156,7 @@ const columns = ref<TableInstanceColumns[]>([
|
|||||||
fixed: !isMobile() ? 'right' : undefined,
|
fixed: !isMobile() ? 'right' : undefined,
|
||||||
show: has.hasPermOr(['${apiModuleName}:${apiName}:detail', '${apiModuleName}:${apiName}:update', '${apiModuleName}:${apiName}:delete'])
|
show: has.hasPermOr(['${apiModuleName}:${apiName}:detail', '${apiModuleName}:${apiName}:update', '${apiModuleName}:${apiName}:delete'])
|
||||||
}
|
}
|
||||||
]);
|
]
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
|
Reference in New Issue
Block a user