|
|
@@ -33,7 +33,8 @@ export const useErrorLogStore = defineStore({
|
|
|
...info,
|
|
|
time: formatToDateTime(new Date()),
|
|
|
};
|
|
|
- this.errorLogInfoList = [item, ...(this.errorLogInfoList || [])];
|
|
|
+ // [perf-base-v1] 上限保留最近 100 条,防止长时间运行错误日志无限累积占用内存
|
|
|
+ this.errorLogInfoList = [item, ...(this.errorLogInfoList || [])].slice(0, 100);
|
|
|
this.errorLogListCount += 1;
|
|
|
},
|
|
|
|