(编辑:jimmy 日期: 2024/10/31 浏览:2)
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">以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。