这是效果截图
代码已经放到GitHub上,地址为:https://github.com/wangyachao23/Vue-shopcar
html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 购物车</title>
<script src="./vue.min.js"></script>
<link href="./style.css" rel="stylesheet">
</head>
<body>
<div id="app" v-cloak>
<template v-if="list.length">
<table>
<thead>
<tr>
<th><input type="checkbox" v-on:click="swapCheck" v-model="checked"></th>
<th>商品名