添加软件启动时是否自动聚焦搜索框的设置

pull/225/head
lyswhut 2020-03-24 09:47:36 +08:00
parent a10777d598
commit cdd7774a73
7 changed files with 17 additions and 1 deletions

View File

@ -1,6 +1,7 @@
### 新增
- 新增FLAC格式音乐标签信息写入与封面嵌入
- 添加软件启动时是否自动聚焦搜索框的设置
### 优化

View File

@ -75,6 +75,9 @@ export default {
n ? this.showList() : this.hideList()
},
},
mounted() {
if (this.$store.getters.setting.search.isFocusSearchBox) this.$refs.dom_input.focus()
},
methods: {
handleTemplistClick(index) {
this.sendEvent('listClick', index)

View File

@ -42,6 +42,8 @@
"search_hot": "热门搜索",
"search_history_title": "是否显示历史搜索记录",
"search_history": "搜索历史",
"search_focus_search_box_title": "启动时是否自动聚焦搜索框",
"search_focus_search_box": "聚焦搜索框",
"list": "列表设置",
"list_source_title": "是否显示歌曲源",

View File

@ -40,6 +40,8 @@
"search_hot": "熱門搜索",
"search_history_title": "是否顯示歷史搜索記錄",
"search_history": "搜索歷史",
"search_focus_search_box_title": "啟動時是否自動聚焦搜索框",
"search_focus_search_box": "聚焦搜索框",
"list": "列表設置",
"list_source_title": "是否顯示歌曲源",
"list_source": "是否顯示歌曲源(僅對我的音樂分類有效)",

View File

@ -42,6 +42,8 @@
"search_hot": "Hot Search",
"search_history_title": "Show search history",
"search_history": "Search History",
"search_focus_search_box_title": "Whether the search box is automatically focused on startup",
"search_focus_search_box": "Focus Search Box",
"list": "List settings",
"list_source_title": "Whether to show song sources",

View File

@ -168,7 +168,7 @@ export const objectDeepMerge = (target, source) => {
* @param {*} setting
*/
export const updateSetting = (setting, version) => {
const defaultVersion = '1.0.19'
const defaultVersion = '1.0.20'
if (!version) {
if (setting) {
version = setting.version
@ -219,6 +219,7 @@ export const updateSetting = (setting, version) => {
tempSearchSource: 'kw',
isShowHotSearch: false,
isShowHistorySearch: false,
isFocusSearchBox: false,
},
network: {
proxy: {

View File

@ -73,6 +73,10 @@ div.scroll(:class="$style.setting")
h3 {{$t('view.setting.search_history')}}
div
material-checkbox(id="setting_search_showHistory_enable" v-model="current_setting.search.isShowHistorySearch" :label="$t('view.setting.is_show')")
dd(:title="$t('view.setting.search_focus_search_box_title')")
h3 {{$t('view.setting.search_focus_search_box')}}
div
material-checkbox(id="setting_search_focusSearchBox_enable" v-model="current_setting.search.isFocusSearchBox" :label="$t('view.setting.is_enable')")
dt {{$t('view.setting.list')}}
dd(:title="$t('view.setting.list_source_title')")
@ -336,6 +340,7 @@ export default {
tempSearchSource: 'kw',
isShowHotSearch: false,
isShowHistorySearch: false,
isFocusSearchBox: false,
},
download: {
savePath: '',