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

建站推广哪里有建站新闻资讯编程平台

建站推广哪里有建站新闻资讯,编程平台,云计算 网站建设,河北邯郸网络科技公司有哪些之前做得比较多的校验是在el-form表单里做的#xff0c;但有时也遇到#xff0c;需要在table内输入数据#xff0c;然后校验输入的数据是否符合要求的情况。因此记录一下。 思路#xff1a; 1.需要借助el-form的校验#xff0c;el-table外层嵌套一层el-form#xff0c;使…之前做得比较多的校验是在el-form表单里做的但有时也遇到需要在table内输入数据然后校验输入的数据是否符合要求的情况。因此记录一下。 思路 1.需要借助el-form的校验el-table外层嵌套一层el-form使用el-form的校验机制 2.由于每行都需要校验因此需要借助scope.$index 3.借助一个提交按钮测试校验 效果 1.不输入数据直接点击“提交”触发校验由于数据没有输入校验不通过给出校验提示 2.点击输入框输入点击某一个字段即正在输入状态这个字段的校验结果就会被清除clearValidate 3.数据都填好之后点击“提交”再次触发校验 4.校验通过显示全屏提示是否提交点击“确定”即可控制台会打印“校验通过 div idappel-form classbase-form refbaseForm :modelbaseForm :rulesrules auto-completeonel-table reftable-input classtable highlight-current-row :databaseForm.demoListel-table-column label姓名 show-overflow-tooltiptemplate slot-scopescopeel-form-item :propdemoList.scope.$index.name :rulesrules.name classallel-input v-modelscope.row.name placeholder请输入 clearable focus$refs.baseForm.clearValidate(demoList.${scope.$index}.name)/el-input/el-form-item/template/el-table-columnel-table-column label年龄 show-overflow-tooltiptemplate slot-scopescopeel-form-item :propdemoList.scope.$index.age :rulesrules.age classallel-input v-modelscope.row.age placeholder请输入 clearable focus$refs.baseForm.clearValidate(demoList.${scope.$index}.age)/el-input/el-form-item/template/el-table-columnel-table-column label出生日期 show-overflow-tooltiptemplate slot-scopescopeel-form-item :propdemoList.scope.$index.birthday :rulesrules.birthday classallel-date-picker placeholder请选择 v-modelscope.row.birthday formatyyyy-MM-dd clearable focus$refs.baseForm.clearValidate(demoList.${scope.$index}.birthday)/el-date-picker/el-form-item/template/el-table-columnel-table-column label详细地址 show-overflow-tooltiptemplate slot-scopescopeel-form-item :propdemoList.scope.$index.address :rulesrules.address classallel-input v-modelscope.row.address placeholder请输入 clearable focus$refs.baseForm.clearValidate(demoList.${scope.$index}.address)/el-input/el-form-item/template/el-table-column/el-table/el-formdiv classflex-c-a margin-top-10el-button clicksubmit提交/el-button/div/divdata数据 baseForm: {demoList: [{name: ,age: ,birthday: ,address: }]},index: 0,rules: {name: [{required: true,message: 请输入姓名,trigger: blur}],age: [{ required: true, message: 请输入年龄, trigger: blur }],birthday: [{ required: true, message: 请选择出生日期, trigger: change }],address: [{ required: true, message: 请输入详细地址, trigger: blur }],}method 给一个提交按钮测试校验 // 提交核对账目 submit() {this.$refs.baseForm.validate((valid) {if (valid) {this.$confirm(您确定【提交】, 提示, {confirmButtonText: 确定,cancelButtonText: 取消,type: warning}).then(() {console.log(校验通过)})}}) }例子里使用的css .all {width: 100%;}.flex-c-a {display: flex;align-items: center;justify-content: space-around;}.margin-top-10 {margin-top: 10px;}.base-form.el-form-item__content {margin-left: 0;}
http://www.huolong8.cn/news/317714/

相关文章:

  • seo网站关键字优化外贸进出口业务流程
  • 济源做网站的公司不限流量网站空间
  • 那种漂亮的网站怎么做买域名做网站跳转
  • 网站建设的含义合肥建行网站
  • 免费做房产网站有哪些如何做公司推广
  • python网站开发实践网站后台管理系统 静态页面
  • 国内网站wordpress noinput
  • 怎么用wordpress打开网站吗北京价格微网站建设
  • 手机网站开发步骤软件安徽建设网站公司
  • 有哪些网站可以免费做推广的网站 ip修改备案流程
  • 佛山制作手机网站wordpress右键插件
  • 网站建设书店目标客户分析广告推广费用一般多少
  • 简易购物网站模板好的交互设计网站
  • 中山网站建设公司哪个好微信公众号推广的方法
  • 网站后台不能上传图片wordpress 增加内存
  • 网站建设和维护人员职责建个网站需要投资多少
  • 定制网页设计报价seo推广的常见目的有
  • 郑州站网址导航主页
  • 网站基本信息设置规划网站总结
  • 做湲网站网站访客qq获取代码
  • 廊坊高端网站建设天津网站制作重点
  • 网站素材模板 站长国外建筑公司网站
  • 免费做产品画册的网站一站式做网站
  • 自己做的网站怎么让别人看到设计师接私活的兼职平台
  • 大腕 网站建设天津网络关键词优化
  • 贵阳网站建设公司哪家好wordpress更改站点地址
  • 利用百度快照搜索消失的网站初级网页设计师
  • 金融投资网站模板广州网站制作开发公司
  • 温州网站建设这个免费响应式企业网站源码
  • 建设网站模式成都网站建设联系电话