父组件的编写

<a:orgCode=orgCode ></a>

在data里面增加orgCode。

data() {
  return {
    orgCode: '037',
    },
  };
},

子组件编写

子组件通过prop接收

props: {
  orgCode: {
    type: String,
    default: null,
  },
},

子组件使用

子组件可以通过this.orgCode进行使用。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
猜你喜欢
  • 2021-11-19
  • 2022-02-24
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-05-16
相关资源
相似解决方案