Replace let with const where variable is never reassigned in Vue files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 09:38:40 +08:00
parent 64372c7043
commit 1d0d938193
21 changed files with 176 additions and 191 deletions

View File

@@ -93,7 +93,7 @@ export default {
return this.traceList.length;
},
traceList: function() {
let sum = this.listTraces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
const sum = this.listTraces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
return this.listTraces.map(trace => {
return {
@@ -148,7 +148,7 @@ export default {
this.showTraceId = newValue;
},
showTraceId: function(newValue, oldValue) {
let isScrollTop = document.querySelector('.infiniteTable');
const isScrollTop = document.querySelector('.infiniteTable');
if(isScrollTop && typeof isScrollTop.scrollTop !== 'undefined') if(newValue !== oldValue) isScrollTop.scrollTop = 0;
},
firstCases: function(newValue, oldValue){
@@ -240,7 +240,7 @@ export default {
*/
createCy(){
this.$nextTick(() => {
let graphId = this.$refs.cfmTrace;
const graphId = this.$refs.cfmTrace;
this.setNodesData();
this.setEdgesData();