这次给大家带来Bootstrap与Vue操作用户信息的添加与删除,Bootstrap与Vue操作用户信息添加与删除的注意事项有哪些,下面就是实战案例,一起来看一下。
nbsp;html> <meta> <title>用户信息编辑</title> <link style="color:#f60; text-decoration:underline;" href="https://www.php.cn/zt/15834.html" target="_blank">bootstrap.min.css" rel="external nofollow" > <script></script> <script></script> <script></script> <p> </p>
序号 | 用户名 | 密码 | 操作 |
---|---|---|---|
{{$index+1}} | {{item.name}} | {{item.password}} | |
暂无信息... |
<script> new Vue({ el: ".container", data: { myData:[], username:"", password:"", nowIndex:-100 }, methods:{ add:function(){ this.myData.push({ name:this.username, password:this.password }); this.username=""; this.password=""; }, deleteMsg:function(n){ if(n==-2){ this.myData=[]; }else{ this.myData.splice(n,1); } } } }); </script>
实现效果如下,因为只是简单的实现编辑删除的功能,因此密码就直接显示在表格中,没有进行加密显示
相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:
以上就是Bootstrap与Vue操作用户信息的添加与删除的详细内容,更多请关注php中文网其它相关文章!
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号