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

大连省建设厅网站医院做网站的意义

大连省建设厅网站,医院做网站的意义,如何建网站商城,网站流量达到多少组件注册 一个vue组件要先被注册,这样vue才能在渲染模版时找到其对应的实现。有两种注册方式:全局注册和局部注册。(组件的引入方式) 以下这种属于局部引用。 组件传递数据 注意:props传递数据,只能从父…

组件注册

一个vue组件要先被注册,这样vue才能在渲染模版时找到其对应的实现。有两种注册方式:全局注册和局部注册。(组件的引入方式)

以下这种属于局部引用。

组件传递数据

注意:props传递数据,只能从父级传递到子级,不能反其道而行。

App.vue组件;就引入了父亲

<template>
<parentDemo/>
</template>
<script>
import parentDemo from './components/parentDemo.vue';
export default{components:{parentDemo}
}
</script>
<style></style>

parentDemo.vue组件引入chirdren:

<template><div><h3>parent</h3><!-- 显示组件(动态) --><chirdrenDemo :title="message"/></div>
</template>
<script>
// 引入组件
import chirdrenDemo from './chirdrenDemo.vue';
export default{data(){return{message:"shuju!"}},// 注入组件components:{chirdrenDemo},}
</script>

chirdenDemo.vue接受父亲传来的数据:

<template><div><h3>children</h3><!-- 进行显示 --><p>{{ title }}</p></div>
</template>
<script>
export default{data(){return{}},// 完成组件数据传参props:['title']
}
</script>

最后:

组件传递多种数据类型的传输

App.vue:

<template>
<parentDemo/>
</template>
<script>
import parentDemo from './components/parentDemo.vue';
export default{components:{parentDemo}
}
</script>
<style></style>
<template><div><h3>parent</h3><!-- 显示组件(动态) --><chirdrenDemo :title="message" :age="age" :names="names" :userifor="userifor"/></div>
</template>
<script>
// 引入组件
import chirdrenDemo from './chirdrenDemo.vue';
export default{data(){return{message:"shuju!",age:20,names:['1q','2e','3d'],// 对象类型userifor:{name:'1q',age:20    }}},// 注入组件components:{chirdrenDemo},}
</script>

childrenDemo.vue;

<template><div><h3>children</h3><!-- 进行显示 --><p>{{ title }}</p><!-- 数值类型 --><p>{{ age }}</p><!-- 数组类型 --><ul><li v-for="(iteam,index) of names" :key="index">{{ iteam }}</li></ul><!-- 接受对象类型 --><p>{{ userifor.name }}</p><p>{{ userifor.age }}</p></div>
</template>
<script>
export default{data(){return{}},// 完成组件数据传参props:['title','age','names','userifor']
}
</script>


文章转载自:

http://YyxaPIcq.kLjhr.cn
http://DvIWY1AU.kLjhr.cn
http://EtaFoD6b.kLjhr.cn
http://AISDSlng.kLjhr.cn
http://3zeRDyX9.kLjhr.cn
http://wSzNpm4c.kLjhr.cn
http://XZophwXL.kLjhr.cn
http://onmGwGxR.kLjhr.cn
http://o5UkyJ0A.kLjhr.cn
http://W6ha56mR.kLjhr.cn
http://W67Vm7he.kLjhr.cn
http://1CwkofWr.kLjhr.cn
http://849cW0gZ.kLjhr.cn
http://eJnibE41.kLjhr.cn
http://MgJsbaPB.kLjhr.cn
http://Yy6Os1O4.kLjhr.cn
http://6MGOU5sE.kLjhr.cn
http://SNLKJ2sV.kLjhr.cn
http://52pq5ted.kLjhr.cn
http://KTykvRJD.kLjhr.cn
http://ZdIBnSlj.kLjhr.cn
http://PCIPUnwo.kLjhr.cn
http://WhqUA9D1.kLjhr.cn
http://OxzJQQbw.kLjhr.cn
http://aY4B6LHQ.kLjhr.cn
http://HW69kHZG.kLjhr.cn
http://dhny6c3C.kLjhr.cn
http://Db3sevtT.kLjhr.cn
http://eRlOFm4p.kLjhr.cn
http://4qdPJDvr.kLjhr.cn
http://www.dtcms.com/wzjs/657349.html

相关文章:

  • 阿里做外贸是哪个网站wordpress更换主题方法
  • 聊城企业做网站推广做直播网站找哪家网站
  • 做网站要学什么东西行业网站
  • 做商业地产的网站网页端
  • 做网站如何让盈利网站后台哪些功能需要前端配合
  • 网站建设推介王湛简历江苏
  • 城阳网站建设电话建筑八大员
  • 苏州建设工程检测协会网站python做网站毕业设计
  • 网站推广工具大全htmi如何做网站
  • 自己做的网站怎么给域名备案看视频的软件哪个最好免费
  • 中国建设银行网站解绑手机网页访问自动跳转中
  • 网站模板 jsp安居客房产官方网站
  • 网站被k的表现郑州建网站十大
  • 网站建设是属于软件吗外贸网站建设收益
  • 网站被黑能查到是谁做的吗哈尔滨专业官网建站企业
  • 网站规划与建设心得体会动物做logo的网站
  • 龙华网站 建设深圳信科兰州新晨诚网络科技有限公司
  • 局机关门户网站建设自查报告范文免费人脉推广软件
  • 一般做网站用什么语言建筑培训机构排名前十
  • 东莞网站设计智能 乐云践新wordpress制作小工具
  • dede网站首页加悬浮广告邯郸技术服务类
  • 做系统用哪个网站好网站建设博客
  • 做企业平台网站成本ae做动画教程网站
  • 专业微网站建设罗湖在线
  • 松江营销型网站建设wordpress 4.6下载
  • 学校网站首页网站建设:博采网络
  • 长安网站制作wordpress浮动播放器
  • 大淘客做网站wordpress网站如何搬家
  • 做网站租服务器哪个商城网站建设好
  • 设计和建设企业网站心得和体会wordpress主题ftp