使用 Vue.js 2.0+ Vue-resource 模仿百度搜索框
使用 Vue.js 2.0 模仿百度搜索框

<input
type="text"
class="input"
placeholder="请输入搜索内容 "
v-model='inputText'
@keyup='show($event)'
@keydown.down='down()'
@keydown.up.prevent='up()'
>
<span class="baidu" @click="goto()">
<li v-for="(item, index) in result" :class='{bgcolor: index==nowIndex}' @click="gotoItem(item)">
{{item}}

浙公网安备 33010602011771号