perf(webui): refactor dashboard modules and optimize API performance

This commit is contained in:
Wha1eChai
2026-01-09 17:58:09 +08:00
parent e909ea6fe3
commit a914821d49
20 changed files with 1420 additions and 599 deletions

View File

@@ -10,7 +10,18 @@ window.Components.claudeConfig = () => ({
loading: false,
init() {
this.fetchConfig();
// Only fetch config if this is the active sub-tab
if (this.activeTab === 'claude') {
this.fetchConfig();
}
// Watch local activeTab (from parent settings scope, skip initial trigger)
this.$watch('activeTab', (tab, oldTab) => {
if (tab === 'claude' && oldTab !== undefined) {
this.fetchConfig();
}
});
this.$watch('$store.data.models', (val) => {
this.models = val || [];
});