search

Home  >  Q&A  >  body text

javascript - In the vue-cli project, can sub-components dynamically change the meta attributes in routes?

If you want to change the title of WeChat through the title attribute set in the meta of the route, and if you want to get the product details in the product details section, you need to dynamically get the title attribute of the meta in the route in the sub-component and change it. Please do this. Is it possible?

学习ing学习ing2731 days ago889

reply all(1)I'll reply

  • 滿天的星座

    滿天的星座2017-07-05 10:40:30

    Use this.$route.meta.pageTitle = 'Title';

    in the child component

    reply
    0
  • Cancelreply