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

c#做asp.net网站/微信推广多少钱一次

c#做asp.net网站,微信推广多少钱一次,网站销售系统怎么做,wang域名注册网站vue实现父子组件通信 通过一些demo来进行练习尝试 demo结构&#xff1a; App.vue引用parent.vue parent.vue引用child.vue //app.vue <template><div id"app"><!-- vue的命名规范&#xff0c;我在组件中注册是用的MParent&#xff0c;引用的时候需要…

vue实现父子组件通信
通过一些demo来进行练习尝试

demo结构:
App.vue引用parent.vue parent.vue引用child.vue

//app.vue
<template><div id="app"><!-- vue的命名规范,我在组件中注册是用的MParent,引用的时候需要使用-进行隔开 --><m-parent></m-parent></div>
</template><style></style><script>
import MParent from "./views/Parent.vue";
export default {components: {MParent,},
}
</script>
//Parent.vue
<template><div><h1>parent</h1><m-child></m-child></div>
</template><script>
import MChild from "./Child.vue"export default {components: {MChild,},}
</script><style scoped></style>
//Child.vue
<template><div><h3>child</h3></div>
</template><script>export default {}
</script><style scoped></style>

父组件传递给子组件

在父组件中编写需要传递的数据

<h1>parent</h1>
<m-child msg ="from parent msg"></m-child>

子组件使用props进行接收
并且在创建一个标签进行数据显示

//创建h5标签来进行显示
<h3>child</h3>
<h5>{{msg}}</h5>//使用props进行接收
<script>export default {props:{msg:{type:String,default:''}}}
</script>

子组件传递给父组件

使用$emit来进行传递
首先在子组件中设置需要传递的值,我们设置一个按钮来进行传递

<button @click="passMsg">走你</button>
//定义方法
methods: {passMsg() {this.$emit('showMsg','i am from child')}},

然后在父组件中,我们使用@加关键字来进行一个监听

<m-child :msg ="'from parent msg'" @showMsg="showMsg"></m-child>

定义一个空的msg来进行接收替换

data() {return {msg:''}},methods: {
showMsg(val) {this.msg = val}},
//在网页上进行显示
<h3>{{msg}}</h3>
http://www.jmfq.cn/news/4935349.html

相关文章:

  • 华为网站推广策略/东莞优化排名公司
  • 扁平化网站布局/南宁seo规则
  • 临淄网站制作首选专家/seo是干嘛的
  • wordpress上传突然提示需要ftp/app排名优化公司
  • 网站开发与运营/最近一周新闻大事摘抄
  • 海安网站设计公司/免费个人主页网站
  • 个人如何做短视频网站/网站维护一年一般多少钱?
  • 站长网站建设/网站设计公司哪家专业
  • 企业做营销型网站/网站优化推广方案
  • 建筑企业招聘信息/seo技术是什么意思
  • 网站开发 源码/google搜索免费入口
  • 如何建立网站视频/怎么建自己的网站?
  • 做美图网站有哪些东西吗/关键词出价计算公式
  • 带网站的图片素材/论文收录网站有哪些
  • 开源cms管理系统/百度seo工作室
  • 网站设计开题报告范文/芭嘞seo
  • 为网站做一则广告语/网红推广团队去哪里找
  • 网站建设的公司这个/seo服务方案
  • wordpress文章对齐方式/搜索引擎优化推广
  • 网站如何做标题优化/国外网站加速
  • 怎么选择营销型网站建设公司/电商平台推广怎么做
  • 织梦怎么做中英文网站/网站整站优化公司
  • wordpress分享微信朋友圈/搜索引擎优化文献
  • 政府网站开发/搜索优化引擎
  • 百度推广区域代理/我赢网seo优化网站
  • 手机做车载mp3下载网站/河南郑州网站推广优化外包
  • 东莞病毒/新手如何学seo
  • 美妆网站源码asp/成品视频直播软件推荐哪个好一点
  • 政府网站建设管理工作落实情况/郑州网站seo外包公司
  • 调取接口做网站/seo属于什么职位类型