forked from verdnatura/salix-front
Merge pull request 'Solucion comentario' (#51) from fixes/issuecomment_37214 into branch-PR-2
Reviewed-on: hyervoni/salix-front-mindshore#51
This commit is contained in:
commit
3118d64d5d
|
@ -67,24 +67,19 @@ function exprBuilder(param, value) {
|
||||||
return { [param]: value };
|
return { [param]: value };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setCategoryList = (data) => {
|
||||||
|
categoryList.value = (data || [])
|
||||||
|
.filter((category) => category.display)
|
||||||
|
.map((category) => ({
|
||||||
|
...category,
|
||||||
|
icon: `vn:${(category.icon || '').split('-')[1]}`,
|
||||||
|
}));
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData url="ItemCategories" limit="30" auto-load @on-fetch="setCategoryList" />
|
||||||
url="ItemCategories"
|
|
||||||
limit="30"
|
|
||||||
auto-load
|
|
||||||
@on-fetch="
|
|
||||||
(data) => {
|
|
||||||
categoryList = (data || [])
|
|
||||||
.filter((category) => category.display)
|
|
||||||
.map((category) => ({
|
|
||||||
...category,
|
|
||||||
icon: `vn:${(category.icon || '').split('-')[1]}`,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
"
|
|
||||||
/>
|
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
|
|
Loading…
Reference in New Issue