refactor: 运营设置-数据刷新

This commit is contained in:
QuentinHsu
2024-05-13 18:14:57 +08:00
parent b283365ebc
commit 98c347e048
9 changed files with 18 additions and 28 deletions

View File

@@ -49,7 +49,7 @@ export default function SettingsCreditLimit(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}

View File

@@ -53,7 +53,7 @@ export default function DataDashboard(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}

View File

@@ -50,7 +50,7 @@ export default function SettingsDrawing(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}

View File

@@ -56,7 +56,7 @@ export default function GeneralSettings(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}

View File

@@ -16,9 +16,6 @@ export default function SettingsLog(props) {
LogConsumeEnabled: false,
historyTimestamp: dayjs().subtract(1, 'month').toDate(),
});
// const [historyTimestamp, setHistoryTimestamp] = useState(
// dayjs().subtract(1, 'month').toDate(),
// );
const refForm = useRef();
const [inputsRow, setInputsRow] = useState(inputs);
@@ -55,7 +52,7 @@ export default function SettingsLog(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}
async function onCleanHistoryLog() {

View File

@@ -52,7 +52,7 @@ export default function SettingsMagnification(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
} catch (error) {
showError('请检查输入');

View File

@@ -49,7 +49,7 @@ export default function SettingsMonitoring(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}

View File

@@ -48,7 +48,7 @@ export default function SettingsSensitiveWords(props) {
})
.finally(() => {
setLoading(false);
setInputsRow(structuredClone(inputs));
props.refresh();
});
}