【发布时间】:2018-09-03 07:21:52
【问题描述】:
我试图在 vuetify 选择组件中显示“位置”,但我当前的代码呈现“[对象对象]”而不是位置 1、位置 2 等。
我的选择组件:
<v-select
:items="locations"
v-model="location"
label="Choose Location"
bottom
autocomplete
></v-select>
地点:
locations () {
return this.$store.getters.getLocationsForEvent(this.event.id)
}
Vuex Getter:
getLocationsForEvent: (state) => (id) => {
return state.loadedLocations.filter(function (location) {
return location.eventId === id;
});
}
这是位置数据的截图:
谢谢!
【问题讨论】:
-
举例说明函数
getLocationsForEvent返回的数据。 -
我添加了实际数据的截图
标签: vue.js vuex vuetify.js