diff --git a/src/dashboard-front/src/views/resource/setting/comps/table-res-to-add.vue b/src/dashboard-front/src/views/resource/setting/comps/table-res-to-action.vue
similarity index 94%
rename from src/dashboard-front/src/views/resource/setting/comps/table-res-to-add.vue
rename to src/dashboard-front/src/views/resource/setting/comps/table-res-to-action.vue
index c0de6f555..4989a6723 100644
--- a/src/dashboard-front/src/views/resource/setting/comps/table-res-to-add.vue
+++ b/src/dashboard-front/src/views/resource/setting/comps/table-res-to-action.vue
@@ -16,7 +16,7 @@
@@ -37,7 +37,7 @@
@@ -169,7 +169,12 @@
-
-
diff --git a/src/dashboard-front/src/views/resource/setting/import.vue b/src/dashboard-front/src/views/resource/setting/import.vue
index 90b5d6634..5c4a09393 100644
--- a/src/dashboard-front/src/views/resource/setting/import.vue
+++ b/src/dashboard-front/src/views/resource/setting/import.vue
@@ -257,7 +257,9 @@
@@ -309,7 +311,9 @@
@@ -579,9 +583,12 @@ import EditImportResourceSideSlider from "@/views/resource/setting/comps/edit-im
import DownloadDialog from "@/views/resource/setting/comps/download-dialog.vue";
import PluginPreviewSideSlider from '@/views/resource/setting/comps/plugin-preview-side-slider.vue';
import ResourceDocSideSlider from '@/views/components/resource-doc-slider/index.vue';
-import { IImportedResource, ILocalImportedResource } from '@/views/resource/setting/types';
-import TableResToAdd from '@/views/resource/setting/comps/table-res-to-add.vue';
-import TableResToUpdate from '@/views/resource/setting/comps/table-res-to-update.vue';
+import {
+ ActionType,
+ IImportedResource,
+ ILocalImportedResource,
+} from '@/views/resource/setting/types';
+import TableResToAction from '@/views/resource/setting/comps/table-res-to-action.vue';
import TableResToUncheck from '@/views/resource/setting/comps/table-res-to-uncheck.vue';
import { useParentElement } from '@vueuse/core';
@@ -1176,7 +1183,7 @@ const tempAuthConfig = ref({
});
// 批量修改认证方式确认后
-const handleConfirmAuthConfigPopConfirm = (action: 'add' | 'update') => {
+const handleConfirmAuthConfigPopConfirm = (action: ActionType) => {
if (tempAuthConfig.value.app_verified_required === false) tempAuthConfig.value.resource_perm_required = false;
tableData.value.filter(item => !item._unchecked)
.forEach(data => {
@@ -1194,7 +1201,7 @@ const tempPublicConfig = ref({
});
// 批量修改公开设置确认后
-const handleConfirmPublicConfigPopConfirm = (action: 'add' | 'update') => {
+const handleConfirmPublicConfigPopConfirm = (action: ActionType) => {
const isPublic = tempPublicConfig.value.is_public;
const allowApplyPermission = tempPublicConfig.value.allow_apply_permission && isPublic;
@@ -1211,7 +1218,7 @@ const filterInputAdd = ref('')
const filterInputAddClone = ref('')
const filterInputUpdate = ref('')
const filterInputUpdateClone = ref('')
-const filterData = (action: 'add' | 'update') => {
+const filterData = (action: ActionType) => {
if (action === 'add') {
filterInputAdd.value = filterInputAddClone.value;
}
diff --git a/src/dashboard-front/src/views/resource/setting/types.d.ts b/src/dashboard-front/src/views/resource/setting/types.d.ts
index 78720be94..c026598e5 100644
--- a/src/dashboard-front/src/views/resource/setting/types.d.ts
+++ b/src/dashboard-front/src/views/resource/setting/types.d.ts
@@ -1,4 +1,5 @@
type TRequestMethod = 'ANY' | 'DELETE' | 'GET' | 'PATCH' | 'POST' | 'PUT';
+type ActionType = 'add' | 'update';
interface IAuthConfig {
auth_verified_required: boolean;
@@ -60,6 +61,7 @@ interface ILocalImportedResource extends Partial {
}
export {
+ ActionType,
IBackend,
IBackendConfig,
IAuthConfig,