久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      vue實(shí)現(xiàn)員工信息錄入功能的方法

      vue實(shí)現(xiàn)員工信息錄入功能的方法

      Vue通用信息錄入界面,供大家參考,具體內(nèi)容如下

      vue實(shí)現(xiàn)員工信息錄入功能的方法

      <!DOCTYPE html> <html lang="en"> <head>  <meta charset="UTF-8">  <title>員工信息錄入</title>   <style>   .btn1{   color: blue;   background: skyblue;   text-align: center;  }   </style> </head> <body>   <p id="p2">   <fieldset>   <legend>員工信息錄入</legend>     <p >    <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>手機(jī):</label>   <input type="text" v-model="newStudent.phoneNo"><br>   <p>   <button @click="createStudent()">新增用戶</button>   </p>    </p>     <table border="2px">   <thead>    <tr>    <th>序號(hào)</th>    <th>姓名</th>    <th>年齡</th>    <th>性別</th>    <th>手機(jī)</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>總行數(shù):</label><span>{{studentsList.length}}</span>   </fieldset>    </p>    </body> <script src="js/vue.js"></script> <script>   var p1Data={  newStudent:{name:"",age:0,sex:"男",phoneNo:""},  studentsList:[{No:"0001",name:"張三",age:18,sex:"男",phoneNo:"13688899900"},   {No:"0112",name:"王五",age:28,sex:"男",phoneNo:"18800068888"},   {No:"0253",name:"林志玲",age:33,sex:"女",phoneNo:"18600001002"},   {No:"0608",name:"林志穎",age:68,sex:"男",phoneNo:"15998769900"}],  };    var vm1=new Vue({  el:"#p2",  data:p1Data,   methods:{    //移除一行   DeletestudentRow:function (index) {   this.studentsList.splice(index,1);   },     //添加一行   createStudent: function(){   this.studentsList.push(this.newStudent);   // 添加完newPerson對(duì)象后,重置newPerson對(duì)象   this.newStudent = {name:"",age:0,sex:"男",phoneNo:""}   },    }     });   </script> </html>

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)