search

Home  >  Q&A  >  body text

What is the meaning of mixed mapGetters syntax?

<p>I saw in the documentation that <code>mapGetters</code> can use objects (for explicit local naming) or arrays (for implicit naming) when mapping stored values ​​to local component state ). However, the code base I'm working with uses an unfamiliar syntax where strings are mixed with arrays. </p> <pre class="brush:php;toolbar:false;">computed() { ...mapGetters('User', ['userToken']) }</pre> <p>What does this syntax mean? </p>
P粉492959599P粉492959599523 days ago529

reply all(1)I'll reply

  • P粉387108772

    P粉3871087722023-09-03 00:25:41

    Your link is not a document, just an example. Please refer to the actual documentation

    So in your code, User is the namespace.

    reply
    0
  • Cancelreply