mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 08:03:41 +08:00
refactor: 运营设置-数据刷新
This commit is contained in:
@@ -49,7 +49,7 @@ export default function SettingsCreditLimit(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ export default function DataDashboard(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function SettingsDrawing(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export default function GeneralSettings(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -52,7 +52,7 @@ export default function SettingsMagnification(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
} catch (error) {
|
||||
showError('请检查输入');
|
||||
|
||||
@@ -49,7 +49,7 @@ export default function SettingsMonitoring(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export default function SettingsSensitiveWords(props) {
|
||||
})
|
||||
.finally(() => {
|
||||
setLoading(false);
|
||||
setInputsRow(structuredClone(inputs));
|
||||
props.refresh();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user