循环出子模块,绑定相应的id,并且设置跳转路径;
(item是前面循环得出的)
新建categoryList页面;
去到index.js补上映射模块路径;
(使用props:true就可以往categorylist模块传去id)
categorylist模块再使用props标明下,就可以使用并且直接测试this.id
另外:
往后退:
另外:
创建玩页面元素后就加载ajax返回数据:
先赋值为空data
再
然后在html里接收使用数据data了
另外1:
先去data()复制为空;
创建后加载
直接使用 in attribute
另:
idea里操作vue
1、装vue.js插件
2、
其他:
全局注册是在main.js
本地注册直接在 .vue中
另
另 get形式
post形式
另:路由传id的使用
跳转方式:
另:
另:
另:
后端
前端:
另:
另:
另:
另:
加载列表数据实现:
后端:传回List类型;
下面前端created调用vm.list=resp.data
另:
都是通过调用函数
再出发ajax