mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-09 11:12:02 +00:00
refactor: 将组件前缀从Art统一替换为Fa
- 更新所有FA前缀的组件文件 - 新增Fa前缀的对应组件 - 更新所有引用路径和组件名 - 修改相关样式和变量名 - 调整部分组件目录结构
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!-- 日志管理:Art 布局 + useTable,与 dict 页一致 -->
|
||||
<template>
|
||||
<div class="art-full-height">
|
||||
<ArtSearchBar
|
||||
<FaSearchBar
|
||||
v-show="showSearchBar"
|
||||
ref="searchBarRef"
|
||||
v-model="searchForm"
|
||||
@@ -24,17 +24,17 @@
|
||||
@clear-click="afterUserSelectSearch"
|
||||
/>
|
||||
</template>
|
||||
</ArtSearchBar>
|
||||
</FaSearchBar>
|
||||
|
||||
<ElCard class="art-table-card" :style="{ 'margin-top': showSearchBar ? '12px' : '0' }">
|
||||
<ArtTableHeader
|
||||
<FaTableHeader
|
||||
v-model:columns="columnChecks"
|
||||
v-model:showSearchBar="showSearchBar"
|
||||
:loading="loading"
|
||||
@refresh="refreshData"
|
||||
>
|
||||
<template #left>
|
||||
<ArtTableHeaderLeft
|
||||
<FaTableHeaderLeft
|
||||
:remove-ids="selectedIds"
|
||||
:perm-export="['module_system:log:export']"
|
||||
:perm-delete="['module_system:log:delete']"
|
||||
@@ -43,10 +43,10 @@
|
||||
@delete="handleBatchDelete"
|
||||
/>
|
||||
</template>
|
||||
</ArtTableHeader>
|
||||
</FaTableHeader>
|
||||
|
||||
<ArtTable
|
||||
ref="artTableRef"
|
||||
<FaTable
|
||||
ref="FaTableRef"
|
||||
:loading="loading"
|
||||
:data="data"
|
||||
:columns="columns"
|
||||
@@ -57,7 +57,7 @@
|
||||
/>
|
||||
</ElCard>
|
||||
|
||||
<ArtDialog
|
||||
<FaDialog
|
||||
v-model="dialogVisible.visible"
|
||||
:title="dialogVisible.title"
|
||||
width="960px"
|
||||
@@ -130,9 +130,9 @@
|
||||
<ElButton type="primary" @click="handleCloseDialog">确定</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
</ArtDialog>
|
||||
</FaDialog>
|
||||
|
||||
<ArtExportDialog
|
||||
<FaExportDialog
|
||||
v-model="exportModalVisible"
|
||||
:content-config="logExportContentConfig"
|
||||
:query-params="exportQueryParams"
|
||||
@@ -145,14 +145,14 @@
|
||||
<script setup lang="ts">
|
||||
import { h, computed, ref, nextTick } from "vue";
|
||||
import { useTable } from "@/hooks/core/useTable";
|
||||
import ArtTable from "@/components/Core/tables/art-table/index.vue";
|
||||
import ArtTableHeader from "@/components/Core/tables/art-table-header/index.vue";
|
||||
import ArtTableHeaderLeft from "@/components/Core/tables/art-table-header-left/index.vue";
|
||||
import ArtExportDialog from "@/components/Core/modal/art-export-dialog/index.vue";
|
||||
import type { IObject } from "@/components/Core/modal/types";
|
||||
import ArtSearchBar from "@/components/Core/forms/art-search-bar/index.vue";
|
||||
import type { SearchFormItem } from "@/components/Core/forms/art-search-bar/index.vue";
|
||||
import ArtDialog from "@/components/Core/modal/art-dialog/index.vue";
|
||||
import FaTable from "@/components/tables/fa-table/index.vue";
|
||||
import FaTableHeader from "@/components/tables/fa-table-header/index.vue";
|
||||
import FaTableHeaderLeft from "@/components/tables/fa-table-header-left/index.vue";
|
||||
import FaExportDialog from "@/components/modal/fa-export-dialog/index.vue";
|
||||
import type { IObject } from "@/components/modal/types";
|
||||
import FaSearchBar from "@/components/forms/fa-search-bar/index.vue";
|
||||
import type { SearchFormItem } from "@/components/forms/fa-search-bar/index.vue";
|
||||
import FaDialog from "@/components/modal/fa-dialog/index.vue";
|
||||
import JsonPretty from "@/components/JsonPretty/index.vue";
|
||||
import CopyButton from "@/components/CopyButton/index.vue";
|
||||
import type { ColumnOption } from "@/types/component";
|
||||
@@ -204,7 +204,7 @@ const searchForm = ref<LogSearchForm>({
|
||||
});
|
||||
|
||||
const showSearchBar = ref(true);
|
||||
const searchBarRef = ref<InstanceType<typeof ArtSearchBar> | null>(null);
|
||||
const searchBarRef = ref<InstanceType<typeof FaSearchBar> | null>(null);
|
||||
const searchBarRules: Record<string, unknown> = {};
|
||||
|
||||
const logTypeOptions = ref([
|
||||
@@ -255,7 +255,7 @@ const logSearchItems = computed<SearchFormItem[]>(() => [
|
||||
},
|
||||
]);
|
||||
|
||||
const artTableRef = ref<{ elTableRef?: { clearSelection: () => void } } | null>(null);
|
||||
const FaTableRef = ref<{ elTableRef?: { clearSelection: () => void } } | null>(null);
|
||||
const selectedRows = ref<LogTable[]>([]);
|
||||
const selectedIds = computed(() =>
|
||||
selectedRows.value.map((r) => r.id).filter((id): id is number => id != null && !Number.isNaN(id))
|
||||
@@ -483,7 +483,7 @@ function deleteLogRow(id: number) {
|
||||
.then(async () => {
|
||||
await LogAPI.deleteLog([id]);
|
||||
ElMessage.success("删除成功");
|
||||
artTableRef.value?.elTableRef?.clearSelection();
|
||||
FaTableRef.value?.elTableRef?.clearSelection();
|
||||
await refreshRemove();
|
||||
})
|
||||
.catch(() => {});
|
||||
@@ -533,7 +533,7 @@ function handleBatchDelete() {
|
||||
batchDeleting.value = true;
|
||||
await LogAPI.deleteLog(ids);
|
||||
ElMessage.success("删除成功");
|
||||
artTableRef.value?.elTableRef?.clearSelection();
|
||||
FaTableRef.value?.elTableRef?.clearSelection();
|
||||
await refreshRemove();
|
||||
} finally {
|
||||
batchDeleting.value = false;
|
||||
|
||||
Reference in New Issue
Block a user