Answer the question
In order to leave comments, you need to log in
How to fix destructuring?
There is a list of cities that is taken from the storage
ul.cities-list
li.cities-list__item(
v-for="city in CITIES_LIST_MAIN"
@click="selectCity"
v-bind="cityChoiceBinds"
)
| {{city.name}}
cityChoiceBinds() {
this.CITIES_LIST_MAIN.map((item) => {
return item
})
}
selectCity(e, { cityCode, storeId, name }) {
this.CHANGE_CITY({
cityCode,
storeId,
name,
})
},
CITIES_LIST_MAIN
Answer the question
In order to leave comments, you need to log in
@click="selectCity"
selectCity(e, { cityCode, storeId, name }) {
$event
):@click="selectCity(city)"
selectCity({ cityCode, storeId, name }) {
...
The cityChoiceBinds() function doesn't return anything, and map doesn't make sense in it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question