feat[Search]: route search supports pinyin (#2643)

This commit is contained in:
MaYuanhai
2020-05-04 21:38:43 +08:00
committed by GitHub
parent 255989138d
commit 39b2b9b872
5 changed files with 60 additions and 15 deletions

View File

@@ -30,6 +30,11 @@
/>
</a>
<div v-if="lang === 'zh'" class="drawer-item">
<span>菜单支持拼音搜索</span>
<el-switch v-model="supportPinyinSearch" class="drawer-switch" />
</div>
</div>
</div>
</template>
@@ -78,6 +83,20 @@ export default {
value: val
})
}
},
supportPinyinSearch: {
get() {
return this.$store.state.settings.supportPinyinSearch
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'supportPinyinSearch',
value: val
})
}
},
lang() {
return this.$store.getters.language
}
},
methods: {