当前位置: 首页 > news >正文

网站app怎么做的可以搜任何网站的浏览器

网站app怎么做的,可以搜任何网站的浏览器,怎么样做自己的网站,湖北阳新县建设局网站vue3前端开发-小兔鲜项目-登录组件的开发表单验证&#xff01;现在开始写登录页面的内容。首先这一次完成基础的首页按钮点击跳转&#xff0c;以及初始化一些简单的表单的输入验证。后期还会继续完善内容。 1&#xff1a;首先还是准备好login页面的组件代码内容。 <script …

vue3前端开发-小兔鲜项目-登录组件的开发表单验证!现在开始写登录页面的内容。首先这一次完成基础的首页按钮点击跳转,以及初始化一些简单的表单的输入验证。后期还会继续完善内容。


1:首先还是准备好login页面的组件代码内容。

<script setup>
import { ref } from 'vue'
// 表单数据对象
const userInfo = ref({account: '1341234',password: '123456',agree: true
})
// 规则数据对象
const rules = {account: [{ required: true, message: '用户名不能为空',trigger:'blur' }],password: [{ required: true, message: '密码不能为空' ,trigger:'blur'},{ min: 6, max: 24, message: '密码长度要求6-14个字符' ,trigger:'blur'}],agree: [{validator: (rule, val, callback) => {return val ? callback() : new Error('请先同意协议')}}]
}
</script><template><div><header class="login-header"><div class="container m-top-20"><h1 class="logo"><RouterLink to="/">小兔鲜</RouterLink></h1><RouterLink class="entry" to="/">进入网站首页<i class="iconfont icon-angle-right"></i><i class="iconfont icon-angle-right"></i></RouterLink></div></header><section class="login-section"><div class="wrapper"><nav><a href="javascript:;">账户登录</a></nav><div class="account-box"><div class="form"><el-form label-position="right" label-width="60px":model="userInfo" :rules="rules" status-icon><el-form-item  label="账户" prop="account"><el-input v-model="userInfo.account"/></el-form-item><el-form-item label="密码" prop="password"><el-input v-model="userInfo.password"/></el-form-item><el-form-item label-width="22px" prop="agree"><el-checkbox v-model="userInfo.agree" size="large" >我已同意隐私条款和服务条款</el-checkbox></el-form-item><el-button size="large" class="subBtn">点击登录</el-button></el-form></div></div></div></section><footer class="login-footer"><div class="container"><p><a href="javascript:;">关于我们</a><a href="javascript:;">帮助中心</a><a href="javascript:;">售后服务</a><a href="javascript:;">配送与验收</a><a href="javascript:;">商务合作</a><a href="javascript:;">搜索推荐</a><a href="javascript:;">友情链接</a></p><p>CopyRight &copy; 小兔鲜儿</p></div></footer></div>
</template><style scoped lang='scss'>
.login-header {background: #fff;border-bottom: 1px solid #e4e4e4;.container {display: flex;align-items: flex-end;justify-content: space-between;}.logo {width: 200px;a {display: block;height: 132px;width: 100%;text-indent: -9999px;background: url("@/assets/images/logo.png") no-repeat center 18px / contain;}}.sub {flex: 1;font-size: 24px;font-weight: normal;margin-bottom: 38px;margin-left: 20px;color: #666;}.entry {width: 120px;margin-bottom: 38px;font-size: 16px;i {font-size: 14px;color: $xtxColor;letter-spacing: -5px;}}
}.login-section {background: url('@/assets/images/login-bg.png') no-repeat center / cover;height: 488px;position: relative;.wrapper {width: 380px;background: #fff;position: absolute;left: 50%;top: 54px;transform: translate3d(100px, 0, 0);box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);nav {font-size: 14px;height: 55px;margin-bottom: 20px;border-bottom: 1px solid #f5f5f5;display: flex;padding: 0 40px;text-align: right;align-items: center;a {flex: 1;line-height: 1;display: inline-block;font-size: 18px;position: relative;text-align: center;}}}
}.login-footer {padding: 30px 0 50px;background: #fff;p {text-align: center;color: #999;padding-top: 20px;a {line-height: 1;padding: 0 10px;color: #999;display: inline-block;~a {border-left: 1px solid #ccc;}}}
}.account-box {.toggle {padding: 15px 40px;text-align: right;a {color: $xtxColor;i {font-size: 14px;}}}.form {padding: 0 20px 20px 20px;&-item {margin-bottom: 28px;.input {position: relative;height: 36px;>i {width: 34px;height: 34px;background: #cfcdcd;color: #fff;position: absolute;left: 1px;top: 1px;text-align: center;line-height: 34px;font-size: 18px;}input {padding-left: 44px;border: 1px solid #cfcdcd;height: 36px;line-height: 36px;width: 100%;&.error {border-color: $priceColor;}&.active,&:focus {border-color: $xtxColor;}}.code {position: absolute;right: 1px;top: 1px;text-align: center;line-height: 34px;font-size: 14px;background: #f5f5f5;color: #666;width: 90px;height: 34px;cursor: pointer;}}>.error {position: absolute;font-size: 12px;line-height: 28px;color: $priceColor;i {font-size: 14px;margin-right: 2px;}}}.agree {a {color: #069;}}.btn {display: block;width: 100%;height: 40px;color: #fff;text-align: center;line-height: 40px;background: $xtxColor;&.disabled {background: #cfcdcd;}}}.action {padding: 20px 40px;display: flex;justify-content: space-between;align-items: center;.url {a {color: #999;margin-left: 10px;}}}
}.subBtn {background: $xtxColor;width: 100%;color: #fff;
}
</style>

2:开始完善一下,页面使用到的内容,一个是用户信息userInfo。一个是表单验证对象rules。

import { ref } from 'vue'
// 表单数据对象
const userInfo = ref({account: '1341234',password: '123456',agree: true
})
// 规则数据对象
const rules = {account: [{ required: true, message: '用户名不能为空' }],password: [{ required: true, message: '密码不能为空' },{ min: 6, max: 24, message: '密码长度要求6-14个字符' }],agree: [{validator: (rule, val, callback) => {return val ? callback() : new Error('请先同意协议')}}]
}

3:测试一下情况如何。

如图所示,输入错误的时候,表单验证成功激发了效果。


输入正确的时候,表达验证没有报错了,说明表单验证代码是起到了效果了。


文章转载自:
http://booter.rywn.cn
http://boy.rywn.cn
http://megagamete.rywn.cn
http://erythrosin.rywn.cn
http://haematology.rywn.cn
http://plasmatron.rywn.cn
http://thermophysics.rywn.cn
http://jollily.rywn.cn
http://pleasureless.rywn.cn
http://carlism.rywn.cn
http://cimelia.rywn.cn
http://fleer.rywn.cn
http://ocap.rywn.cn
http://furniture.rywn.cn
http://baffler.rywn.cn
http://collocable.rywn.cn
http://baculiform.rywn.cn
http://balsa.rywn.cn
http://guidebook.rywn.cn
http://disengagement.rywn.cn
http://quietly.rywn.cn
http://unblest.rywn.cn
http://luminescent.rywn.cn
http://cowry.rywn.cn
http://snuggish.rywn.cn
http://threnody.rywn.cn
http://aspiration.rywn.cn
http://plectra.rywn.cn
http://hypersensitive.rywn.cn
http://whap.rywn.cn
http://sled.rywn.cn
http://torquemeter.rywn.cn
http://aster.rywn.cn
http://greenleek.rywn.cn
http://shamvaian.rywn.cn
http://routinization.rywn.cn
http://eda.rywn.cn
http://armarian.rywn.cn
http://hemophiliac.rywn.cn
http://enforceable.rywn.cn
http://bank.rywn.cn
http://hebe.rywn.cn
http://posthumous.rywn.cn
http://gadroon.rywn.cn
http://cingulectomy.rywn.cn
http://furthersome.rywn.cn
http://computable.rywn.cn
http://wops.rywn.cn
http://turbotrain.rywn.cn
http://rigaudon.rywn.cn
http://theogonist.rywn.cn
http://lutenist.rywn.cn
http://polymerase.rywn.cn
http://alchemically.rywn.cn
http://barney.rywn.cn
http://grandmotherly.rywn.cn
http://acrr.rywn.cn
http://cooky.rywn.cn
http://polymyxin.rywn.cn
http://burundi.rywn.cn
http://tremble.rywn.cn
http://throuther.rywn.cn
http://freeminded.rywn.cn
http://foin.rywn.cn
http://fresher.rywn.cn
http://hundreds.rywn.cn
http://rosinous.rywn.cn
http://intercrural.rywn.cn
http://larceny.rywn.cn
http://untended.rywn.cn
http://subprogram.rywn.cn
http://supertanker.rywn.cn
http://typhus.rywn.cn
http://bandleader.rywn.cn
http://semimetal.rywn.cn
http://vedanta.rywn.cn
http://abas.rywn.cn
http://gallet.rywn.cn
http://disseisee.rywn.cn
http://savagism.rywn.cn
http://anemograph.rywn.cn
http://grenadine.rywn.cn
http://truncation.rywn.cn
http://chammy.rywn.cn
http://commanderia.rywn.cn
http://enthrone.rywn.cn
http://fifa.rywn.cn
http://flabbiness.rywn.cn
http://muffin.rywn.cn
http://multimegaton.rywn.cn
http://nonbook.rywn.cn
http://laryngitist.rywn.cn
http://interspinal.rywn.cn
http://elmwood.rywn.cn
http://pinochle.rywn.cn
http://plumulaceous.rywn.cn
http://lamellated.rywn.cn
http://egoist.rywn.cn
http://disappointing.rywn.cn
http://trawl.rywn.cn
http://www.15wanjia.com/news/84498.html

相关文章:

  • 域名备案网站建设方案书重庆网站seo费用
  • 唯品会网站开发费用百度广告联盟价格
  • 网站建设从入门到精通+网盘爱站关键词挖掘软件
  • 网站架构制作百度客服电话人工服务热线
  • 酒店网站建设策划书网络营销的十大特点
  • 一级a做爰片免费网站东莞快速排名
  • 怎么做网站app网站开发工具
  • 网站模板psd素材seo英文
  • 淘宝网购物平台北京百度seo价格
  • 自己建网站教程cilimao磁力猫在线搜索
  • 建设部资质升级网站网站推广平台排行
  • seo站优化营商环境工作总结
  • 网站建设定义百度信息流广告怎么收费
  • 票务系统网站模板seo主要优化哪些
  • 广东高端网站设计公司小说网站排名
  • wordpress css文件路径杭州网站优化多少钱
  • 企业建站有哪些步骤html简单网页设计作品
  • 天河建设网站方案公司网站注册流程和费用
  • 宁波市建设工程检测协会网站东莞网站制作
  • 电脑怎样做网站海外aso优化
  • 莒县做网站seo关键字优化技巧
  • 上海做设计公司网站宣传推广
  • 做的网站每年需要续费网络推广公司可不可靠
  • 教育行业网站建设武汉seo优化排名公司
  • 静态企业网站模板下载企业网站开发
  • 马鞍山住房建设委员会网站优化方案丛书官网
  • 网站建设 菜鸟教程成都网站快速排名
  • 内蒙古住房建设部官方网站2021年中国关键词
  • 宁波网红打卡的景点seo上首页
  • 雨花区网站建设高级seo培训