本文给大家介绍vue实现登录、注册、退出、跳转功能,具体代码如下所示:
效果图1:
效果图2:
效果图3:
效果图4:
完整实例:
<!DOCTYPE html> <html> <head> <meta charset="GBK"> <title></title> <style> ul li { margin: 0; padding: 0; list-style: none; } #app { width: 600px; height: 400px; margin: 0 auto; border: 1px solid #ccc; } .title{ text-align:center; } .tab-tilte{ width: 99%; } .tab-tilte li{ float: left; width: 31%; padding: 10px 0; text-align: center; background-color:#f4f4f4; cursor: pointer; } /* 点击对应的标题添加对应的背景颜色 */ .tab-tilte .active{ background-color: #09f; color: #fff; } .tab-content div{ float: left; width: 25%; line-height: 100px; text-align: center; } .sider_icon{ display: inline-block; width:36px; height:40px; line-height:36px; font-size:20px; text-align:center; color:#fff; background: url(../images/bubble.png) 0 0 no-repeat; top:-20px; } .contentli{ float: left; padding: 10px 0; text-align: center; } .input{ float: left; width: 60%; margin-left:20%; padding: 10px 0; align:center; } .btn{ float: left; width: 20%; margin-left:60%; padding: 10px 1px; text-align: center; } .guanggao{ float:right; padding-right:10px; cursor:pointer; } #bottomDiv{ float: left; margin-left:40%; padding: 10px 10px; text-align: center; } #bottomDiv a{ padding: 1px 10px; cursor:pointer; border-bottom:1px solid red; } </style> </head> <body> <div id="app" > <div v-show='page==="advert"'> <span class='guanggao' @click='goLogin'>点击跳转<b>{{n}}</b></span> <div id='bottomDiv'> <h1 class='title'>欢迎体验</h1> </div> </div> <div v-show='page==="login"'> <div> <h1 class='title'>欢迎登录</h1> <div> <input type="text" v-model='name' class="input" placeholder='请输入用户名'> <p v-show='!name'>请输入用户名</p> </div> <div> <input type="text" v-model='pwd' class="input" placeholder='请输入密码'> <p v-show='!pwd'>请输入密码</p> </div> <button @click="add" :disabled="!name||!pwd" class='btn'>登录</button> </div> <div id='bottomDiv'> <a @click="goRegister">我要注册</a> </div> </div> <div v-show='page==="register"'> <div> <h1 class='title'>注册界面,没写,哈哈</h1> </div> <div id='bottomDiv'> <a @click="goLogin">我要登录</a> </div> </div> <div v-show='page==="suc"'> <div> <h1 class='title'>登录成功</h1> </div> <div id='bottomDiv'> <a @click="exit">退出登录</a> </div> </div> </div> </body> <script src="/UploadFiles/2021-04-02/vue.js">
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“vue实现登录、注册、退出、跳转等功能”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新动态
20240518
20240518
- 群星《青春重置计划9新的凡人歌》[320KMP3][89.41MB]
- 苏曼《苏曼的夜晚HQII》[低速原抓WAV+CUE]
- 【电影原声】汉斯·季默《星际穿越》2014[FLAC+CUE整轨]
- 诹访内晶子AkikoSuwanai巴赫:小提琴协奏曲《J.S.BachViolinConcertos》(flac)
- 王力宏《十八般武艺》[低速原抓WAV+CUE]
- 王力宏《十八般武艺》[低速原抓WAV+CUE]
- 【爵士乐】VA-2024-ParamountJazzLoungeChillingExperience(FLAC)
- 群星《离歌 网剧原声带》[320K/MP3][249.78MB]
- 群星《离歌 网剧原声带》[FLAC/分轨][538.53MB]
- 群星《承欢记 电视剧影视原声带》[320K/MP3][109.99MB]
- 【欧美乡村】JohnnyLee-2024-13thOfJulyandEmotions(FLAC)
- 【流行爵士】PattiAustin-2024-LoveSongs(FLAC)
- 【爵士乐】VA-2024-SupremeLoungeChillSelectionJazzyVibeTunes(FLAC)
- 群星《承欢记 电视剧影视原声带》[FLAC/分轨][219.8MB]
- 群星《乘风2024 第1期》[320K/MP3][110.09MB]