My vue component like this :
<template>
...
<ul v-if="!selected && keyword">
<li v-for="state in filteredStates" @click="select(state.name)">{{ state.name }}</li>
</ul>
...
</template>
<script>
export default {
...
computed: {
filteredStates() {
const data = this.$store.dispatch('getProducts', {
q: this.keyword
})
data.then((response) => {
console.log(response.data)
return response.data
})
}
}
}
</script>
The result of console.log(response.data) like this :
I want to display array data like the image above. But it is not show the value. Maybe my loop in the vue component is still wrong
How can I solve this problem?
