vue引入链接

axios引入链接

简单事例

Titlename:{{info.name}}address: {{info.address.street}}var vm = new Vue({el:"#vue",data(){return{info:{name:null,address:{street:null,city:null,country:null}}}},mounted(){axios.get("../data.json").then(response=>(this.info=response.data))}});

data.json文件

{"name":"狂神说java","url":"https://www.bilibili.com/video/BV18E411a7mC?p=9&vd_source=e353ca887193f19a3d6ede4c86ed70b4","page":1,"isNonProfit": true,"address": {"street": "含光门","city": "陕西西安","country":"中国"},"links": [{"name": "bilibili","url":"https://www.bilibili.com"},{"name": "狂神说java","url": "https://www.bilibili.com/video/BV18E411a7mC?p=9&vd_source=e353ca887193f19a3d6ede4c86ed70b4"},{"name": "百度","url": "https://www.baidu.com/"}]}