mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-09 05:01:41 +08:00
chore: 优化代码生成模板
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="gi_page">
|
<div class="table-page">
|
||||||
<a-card title="${businessName}管理" class="general-card">
|
|
||||||
<GiTable
|
<GiTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
|
title="${businessName}管理"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -53,7 +53,6 @@
|
|||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
</GiTable>
|
</GiTable>
|
||||||
</a-card>
|
|
||||||
|
|
||||||
<${classNamePrefix}AddModal ref="${classNamePrefix}AddModalRef" @save-success="search" />
|
<${classNamePrefix}AddModal ref="${classNamePrefix}AddModalRef" @save-success="search" />
|
||||||
<${classNamePrefix}DetailDrawer ref="${classNamePrefix}DetailDrawerRef" />
|
<${classNamePrefix}DetailDrawer ref="${classNamePrefix}DetailDrawerRef" />
|
||||||
@@ -88,16 +87,6 @@ const {
|
|||||||
handleDelete
|
handleDelete
|
||||||
} = useTable((p) => list${classNamePrefix}({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
} = useTable((p) => list${classNamePrefix}({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
|
||||||
|
|
||||||
// 重置
|
|
||||||
const reset = () => {
|
|
||||||
<#list fieldConfigs as fieldConfig>
|
|
||||||
<#if fieldConfig.showInQuery>
|
|
||||||
queryForm.${fieldConfig.fieldName} = undefined
|
|
||||||
</#if>
|
|
||||||
</#list>
|
|
||||||
search()
|
|
||||||
}
|
|
||||||
|
|
||||||
const columns: TableInstanceColumns[] = [
|
const columns: TableInstanceColumns[] = [
|
||||||
<#if fieldConfigs??>
|
<#if fieldConfigs??>
|
||||||
<#list fieldConfigs as fieldConfig>
|
<#list fieldConfigs as fieldConfig>
|
||||||
@@ -116,6 +105,16 @@ const columns: TableInstanceColumns[] = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
const reset = () => {
|
||||||
|
<#list fieldConfigs as fieldConfig>
|
||||||
|
<#if fieldConfig.showInQuery>
|
||||||
|
queryForm.${fieldConfig.fieldName} = undefined
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
search()
|
||||||
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const onDelete = (item: ${classNamePrefix}Resp) => {
|
const onDelete = (item: ${classNamePrefix}Resp) => {
|
||||||
return handleDelete(() => delete${classNamePrefix}(item.id), {
|
return handleDelete(() => delete${classNamePrefix}(item.id), {
|
||||||
|
|||||||
Reference in New Issue
Block a user