用vue以对象的形式添加删除元素和购物车

1.用vue以对象的形式添加删除元素

Document*{ margin: 0px; padding: 0px; } h1{ text-align: center; } p{ margin-top: 20px; text-align: center; font-weight: 600; } input{ margin-top: 20px; width: 1000px; height: 35px; margin-left: 20%; border: 1.5px solid #cccccc; color: #cccccc; font-size: 16px; padding-left: 10px; } .btn{ width: 150px; height: 50px; margin: 0 auto; margin-top: 20px; } .btn button{ width: 50px; height: 35px; margin-left: 15px; margin-top: 30px; border-radius: 5%; border: 0px; color: white; } .btn1{ background: #337ab7; } .btn2{ background: #5cb85c; } .btn2 a{ color: white; list-style: none; text-decoration: none} #itany td{ width: 200px; height: 30px; border: 1px solid #ccc; text-align: center; } #itany{ margin-left: 20%; margin-top: 100px; }添加用户姓名
年龄
邮箱
序号 姓名 年龄 邮箱 操作
{{index+1}} {{val.name}} {{val.age}} {{val.emil}}

2.购物车
Document*{ margin: 0px; padding: 0px; } .in td{ width: 300px; height: 40px; border: 1px solid #ccc; text-align: center; } .in{ margin-left: 3%; margin-top: 100px; } .in p{ width: 1510px; height: 40px; text-align: center; line-height: 40px; border: 1px solid #ccc; }
编号 名称 单价 数量 总价
{{index+1}} {{val.name}} {{val.priec}} {{val.num}} {{val.add}}
【用vue以对象的形式添加删除元素和购物车】总计:{{total}}

    推荐阅读