[update] 首页搜索回车跳转标题搜索
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
</a-select-option>
|
</a-select-option>
|
||||||
<i slot="suffixIcon" class="iconfont icon-nav-bottom"></i>
|
<i slot="suffixIcon" class="iconfont icon-nav-bottom"></i>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-input v-model="searchValue" :placeholder="$t('pleaseEnter')">
|
<a-input v-model="searchValue" :placeholder="$t('pleaseEnter')" @pressEnter="searchInputEnter">
|
||||||
<i slot="prefix" class="iconfont icon-Searchbar_Search_icon"></i>
|
<i slot="prefix" class="iconfont icon-Searchbar_Search_icon"></i>
|
||||||
<!--<a-icon type="search" />-->
|
<!--<a-icon type="search" />-->
|
||||||
</a-input>
|
</a-input>
|
||||||
@@ -49,6 +49,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 回车跳标题检索
|
||||||
|
searchInputEnter () {
|
||||||
|
const { href } = this.$router.resolve({
|
||||||
|
path: '/generalSearch',
|
||||||
|
query: {
|
||||||
|
type: 'title',
|
||||||
|
resourceType: this.resourceType,
|
||||||
|
searchValue: this.searchValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.open(href, '_blank')
|
||||||
|
},
|
||||||
// 点击跳转到一般检索页
|
// 点击跳转到一般检索页
|
||||||
toSearchWindow (type) {
|
toSearchWindow (type) {
|
||||||
const { href } = this.$router.resolve({
|
const { href } = this.$router.resolve({
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-input v-model="searchValue" :placeholder="$t('pleaseEnter')"></a-input>
|
<a-input v-model="searchValue" :placeholder="$t('pleaseEnter')" @pressEnter="searchInputEnter"></a-input>
|
||||||
<a-button type="primary" @click="toSearchWindow('title')">标题检索</a-button>
|
<a-button type="primary" @click="toSearchWindow('title')">标题检索</a-button>
|
||||||
<a-button type="primary" @click="toSearchWindow('fullText')">全文检索</a-button>
|
<a-button type="primary" @click="toSearchWindow('fullText')">全文检索</a-button>
|
||||||
<a-button type="primary" ghost @click="toAdvancedSearch">高级检索</a-button>
|
<a-button type="primary" ghost @click="toAdvancedSearch">高级检索</a-button>
|
||||||
@@ -137,6 +137,18 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 回车跳标题检索
|
||||||
|
searchInputEnter () {
|
||||||
|
const { href } = this.$router.resolve({
|
||||||
|
path: '/generalSearch',
|
||||||
|
query: {
|
||||||
|
type: 'title',
|
||||||
|
resourceType: this.resourceType,
|
||||||
|
searchValue: this.searchValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
window.open(href, '_blank')
|
||||||
|
},
|
||||||
// 点击跳转到一般检索页
|
// 点击跳转到一般检索页
|
||||||
toSearchWindow (type) {
|
toSearchWindow (type) {
|
||||||
const { href } = this.$router.resolve({
|
const { href } = this.$router.resolve({
|
||||||
|
|||||||
Reference in New Issue
Block a user