阅读目录
default.html
- default.html
- index.php
- Promise对象中[[PromiseResult]]的取值
DOCTYPE html>
Demo
const app=Vue.createApp({
data(){
return{
list: []
}
},
mounted() {
// this.list = ['1-小红','2-小影','3-小丽'];
const ax = axios.get('http://tt.cc', {
params: {
ID: 12345
}
})
.then(function (response) {
return response;
})
.catch(function (error) {
console.log(error);
})
ax.then(res=>{
// console.log(res.data);
this.list = res.data;
});
},
template: `
- {{item}}
`
});
const vm=app.mount("#app")
关注
打赏