当前位置: 首页 > 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.yutouwan.com/news/76338/

相关文章:

  • 响水网站制作公司比赛网站开发
  • 长沙网站微信开发如何做网页推广
  • 个人交互网站北京市工程建设交易信息网站
  • 网站和二级目录权重数据中心机房运维方案
  • 甘肃永靖建设住建局网站宁波制作网站的公司
  • 江苏省城乡和建设厅网站首页诸城做网站
  • 最专业微网站首选公司photoshop手机版安卓
  • 浏览有关小城镇建设的网站记录江苏建设工程招标网和淮安市公共资源交易网
  • 做1688网站运营工资怎么样做网站服务器电脑配置
  • 长沙h5手机网站制作建e网室内
  • 做代金券的网站seo是什么服务器
  • 机械类做的最好的网站京东官方网上商城
  • 梅州建网站国产前端框架 做网站
  • 专门做游戏的网站上海建筑设计院
  • 中国建设银行官网站诚聘英才代运营公司的套路
  • asp网站伪静态企业网站优化应该怎么做
  • 做伊瑞尔竞技场的网站网络推广策划
  • 制作网站图片不显示杭州网站建设响应式
  • 怎么查看一个网站的建设地区上海建设网站价格
  • startup wordpress站长工具seo综合查询怎么关闭
  • 网站可以做弹窗广告么快速将网站seo
  • 百度做的网站贵阳网站建设开发
  • 手机网站设计趋势网页在线生成器
  • 怎么从阿里巴巴做网站官网是什么意思
  • 南阳网站seo云南网警
  • 电商网站100排行榜wordpress4.9.6
  • 网站主色调有几种市场宣传推广方案
  • 网站实现用户登录网站认证是什么
  • 宝山网站建设费用网站建设的最新技术
  • 创建网站步骤如果做一个网站