mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 13:13:09 +00:00
refactor(CURD): 移除搜索功能及相关代码
移除不再使用的搜索功能,包括工具栏中的搜索按钮、搜索区域切换按钮及相关事件处理逻辑。 同时更新模板文件和相关配置,确保代码一致性。 调整页面布局样式,优化执行日志抽屉的显示效果。 在代码生成器中添加保存按钮,允许在配置过程中保存当前进度。
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
<PageContent
|
||||
ref="contentRef"
|
||||
:content-config="contentConfig"
|
||||
@search-click="handleToggleSearch"
|
||||
@add-click="handleOpenDialog('create')"
|
||||
>
|
||||
<template #toolbar="{ toolbarRight, onToolbar, removeIds, cols }">
|
||||
@@ -334,7 +333,6 @@ const searchConfig = reactive<ISearchConfig>({
|
||||
colon: true,
|
||||
isExpandable: true,
|
||||
showNumber: 2,
|
||||
showToggle: false,
|
||||
form: { labelWidth: "auto" },
|
||||
formItems: [
|
||||
{% for column in columns %}
|
||||
@@ -473,7 +471,7 @@ const contentConfig = reactive<IContentConfig<{{ class_name }}PageQuery>>({
|
||||
initialFetch: false,
|
||||
cols: contentCols as IContentConfig["cols"],
|
||||
toolbar: [],
|
||||
defaultToolbar: ["import", "export", "patch", "search", "refresh", "filter"],
|
||||
defaultToolbar: ["import", "export", "patch", "refresh", "filter"],
|
||||
pagination: {
|
||||
pageSize: 10,
|
||||
pageSizes: [10, 20, 30, 50],
|
||||
@@ -562,10 +560,6 @@ const dictTypes: string[] = [
|
||||
{% endfor %}
|
||||
];
|
||||
|
||||
function handleToggleSearch() {
|
||||
searchRef.value?.toggleVisible();
|
||||
}
|
||||
|
||||
function handleRowDelete(id: number) {
|
||||
contentRef.value?.handleDelete(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user