利用transition-group标签包裹li标签,实现输入数据后按Enter键将数据添加到列表中
1.效果图2.代码学号:姓名:{{item.id}}---{{item.name}}varvm=newVue({el:"#app",data:{id:"",name:"",list:[{id:1,name:'张三'},{id:2,name:'李四'},{id:3,name:'王五'},{id:4,name:'赵四'},]},methods:{add(){this.list.push({id:thi