幽灵资源网 Design By www.bzswh.com
Vue通用信息录入界面,供大家参考,具体内容如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>员工信息录入</title>
<style>
.btn1{
color: blue;
background: skyblue;
text-align: center;
}
</style>
</head>
<body>
<div id="div2">
<fieldset>
<legend>员工信息录入</legend>
<div >
<label>姓名:</label>
<input type="text" v-model="newStudent.name"><br>
<label>年龄:</label>
<input type="text" v-model="newStudent.age"><br>
<label>性别:</label>
<select v-model="newStudent.sex"
<option value="男">男</option>
<option value="女">女</option>
</select><br>
<label>手机:</label>
<input type="text" v-model="newStudent.phoneNo"><br>
<p>
<button @click="createStudent()">新增用户</button>
</p>
</div>
<table border="2px">
<thead>
<tr>
<th>序号</th>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>手机</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(student,index) in studentsList">
<td>{{index+1}}</td>
<td>{{student.name}}</td>
<td>{{student.age}}</td>
<td>{{student.sex}}</td>
<td>{{student.phoneNo}}</td>
<td :class="btn1"><button @click="DeletestudentRow(index)">移除</button></td>
</tr>
</tbody>
</table>
<label>总行数:</label><span>{{studentsList.length}}</span>
</fieldset>
</div>
</body>
<script src="/UploadFiles/2021-04-02/vue.js">
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
幽灵资源网 Design By www.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com
暂无评论...
