refs #151 Translate at search

This commit is contained in:
AkiraFukushima 2018-08-12 21:56:30 +09:00
parent 034876d12e
commit 444bd60b57
3 changed files with 23 additions and 9 deletions

View File

@ -148,5 +148,10 @@
},
"hashtag": {
"tag_name": "Tag name"
},
"search": {
"search": "Search",
"account": "Account",
"keyword": "keyword"
}
}

View File

@ -148,5 +148,10 @@
},
"hashtag": {
"tag_name": "タグ名"
},
"search": {
"search": "検索",
"account": "アカウント",
"keyword": "キーワード"
}
}

View File

@ -2,7 +2,7 @@
<div id="search">
<div class="search-header" v-loading="loading" :element-loading-background="loadingBackground">
<el-form :inline="true">
<el-select v-model="target" placeholder="search" class="search-target">
<el-select v-model="target" :placeholder="$t('search.search')" class="search-target">
<el-option
v-for="item in searchTargets"
:key="item.target"
@ -10,7 +10,7 @@
:value="item.target">
</el-option>
</el-select>
<input v-model="query" placeholder="keyword" class="search-keyword" v-shortkey="['enter']" @shortkey="search" autofocus></input>
<input v-model="query" :placeholder="$t('search.keyword')" class="search-keyword" v-shortkey="['enter']" @shortkey="search" autofocus></input>
<div class="clearfix"></div>
</el-form>
</div>
@ -30,12 +30,6 @@ export default {
data () {
return {
target: 'account',
searchTargets: [
{
target: 'account',
label: 'Account'
}
],
query: ''
}
},
@ -43,7 +37,17 @@ export default {
...mapState({
loading: state => state.TimelineSpace.Contents.Search.loading,
loadingBackground: state => state.App.theme.wrapper_mask_color
})
}),
searchTargets: {
get () {
return [
{
target: 'account',
label: this.$t('search.account')
}
]
}
}
},
methods: {
search () {