| | |
| | | <view class="flex searchCss" :style="{'backgroundColor': isExpanded==true?'#fff':''}" |
| | | style="border-radius: .5rem; height: 75%; width: 2.33rem;margin-right: .30rem;justify-content: flex-end;"> |
| | | <!-- overflow: hidden; --> |
| | | <input :style="{'display': isExpanded == true ? 'block' : 'none'}" type="text" |
| | | <input :style="{'display': isExpanded == true ? 'block' : 'none'}" @confirm="toggleSearch" type="text" |
| | | style="margin-left: .05rem;color: #2C2C2C; flex: 1; background-color: #fff; font-size: .13rem;" |
| | | class="search-input" v-model="searchInput" placeholder="请输入搜索内容" /> |
| | | <view class="search-logo" @click="toggleSearch" |
| | |
| | | // 搜索 |
| | | onSearch(val) { |
| | | uni.navigateTo({ |
| | | url: '/pages/knowledgeBase/knowledgeBase?name=' + val |
| | | url: '/pages/knowledgeBase/knowledgeBase?name=' + val.text |
| | | }) |
| | | console.log('vv', val); |
| | | }, |
| | | // 搜索 |
| | | // 切换搜索框的展开和收起状态 |
| | |
| | | this.isExpanded = !this.isExpanded; |
| | | this.$nextTick(() => { |
| | | if (this.searchInput.trim() !== '') { |
| | | console.log('搜索', this.searchInput); |
| | | uni.navigateTo({ |
| | | url: '/pages/knowledgeBase/knowledgeBase?name=' + this.searchInput |
| | | }) |
| | | // console.log('搜索', this.searchInput); |
| | | } else { |
| | | console.log('不搜索'); |
| | | } |
| | |
| | | }) |
| | | } else if (item.id == 2) { |
| | | console.log(item.name); |
| | | // uni.navigateTo({ |
| | | // url: '/pages/zhongyi/zhongyi?id=' + item.id |
| | | // }) |
| | | uni.navigateTo({ |
| | | url: '/pages/zhongyi/zhongyi?id=' + item.id |
| | | url: '/pages/shiyiHome/shiyiHome' |
| | | }) |
| | | } else if (item.id == 3) { |
| | | uni.navigateTo({ |