mirror of https://github.com/halo-dev/halo-admin
perf: add success toast for saving plugin and theme settings (#895)
#### What type of PR is this? /kind improvement #### What this PR does / why we need it: 保存主题和插件设置时,添加保存成功的反馈提示。 #### Screenshots: <img width="803" alt="image" src="https://user-images.githubusercontent.com/21301288/221805091-60f3f20c-5524-4dea-9858-6c521cb1dfbc.png"> #### Special notes for your reviewer: None #### Does this PR introduce a user-facing change? ```release-note None ```pull/892/head^2
parent
fbbdd47d83
commit
e3e0ddc95a
|
@ -3,7 +3,7 @@
|
||||||
import { inject, ref, watch } from "vue";
|
import { inject, ref, watch } from "vue";
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { VButton } from "@halo-dev/components";
|
import { Toast, VButton } from "@halo-dev/components";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
@ -63,6 +63,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
IconPhone,
|
IconPhone,
|
||||||
IconTablet,
|
IconTablet,
|
||||||
IconRefreshLine,
|
IconRefreshLine,
|
||||||
|
Toast,
|
||||||
} from "@halo-dev/components";
|
} from "@halo-dev/components";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { computed, markRaw, ref, watch } from "vue";
|
import { computed, markRaw, ref, watch } from "vue";
|
||||||
|
@ -163,6 +164,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { useSettingFormConvert } from "@/composables/use-setting-form";
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { VButton } from "@halo-dev/components";
|
import { Toast, VButton } from "@halo-dev/components";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
|
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
|
||||||
|
@ -55,6 +55,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
saving.value = false;
|
saving.value = false;
|
||||||
|
|
Loading…
Reference in New Issue