perf: 审计台仪表盘筛选日期储存到localStorage中

This commit is contained in:
“huailei000” 2022-12-02 18:49:51 +08:00 committed by huailei
parent 3ee819dd4c
commit b68a3b27fa
2 changed files with 3 additions and 2 deletions

View File

@ -41,12 +41,13 @@ export default {
},
data() {
return {
days: '7'
days: localStorage.getItem('auditDays') || '7'
}
},
methods: {
onChange(val) {
this.days = val
localStorage.setItem('auditDays', val)
}
}
}

View File

@ -37,7 +37,7 @@ export default {
}
]
return {
select: '7',
select: localStorage.getItem('auditDays') || '7',
iOptions: this.options.length > 0 ? this.options : defaultOptions
}
},