|
@@ -7,9 +7,7 @@
|
|
|
<a-tab-pane :key="item.key" :tab="item.tab" v-for="item in menuList"> </a-tab-pane>
|
|
|
</a-tabs>
|
|
|
<div class="input_1">
|
|
|
- <el-select size="large" clearable v-model="searchValue" allow-create filterable remote reserve-keyword placeholder="请输入想要搜索的内容" @clear="onSearch" :remote-method="remoteMethod" :loading="searchLoading">
|
|
|
- <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
|
|
|
- </el-select>
|
|
|
+ <el-input size="large" v-model="searchValue" clearable placeholder="请输入想要搜索的内容" />
|
|
|
<el-button size="large" @click="onSearch" type="primary">搜索</el-button>
|
|
|
</div>
|
|
|
<div class="hot">
|
|
@@ -34,11 +32,9 @@ import { TagsStore } from '@/store/api/system/tags'
|
|
|
const store = TagsStore()
|
|
|
// 加载中
|
|
|
const loading = ref(false)
|
|
|
-const searchLoading = ref(false)
|
|
|
const activeKey = ref('0')
|
|
|
const searchValue = ref('')
|
|
|
const list = ref([])
|
|
|
-const tagsList = ref([])
|
|
|
const menuList = ref([
|
|
|
{ key: '0', tab: '全部' },
|
|
|
{ key: '3', tab: '找项目' },
|
|
@@ -72,22 +68,6 @@ const toSelect = (item) => {
|
|
|
searchValue.value = item.title
|
|
|
router.push({ path: '/search', query: { name: item.title, type: activeKey.value } })
|
|
|
}
|
|
|
-const remoteMethod = (query) => {
|
|
|
- if (query) {
|
|
|
- searchLoading.value = true
|
|
|
- setTimeout(async () => {
|
|
|
- searchLoading.value = false
|
|
|
- const info = {
|
|
|
- is_use: '0',
|
|
|
- title: query
|
|
|
- }
|
|
|
- const res = await store.query(info)
|
|
|
- if (res.errcode == '0') tagsList.value = res.data
|
|
|
- }, 200)
|
|
|
- } else {
|
|
|
- tagsList.value = []
|
|
|
- }
|
|
|
-}
|
|
|
const scrollTop = ref(0)
|
|
|
|
|
|
onActivated(() => {
|