Weex例子——登录页面
来源:互联网 发布:淘宝运营一个月多少钱 编辑:程序博客网 时间:2024/05/21 04:21
不想写废话,直接上效果。
链接:
查看效果
效果:
代码:(没有注释,请谅解)
login.we文件
<template> <div class="wrapper"> <div class="login"> <div class="input-wrapper"> <input onchange="onchangeUserNumber" class="input" type="text" placeholder="手机号" autofocus="true" value=""/> <image class="input-img" src="resources/img/login_input_user_img.png"></image> </div> <div class="input-wrapper"> <input onchange="onchangeUserPassword" class="input" type="password" placeholder="密码" value=""/> <image class="input-img" src="resources/img/login_input_pass_img.png"></image> </div> <div class="input-wrapper"> <div class="input-login" onclick="login"> <text class="input-login-text">登录</text> </div> </div> <div class="input-wrapper"> <text class="input-forget" onclick="findPassword">找回密码</text> <text class="input-register" onclick="register">立即注册</text> </div> </div> <toast id="toast"></toast> </div></template><script> module.exports = { data:{ userNumber:'', userPassword:'' }, methods:{ onchangeUserNumber:function (event) { this.userNumber = event.value; }, onchangeUserPassword:function (event) { this.userPassword = event.value; }, /*找回密码*/ findPassword:function () { this.$vm('toast').$emit('toast','Hello,找回密码暂时未开发,后续我们会进行完善。'); }, /*注册*/ register:function () { this.$vm('toast').$emit('toast','Hello,注册暂时未开发,后续我们会进行完善。'); }, /*处理登录*/ login: function () { if(this.userNumber.length < 1){ this.$vm('toast').$emit('toast','请输入手机号'); return; }else if(this.userPassword.length < 1){ this.$vm('toast').$emit('toast','请输入密码'); return; } this.$vm('toast').$emit('toast',"登录成功"); } } }</script><style> .wrapper { position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .login{ margin-top: 180px; } .input-wrapper{ width: 550px; margin-left: 100px; margin-right: 100px; margin-bottom: 30px; } .input { font-size: 30px; height: 80px; width: 550px; padding-left: 90px; padding-top: 15px; padding-bottom: 15px; border-width:1px; border-color: #48c9bf; border-radius:10px; outline: none; } .input-img{ position: absolute; top:10px; left: 15px; width: 60px; height: 60px; } .input-login{ height: 80px; width: 550px; background-color: #48c9bf; border-radius: 10px; margin-top: 40px; } .input-login-text{ height: 80px; width: 550px; text-align: center; line-height: 80px; color: white; font-size: 35px; } .input-forget{ position: absolute; left: 30px; font-size: 30px; } .input-register{ position: absolute; right: 30px; font-size: 30px; }</style>
0 0
- Weex例子——登录页面
- Weex例子——Toast
- Weex开发调试神器——Weex Devtools
- React Native 启动白屏->引导页面->登录页面 例子
- weex开发实战(7)-在weex页面实现社交分享
- weex开发实战(8)--在weex页面实现图片上传
- Weex入门教程之3,使用 Vue 开发 Weex 页面
- weex入门学习总结——新建一个weex项目和安装sublime text3及其插件
- Django——登录后回到请求登录的页面
- weex 学习之登录界面的开发
- weex开发实战(4)-实现登录功能
- 新闻管理系统——登录页面
- html5练习——登录页面
- Ext学习1——登录页面
- EditText——(简单登录页面)
- 登录页面——链接数据库
- Cas登录页面修改——jsp页面中文乱码
- Weex
- ROI线性加权addweighted
- 数据结构线性表总章
- eclipse快捷键
- 【JZOJ3852】【spfa判负环】【NOIP2014八校联考第2场第2试9.28】单词接龙(words)
- 寒假思雨姐摸底G题,题解
- Weex例子——登录页面
- Mysql 基础DML语句
- windows 下面安装BeautifulSoup
- 2016 小灶1 C题 (HDU1225)
- 区块链uc berkeley白皮书总结
- 数据结构之从链表而来的森林
- 【JZOJ3854】【NOIP2014八校联考第2场第2试9.28】分组(group)
- [02]项目实战-PC 端固定布局(2)
- QT学习笔记02信号与槽简介