computed:{..mapGetters([])}
时间: 2023-10-13 11:27:58 浏览: 100
地图信息采集
This code fragment is using the mapGetters helper function from Vuex to map getters from the store to computed properties in a component.
The syntax for mapGetters is as follows:
```javascript
mapGetters(namespace?: string, map: Array<string> | Object<string>): Object
```
In this case, an empty array is passed as the second argument, which means all getters from the store will be mapped to computed properties in the component.
The resulting computed properties will have the same name as the getters in the store, and can be accessed in the component using `this.propertyName`. For example, if there is a getter in the store called `getFoo`, it can be accessed in the component as `this.getFoo`.
阅读全文