perf: 优化数据结构

This commit is contained in:
kuaifan 2025-04-07 06:15:17 +08:00
parent dc0f925d24
commit 0f75556bed
2 changed files with 3 additions and 1 deletions

View File

@ -147,7 +147,7 @@
<div class="aibot-setting"> <div class="aibot-setting">
<SystemAibot <SystemAibot
v-if="aibotTabAction == item.value" v-if="aibotTabAction == item.value"
:type="aibotTabAction" :type="item.value"
@on-update-setting="handleAITags" /> @on-update-setting="handleAITags" />
</div> </div>
</TabPane> </TabPane>

View File

@ -78,6 +78,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.formData = $A.getStorageJson(`systemAibot.${this.type}`);
this.systemSetting(); this.systemSetting();
}, },
computed: { computed: {
@ -190,6 +191,7 @@ export default {
this.$emit('on-update-setting', data); this.$emit('on-update-setting', data);
this.formData = data; this.formData = data;
this.formDatum_bak = $A.cloneJSON(this.formData); this.formDatum_bak = $A.cloneJSON(this.formData);
$A.setStorage(`systemAibot.${this.type}`, data);
}).catch(({msg}) => { }).catch(({msg}) => {
if (save) { if (save) {
$A.modalError(msg); $A.modalError(msg);