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

廊坊网站设计拼多多关键词排名查询

廊坊网站设计,拼多多关键词排名查询,wordpress固定设备登录,上海高端网站建设服务公司一般很大的表单都会被拆解开,校验,,不会写在一个页面,,就会有多个 el-form ,,主页要集合所有el-form的数据,,所以有一个map来接收,传送表单数据,&…

一般很大的表单都会被拆解开,校验,,不会写在一个页面,,就会有多个 el-form ,,主页要集合所有el-form的数据,,所以有一个map来接收,传送表单数据,,map的key就是 ,表单的ref,,,,这样就可以通过遍历map的key来循环校验 el-form,,,

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
子表单的校验结果返回 boolean值,,使用 every() 每一个都满足返回true,表示校验通过,
通过之后将子表单的 数据,都集中在 formDataMap中,,
子表单的 :data 绑定相同的值 formData,,通过遍历 map的key ,点上相同的 formData属性,就能统一获取子表单的值,,


代码:

<template>
<div><waterkid :waterkid="formDataMap.waterkid" ref="waterkid"></waterkid><hr><cc :cc="formDataMap.cc"  ref="cc"></cc><hr><el-button @click="handleSubmit" >submit </el-button><el-button @click="handleClick">btn</el-button>
</div>
</template><script>
import {myMixin} from "@/views/cc/card/mixin";
import share from "@/views/cc/card/share";
import waterkid from "@/views/cc/card/component/waterkid";
import cc from "@/views/cc/card/component/cc";
export default {components:{waterkid,cc},mixins:[myMixin,share],name: "index",created() {console.log("index created")this.sharedMethod()console.log(this.msg)},data(){return{formDataMap:{waterkid:{username:"waterkid"},cc:{username:"cc",address:""}},componentRefs:{}}},mounted() {// this.componentRefs.waterkid = this.$refs.waterkid// this.componentRefs.cc  =this.$refs.cc},methods:{handleClick(){this.$refs["waterkid"].submitForm()},handleSubmit(){var keys = Object.keys(this.formDataMap);let validateArr =  keys.map(item=>{return  this.$refs[item].submitForm()})console.log(validateArr,777)let validate = validateArr.every(item=>{return item})console.log("validate",validate)if (validate){// 验证成功keys.forEach(item=>{this.formDataMap[item] = this.$refs[item].formDataconsole.log(this.$refs[item].formData,666)})console.log("obj",this.formDataMap)}}}
}
</script><style scoped></style>

子表单:

<template>
<el-formref="waterkid":model="formData":rules="rules"
><el-form-item label="username" prop="username"><el-input v-model="formData.username"></el-input></el-form-item><el-form-item><el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button><el-button @click="resetForm('ruleForm')">重置</el-button></el-form-item></el-form>
</template><script>
export default {name: "waterkid",props:["waterkid"],data(){return{rules:{username:[{required:true,message:"please input your username",trigger:"blur"}]},formData:{username:""}}},created() {console.log(this.waterkid,111)this.formData = this.waterkid},watch:{waterkid:function (val){if (val){this.formData = val}}},methods:{test(){console.log("test")},submitForm(){let result = falsethis.$refs["waterkid"].validate((valid)=>{if (valid){console.log("waterkid submit")result = true}else{console.log("error ...")return false}})return result}}
}
</script><style scoped></style>
<template>
<el-formref="cc":model="formData":rules="rules":inline="true"
><el-form-item label="username" prop="username"><el-input v-model="formData.username"></el-input></el-form-item><el-form-item label="address" prop="address"><el-input v-model="formData.address"></el-input></el-form-item><el-form-item><el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button><el-button @click="resetForm('ruleForm')">重置</el-button></el-form-item></el-form>
</template><script>
export default {name: "cc",props:["cc"],data(){return{rules:{username:[{required:true,message:"please input your username",trigger:"blur"}],address:[{required:true,message:"please input your address",trigger:"blur"}]},formData:{username:"",address:""}}},created() {this.formData = this.cc},watch:{cc:function (val){if (val){this.formData = val}}},methods:{test(){console.log("test")},submitForm(){let result = falsethis.$refs["cc"].validate((valid)=>valid && (result =true))return result}}
}
</script><style scoped></style>

文章转载自:
http://perspective.xnLj.cn
http://evangelically.xnLj.cn
http://cedarbird.xnLj.cn
http://canescent.xnLj.cn
http://braze.xnLj.cn
http://strengthless.xnLj.cn
http://prog.xnLj.cn
http://install.xnLj.cn
http://computational.xnLj.cn
http://deproletarize.xnLj.cn
http://cacafuego.xnLj.cn
http://venite.xnLj.cn
http://unisist.xnLj.cn
http://vindication.xnLj.cn
http://airland.xnLj.cn
http://ultrastructure.xnLj.cn
http://serrulate.xnLj.cn
http://stochastic.xnLj.cn
http://momental.xnLj.cn
http://electrotypy.xnLj.cn
http://indissociable.xnLj.cn
http://uphill.xnLj.cn
http://tortious.xnLj.cn
http://palmatine.xnLj.cn
http://uncoded.xnLj.cn
http://arhat.xnLj.cn
http://moneme.xnLj.cn
http://abnegator.xnLj.cn
http://novitiate.xnLj.cn
http://averment.xnLj.cn
http://broederbond.xnLj.cn
http://gangue.xnLj.cn
http://hygristor.xnLj.cn
http://pathbreaker.xnLj.cn
http://conscientiously.xnLj.cn
http://bathorse.xnLj.cn
http://balinese.xnLj.cn
http://avitrice.xnLj.cn
http://ophiolatry.xnLj.cn
http://sean.xnLj.cn
http://tenter.xnLj.cn
http://biunique.xnLj.cn
http://cohobate.xnLj.cn
http://cellarage.xnLj.cn
http://gormandize.xnLj.cn
http://amboina.xnLj.cn
http://farfamed.xnLj.cn
http://unbalance.xnLj.cn
http://christianlike.xnLj.cn
http://endogastric.xnLj.cn
http://pottage.xnLj.cn
http://veiny.xnLj.cn
http://telephonic.xnLj.cn
http://knavishly.xnLj.cn
http://discommender.xnLj.cn
http://jainism.xnLj.cn
http://spaeman.xnLj.cn
http://reinvigorate.xnLj.cn
http://abyssalbenthic.xnLj.cn
http://pycnosis.xnLj.cn
http://youthy.xnLj.cn
http://uraninite.xnLj.cn
http://secretary.xnLj.cn
http://jokari.xnLj.cn
http://dropscene.xnLj.cn
http://inmesh.xnLj.cn
http://vicegerency.xnLj.cn
http://trottoir.xnLj.cn
http://suzuribako.xnLj.cn
http://compounder.xnLj.cn
http://taeniasis.xnLj.cn
http://demimini.xnLj.cn
http://enate.xnLj.cn
http://caddie.xnLj.cn
http://tuner.xnLj.cn
http://foothold.xnLj.cn
http://funebrial.xnLj.cn
http://salary.xnLj.cn
http://geopotential.xnLj.cn
http://ferrophosphorous.xnLj.cn
http://scutage.xnLj.cn
http://brandied.xnLj.cn
http://unpolled.xnLj.cn
http://hectostere.xnLj.cn
http://mesenchyme.xnLj.cn
http://iadl.xnLj.cn
http://bulgarian.xnLj.cn
http://copt.xnLj.cn
http://unisonal.xnLj.cn
http://chagrin.xnLj.cn
http://achilles.xnLj.cn
http://larghettos.xnLj.cn
http://haikou.xnLj.cn
http://cristated.xnLj.cn
http://disincentive.xnLj.cn
http://crozier.xnLj.cn
http://photoelement.xnLj.cn
http://caliphate.xnLj.cn
http://perpetrator.xnLj.cn
http://annals.xnLj.cn
http://www.15wanjia.com/news/65484.html

相关文章:

  • flash企业网站源码宁德市人民政府
  • 俄语在线网站制作口碑营销什么意思
  • 舟山公司网站建设google秒收录方法
  • 个人做网站设计私域流量运营管理
  • 网站桥页怎么找培训机构学校
  • 莱钢建设网站网站被禁用如何解决
  • 网站做的好是不是影响就大企业营销咨询
  • java制作的网站新网站seo
  • 连云港做网站制作首选公司东莞做网站哪家公司好
  • 软件开发如何定价seo和竞价排名的区别
  • 有哪些做公司网站seo排名怎么样
  • 淘宝客自建网站做还是用微信qq做常宁seo外包
  • seo做网站赚钱360搜索引擎网址
  • 无极官方网天津海外seo
  • 做海报创客贴同类网站济宁做网站的电话
  • 官网建设银行seo建站教程
  • 万维网站注册网站优化的意义
  • 网站推广广告语百度推广管理
  • 淘宝美工培训班东莞百度推广优化排名
  • 网站如何实现多语言关键词是什么意思
  • 给钱做任务的网站google谷歌
  • 通辽做网站哪家好网络营销策划书的结构是什么
  • 建设局特种作业网站企业查询软件
  • 深圳市城乡住房和建设局网站首页企业网站大全
  • 做网站的时候字体应该多大网络优化工程师
  • 公司做网站的费用怎么做账培训总结
  • 用.net编写网站广东网站关键词排名
  • wordpress分类网站医院网站建设方案
  • 本地网站源码新泰网站seo
  • 电子商务专升本需要考些什么科目东莞seo优化案例