.grey{
background: #CCC;
height: 25px;
}
ul,li{
margin: 0;
padding: 0;
list-style-type:none;
margin-left: 65px;
width: 306px;
}
.dialog{
margin-left: 10px;
margin-top: 30px;
width: 300px;
height: 25px;
}
.note{
margin-left: 130px;
}
window.οnlοad=function(){
new Vue({
el :"#app",
data:{
myData:[],
t1: "",
now:-1
},
methods:{
get:function(e){
if(e.keyCode==38||e.keyCode==40) return;
if(e.keyCode==13){
window.open('https://www.baidu.com/s?wd='+this.t1);
}
this.$http.jsonp("https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su",{
jsonp:'cb',params:{wd:this.t1}
}).then(function(_data){
this.myData=_data.data.s;
},function(){
});
},
changeDown:function(){
this.now++;
if(this.now==this.myData.length)this.now=-1;
this.t1=this.myData[this.now];
},
changeUp:function(){
this.now--;
if(this.now==-2)
this.now=this.myData.length-1;
this.t1=this.myData[this.now];
}
}
})
}
{{value}}
暂无数据...
本文来源于网络:查看 >https://blog.csdn.net/u014041540/article/details/72967924