在这里插入代码片
****html代码****
<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="app">
<table>
<tr>
<th><input type="checkbox"></th>
<th>编号</th>
<th>名称</th>
<th>价格</th>
<th>产地</th>
<th>库存</th>
<th colspan="100">操作<button @click="showAddComm()" >新增商品</button><button @click="deleteComm()">批量删除</button></th>
</tr>
<tr v-for="comm in list" >
<td><input type="checkbox" v-model="checkedIds" :value="comm.id" ></td>
<td>{
{
comm.id}}</td>
<td>{
{
comm.name}}</td>
<td>{
{
comm.age}}</td>
<td>
{
{
comm.address}}
</td>
<td>{
{
comm.score}}</td>
<td><button @click="showUpdateComm(comm.id)" >修改商品</button></td>
</tr>
</table>
<table id="addComm" style="display: none" >
<tr>
<th colspan="100"><h1>保存商品</h1></th>
</tr>
<tr>
<td>名称:</td>
<td>
<input type="text" id="name" v-model="shpin.name" >
</td>
</tr>
<tr>
<td>价格:</td>
<td>
<input type="text" id="age" v-model="shpin.age" >
</td>
</tr>
<tr>
<td>库存:</td>
<td>
<input type="number" v-model="shpin.score" >
</td>
</tr>
<tr>
<td>产地:</td>
<td>
<select id="cid" v-model="shpin.cid" v-on:change="getCityList(shpin.cid)">
<option v-for="p in prolist"
SSM项目 三级联动+crud
最新推荐文章于 2023-05-25 13:43:38 发布
本文介绍如何使用Spring、SpringMVC和MyBatis(SSM)框架进行三级联动的数据处理,结合Vue.js实现动态更新与创建记录。内容包括配置SSM框架,设计数据库表结构,编写Mapper接口及实现,控制器处理请求,前端Vue.js组件的构建,以及详细的CRUD操作步骤。
摘要由CSDN通过智能技术生成