mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
fix: reset firewall import dialogs on open (#13198)
This commit is contained in:
@@ -88,7 +88,7 @@ const displayData = ref<any>([]);
|
||||
const currentRules = ref<Host.RuleInfo[]>([]);
|
||||
|
||||
const uploadRef = ref();
|
||||
const uploaderFiles = ref();
|
||||
const uploaderFiles = ref<UploadFiles>([]);
|
||||
const pageData = ref([]);
|
||||
const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
@@ -97,12 +97,23 @@ const paginationConfig = reactive({
|
||||
});
|
||||
|
||||
const acceptParams = async (): Promise<void> => {
|
||||
resetImportData();
|
||||
visible.value = true;
|
||||
displayData.value = [];
|
||||
selects.value = [];
|
||||
|
||||
loadCurrentData();
|
||||
};
|
||||
|
||||
const resetImportData = () => {
|
||||
loading.value = false;
|
||||
displayData.value = [];
|
||||
pageData.value = [];
|
||||
selects.value = [];
|
||||
uploaderFiles.value = [];
|
||||
paginationConfig.currentPage = 1;
|
||||
paginationConfig.total = 0;
|
||||
uploadRef.value?.clearFiles();
|
||||
};
|
||||
|
||||
const loadCurrentData = async () => {
|
||||
const res = await searchFireRule({
|
||||
type: 'address',
|
||||
|
||||
@@ -90,7 +90,7 @@ const displayData = ref<any>([]);
|
||||
const currentRules = ref<Host.RuleInfo[]>([]);
|
||||
|
||||
const uploadRef = ref();
|
||||
const uploaderFiles = ref();
|
||||
const uploaderFiles = ref<UploadFiles>([]);
|
||||
const pageData = ref([]);
|
||||
const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
@@ -99,13 +99,23 @@ const paginationConfig = reactive({
|
||||
});
|
||||
|
||||
const acceptParams = async (): Promise<void> => {
|
||||
resetImportData();
|
||||
visible.value = true;
|
||||
displayData.value = [];
|
||||
selects.value = [];
|
||||
|
||||
loadCurrentData();
|
||||
};
|
||||
|
||||
const resetImportData = () => {
|
||||
loading.value = false;
|
||||
displayData.value = [];
|
||||
pageData.value = [];
|
||||
selects.value = [];
|
||||
uploaderFiles.value = [];
|
||||
paginationConfig.currentPage = 1;
|
||||
paginationConfig.total = 0;
|
||||
uploadRef.value?.clearFiles();
|
||||
};
|
||||
|
||||
const loadCurrentData = async () => {
|
||||
const res = await searchFireRule({
|
||||
type: 'port',
|
||||
|
||||
Reference in New Issue
Block a user