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

@@ -92,8 +92,8 @@ export default {
return this.traces.length;
},
traceList: function() {
let sum = this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
let result = this.traces.map(trace => {
const sum = this.traces.map(trace => trace.count).reduce((acc, cur) => acc + cur, 0);
const result = this.traces.map(trace => {
return {
id: trace.id,
value: this.progressWidth(Number(((trace.count / sum) * 100).toFixed(1))),
@@ -143,7 +143,7 @@ export default {
immediate: true
},
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;
},
infiniteFirstCases: function(newValue){
@@ -226,7 +226,7 @@ export default {
* create trace cytoscape's map
*/
createCy(){
let graphId = this.$refs.cyTrace;
const graphId = this.$refs.cyTrace;
this.setNodesData();
this.setEdgesData();