mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-09 16:57:16 +08:00
chore: 优化代码生成模板
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="gi_page">
|
||||
<a-card title="${businessName}管理" class="general-card">
|
||||
<div class="table-page">
|
||||
<GiTable
|
||||
ref="tableRef"
|
||||
row-key="id"
|
||||
title="${businessName}管理"
|
||||
:data="dataList"
|
||||
:columns="columns"
|
||||
:loading="loading"
|
||||
@@ -53,7 +53,6 @@
|
||||
</a-space>
|
||||
</template>
|
||||
</GiTable>
|
||||
</a-card>
|
||||
|
||||
<${classNamePrefix}AddModal ref="${classNamePrefix}AddModalRef" @save-success="search" />
|
||||
<${classNamePrefix}DetailDrawer ref="${classNamePrefix}DetailDrawerRef" />
|
||||
@@ -88,16 +87,6 @@ const {
|
||||
handleDelete
|
||||
} = 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[] = [
|
||||
<#if fieldConfigs??>
|
||||
<#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) => {
|
||||
return handleDelete(() => delete${classNamePrefix}(item.id), {
|
||||
|
||||
Reference in New Issue
Block a user