摘要: 阅读全文
posted @ 2017-07-05 14:09 豆浆油条123 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 1、app.vue中 2、router中index.js(路由的路径配置) //vue-router 默认 hash 模式 —— 使用 URL 的 hash 来模拟一个完整的 URL,于是当 URL 改变时,页面不会重新加载。 //如果不想要很丑的 hash,我们可以用路由的 history 模式, 阅读全文
posted @ 2017-07-05 14:07 豆浆油条123 阅读(29994) 评论(0) 推荐(1) 编辑
摘要: 父组件中引用的子组件 <pics :is-pics="showpics" // 这是我们要传递的参数 :is-product="productMsg" :is-pics-falg="picsFalg" ></pics> 在子组件中使用props来接受 props: ['isPics', 'isPro 阅读全文
posted @ 2017-07-05 13:59 豆浆油条123 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 子组件: this.$emit('transferUrl', this.picUrl) 父组件: 引入子组件<pics @transferUrl="gettransferUrl"></pics> 获取参数: 引入子组件<pics @transferUrl="gettransferUrl"></pic 阅读全文
posted @ 2017-07-05 13:53 豆浆油条123 阅读(1540) 评论(0) 推荐(0) 编辑