Vue.js this is undefined inside computed property
问题 I have following input tag with model selectedProp : <input type="text" v-model="selectedProp" /> and I want to iterate through items like this: <div v-for="item of filteredItems">{{item.prop}}</div> Here's the script for the component: export default { name: 'App', data() { return { items: [], selectedProp: "", projects: [], errors: [] } }, created() { axios.get(`${URL}`) .then(response => { // JSON responses are automatically parsed. this.items = response.data; }) .catch(e => { this.errors