zoukankan      html  css  js  c++  java
  • 调用组件页面并传参

     //a.vue页面调用
    <user-detail ref="detailRef" :detail-visible="detailVisible" @changeShow="showDetail" />
    //引入
    import UserDetail from './detail.vue'
      components: {UserDetail}
     
       handleDetail(id) {
          this.detailVisible = true
          this.$nextTick(() => {
            this.$refs.detailRef.dataInitialization(id)
          })
        },
    detail.vue页面接收
     dataInitialization(id) {
          this.userId = id
          getEmployeeByEid({ eid: this.userId }).then(res => {
            this.form = res.data
          })
        }
  • 相关阅读:
    hdu 1074
    hdu 4091
    hdu 4422
    hdu 3940
    hdu 2831
    hdu 1172
    hdu 3732
    hdu 1250
    hud 2073
    IOS socket基于tcp/udp的通信
  • 原文地址:https://www.cnblogs.com/lemonmoney/p/15813860.html
Copyright © 2011-2022 走看看