修复 融合参数在界面关闭后再次打开数据不正确

This commit is contained in:
shefengchun 2023-02-03 19:01:51 +08:00
parent fed77c3e81
commit a9f61b1651
2 changed files with 8 additions and 1 deletions

View File

@ -141,6 +141,7 @@ import {
withDefaults, withDefaults,
onBeforeUnmount, onBeforeUnmount,
reactive, reactive,
onMounted,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
@ -190,6 +191,7 @@ export default defineComponent({
default: default:
break; break;
} }
chang(type)
save_set_cache() save_set_cache()
} }
const reduce = (type: string) => { const reduce = (type: string) => {
@ -208,6 +210,8 @@ export default defineComponent({
default: default:
break; break;
} }
chang(type)
save_set_cache()
} }
const ste_status = ref(0); const ste_status = ref(0);
const use_set_cache = () => { const use_set_cache = () => {
@ -355,7 +359,9 @@ export default defineComponent({
array[arr[index]].value = Number(config.params[index].size); array[arr[index]].value = Number(config.params[index].size);
} }
}; };
startconfig(); onMounted(() => {
startconfig();
}),
onBeforeUnmount(() => { onBeforeUnmount(() => {
sessionStorage.FusionLocale = JSON.stringify(set_cache.value); sessionStorage.FusionLocale = JSON.stringify(set_cache.value);
}); });

View File

@ -310,6 +310,7 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
clear_sessionStorage() clear_sessionStorage()
}, 500); }, 500);
getconfig()
options.value="FusionLocale" options.value="FusionLocale"
}; };