search

Home  >  Q&A  >  body text

javascript - When using vue $on and $emit to transfer values ​​between two vue files, the value can be printed on the console but not on the page.

Write emit in a.vue

Write $on in b.vue to get

But in b.vue, the value of user_id can be printed on the console, but cannot be printed on the page.

Both vue files have introduced bus, why is this?

三叔三叔2728 days ago1053

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-06-14 10:55:32

    Print this to see if it is this of the vue instance

    reply
    0
  • Cancelreply