看了vue的helloworld,试手做了个小例子。欢迎大家讨论!
<!DOCTYPE html>
<html>
<head>
<meta charset="uft-8">
<title>shopCar</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
<style>
*{margin:0;padding: 0;border:0;}
body{background: #eee;}
table{background: #fff;text-align: center;}
table img{width:40px;height:40px;}
table i{font-style: normal;color:red;padding:0 5px;}
table td *{vertical-align: middle;}
table th{text-align: center;}
.glyphicon{cursor: pointer;}
.red{color:red;}
.fx{text-decoration: underline;cursor: pointer;}
</style>
</head>
<body>
<div class="container" id="shopCar">
<h1>购物清单</h1>
<table class="table">
<tr>
<!-- .glyphicon .glyphicon-ok-circle -->
<th>
<label>
全选
<span class="glyphicon glyphicon-unchecked" @click=&