What is the meaning of mixed mapGetters syntax?
P粉492959599
P粉492959599 2023-09-02 16:25:06
0
1
423

I saw in the documentation that mapGetters 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.

computed() { ...mapGetters('User', ['userToken']) }

What does this syntax mean?

P粉492959599
P粉492959599

reply all (1)
P粉387108772

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

So in your code,Useris the namespace.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!