diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue
index bd09eaf..789f8da 100644
--- a/src/components/Setting/components/Device.vue
+++ b/src/components/Setting/components/Device.vue
@@ -97,6 +97,13 @@
/>
+
+
{
const ele = document.getElementById('set_device_container')
ele.scrollTop = ele.scrollTop - 100 < 100 ? 0 : ele.scrollTop - 100
@@ -721,6 +733,20 @@ const setSprayLiquidVal = () => {
}
showSuccessToast('设置成功')
}
+
+// 恢复到默认设置
+async function actionDefaultSetting() {
+ let isConfirmed = await MyModal.confirm('是否恢复到默认设置?');
+ if (!isConfirmed) {
+ return;
+ }
+
+ if ( !props.runInfection ) {
+ await webSocketStore.call('factoryResetSettings');
+ webSocketStore.sendCommandMsg(getAllSettingJSON);
+ }
+ showSuccessToast('设置成功')
+}