我在文档中看到,mapGetters可以在将存储值映射到本地组件状态时,使用对象(用于显式本地命名)或数组(用于隐式命名)。然而,我正在使用的代码库使用了一种陌生的语法,其中字符串与数组混合使用。
computed() {
...mapGetters('User', ['userToken'])
}
这种语法是什么意思?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号