新增强迫症设置

This commit is contained in:
lyswhut
2019-09-07 12:46:47 +08:00
parent cafdad6f9f
commit c117e33d24
7 changed files with 45 additions and 13 deletions
@@ -34,8 +34,11 @@ export default {
}
},
computed: {
...mapGetters(['source']),
...mapGetters(['source', 'route', 'setting']),
...mapGetters('search', ['info']),
isAutoClearInput() {
return this.setting.odc.isAutoClearSearchInput
},
},
watch: {
list(n) {
@@ -46,6 +49,9 @@ export default {
'info.text'(n) {
if (n !== this.text) this.text = n
},
route(n) {
if (this.isAutoClearInput && n.name != 'search' && this.text) this.text = ''
},
},
methods: {
handleTemplistClick(index) {