VUE2.JS实现简单的商品的增删改查
有疑问看源码
~~代码中注释很详细
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>商品管理-综合案例</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
table {
width: 80%;
margin: 50px auto;
}
h3 {
text-align: center;
margin: 20px auto;
}
table tr th {
border-bottom: 3px solid darkblue;
}
table tr th,
table tr td {
height: 40px;
line-height: 40px;
text-align: center;
background-color: rgba(137, 43, 226, 0.215);
}
.btn {
width: 120px;
height: 40px;
border: none;
border-radius: 15px;
text-align: center;
outline: none;
border: 2px solid seagreen;
cursor: pointer;
}
.btn-success {
background-color: rgba(127, 255, 212, 0.418);
}
.btn-success:hover {
background-color: rgb(127, 255, 212);</