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

国外做二手服装网站wordpress的标题字体

国外做二手服装网站,wordpress的标题字体,个人小型网站建设,科凡网站建设基础的子组件和父组件通信已经搞定了#xff0c;可以看此博客 父子组件传值基础应用 需求 现在需求是在一个父页面引用子组件#xff0c;不只是要实现基本的父子组件传值。并且子组件给父组件传值的触发条件要在父页面触发。 目前小编采用的方式是使用ref 属性this.emit 方法…基础的子组件和父组件通信已经搞定了可以看此博客 父子组件传值基础应用 需求 现在需求是在一个父页面引用子组件不只是要实现基本的父子组件传值。并且子组件给父组件传值的触发条件要在父页面触发。 目前小编采用的方式是使用ref 属性this.emit 方法 在父页面调用子页面的方法结合this.emit方法实现。在父页面调用子页面的方法并且把子页面里的值通过父页面的自定义事件传递到父页面。 注意先新建子页面然后进行父子传值在父页面注册子页面为组件 父-子传值 父页面 templatediv classhelloChildComponents:msgmsgc/ChildComponentsbutton clicksend()向子组件传值/button/div /templatescript import ChildComponents from./ChildComponents.vue export default {name: HelloWorld,components: {ChildComponents:ChildComponents},data () {return {msgc:}},methods:{send(){this.msgc来自HelloWorld父组件的值;}} } /script!-- Add scoped attribute to limit CSS to this component only -- style scoped h3 {margin: 40px 0 0; } ul {list-style-type: none;padding: 0; } li {display: inline-block;margin: 0 10px; } a {color: #42b983; } /style 子页面 templatedivdivh1子组件的值/h1/divdiv{{msg}}br//div/div /templatescriptexport default {name: test,components: {},props: {msg: String},data () {return {}} } /script style scoped/style 结果 子-父传值 子页面触发 父页面 templatediv classhelloChildComponentssendMsgsendMsg:msgmsgc/ChildComponentsh1父组件的值/h1br/{{msgp}}button clicksend()向子组件传值/button/div /templatescript import ChildComponents from./ChildComponents.vue export default {name: HelloWorld,components: {ChildComponents:ChildComponents},data () {return {msgc:,msgp:,}},methods:{sendMsg(data) {this.msgpdata;},send(){this.msgc来自HelloWorld父组件的值;}} } /script!-- Add scoped attribute to limit CSS to this component only -- style scoped h3 {margin: 40px 0 0; } ul {list-style-type: none;padding: 0; } li {display: inline-block;margin: 0 10px; } a {color: #42b983; } /style 子页面 templatedivdivh1子组件的值/h1/divdiv{{msg}}br/button clicksendMsg()向父组件传值/button/div/div /templatescriptexport default {name: test,components: {},props: {msg: String},data () {return {}},methods: {sendMsg() {//子页面的值推送到父页面的自定义事件里this.$emit(sendMsg,来ChildComPonens自子组件的值)}}} /script style scoped/style 结果 父页面触发 父页面需要修改的地方 ChildComponentssendMsgsendMsgrefchile:msgmsgc/ChildComponentsh1父组件的值/h1br/{{msgp}}button clicksendParnt()子组件向父组件传值父组件触发/button//增加一个方法methods:{sendParnt() {this.$refs.chile.sendmsgP()}} 子组件只需要增加一个方法 sendmsgP 父页面可以通过ref 调用 methods: {sendMsg() {this.$emit(sendMsg,来ChildComPonens自子组件的值)},sendmsgP(){this.sendMsg()}} 结果
http://www.huolong8.cn/news/76338/

相关文章:

  • me域名公司网站深圳宝安区有哪些街道
  • 建设网站怎么判断是电脑还是手机阿里云服务器免费一年
  • 做网站如何月入10万建设企业网站需要了解什么
  • 小网站的制作网站首页设计图
  • 旅游精品网站建设建筑公司logo设计大全
  • 汽车配件生产企业网站模板南通哪里做网站
  • 网站开发类专业服务文案开源 wordpress 主题
  • 单位网站和新媒体建设制度中小企业网站建设济南兴田德润o厉害吗
  • 自己电脑建设网站苏州网站运营公司
  • 如何制作自己网站淘宝的网站建设费用
  • 做算命网站网站片头怎么做
  • 怎么建设可以收费的网站dede网站源码
  • 多元网站建设德庆网站建设价格
  • 广州知名的网站建设公司哈尔滨信息网租房信息
  • 网站编程语言培训机构wordpress基础安装教程
  • 渭南做网站电话自己做电影网站需要的成本
  • 狠狠做网站 百度一下学校设计网站方案
  • 域名抢注网站php网站后台模板下载
  • 我的世界怎么做神器官方网站西安品牌网站建设服务商
  • 校园网站开发的需求和分析设计公司怎么找
  • 心理咨询网站后台网页视频怎么下载到本地视频电脑
  • 百度做的网站能优化吗公司管理app有哪些
  • 网站改版引导做网站都用什么工具
  • 烟台h5网站制作怎么做网站和注册域名
  • wordpress 用户组国外seo工具
  • 网站悬浮广告代码网站伪静态文件
  • 做网站的所有代码建设银行网站用户密码找回
  • 网站开发参考文献2016大型电子商务网站开发
  • 成都网站建设 招聘公司网站建设费用入什么费用
  • 网站关键词库庆阳吧