Vue知识分享
文章平均质量分 69
zshmilyj
这个作者很懒,什么都没留下…
展开
-
路由跳转传参的方式和区别(query和params)
1. 不带参数 this.$router.push('/home') this.$router.push({name:'home'}) this.$router.push({path:'/home'})2. query传参 this.$router.push({name:'home',query: {id:'1'}}) this.$router.push({path:'/home',query: {id:'1'}}) // html 取参 $route...原创 2022-04-20 15:48:01 · 472 阅读 · 0 评论 -
Vue.js Ajax(axios)
GET 方法我们可以简单的读取 JSON 数据:new Vue({ el: '#app', data () { return { info: null } }, mounted () { axios .get('https://www.runoob.com/try/ajax/json_demo.json') .then(response => (this.info = response)) .catch(原创 2022-04-13 18:19:09 · 375 阅读 · 0 评论