57 lines
1.2 KiB
JavaScript
57 lines
1.2 KiB
JavaScript
export default OakComponent({
|
|
entity: 'articleMenu',
|
|
isList: false,
|
|
projection: {
|
|
id: 1,
|
|
name: 1,
|
|
entity: 1,
|
|
entityId: 1,
|
|
parentId: 1,
|
|
isArticle: 1,
|
|
extraFile$entity: {
|
|
$entity: 'extraFile',
|
|
data: {
|
|
id: 1,
|
|
tag1: 1,
|
|
origin: 1,
|
|
bucket: 1,
|
|
objectId: 1,
|
|
filename: 1,
|
|
extra1: 1,
|
|
extension: 1,
|
|
type: 1,
|
|
entity: 1,
|
|
},
|
|
filter: {
|
|
tag1: {
|
|
$in: ['logo'],
|
|
},
|
|
},
|
|
},
|
|
article$articleMenu: {
|
|
$entity: 'article',
|
|
data: {
|
|
id: 1,
|
|
name: 1,
|
|
},
|
|
},
|
|
},
|
|
formData({ data }) {
|
|
const articles = data?.article$articleMenu?.map((ele) => {
|
|
return {
|
|
name: ele.name,
|
|
id: ele.id,
|
|
};
|
|
});
|
|
return {
|
|
menu: data,
|
|
menuName: data?.name,
|
|
articles,
|
|
};
|
|
},
|
|
properties: {
|
|
highlightBgColor: 'none',
|
|
allowHiddenMenu: false,
|
|
},
|
|
});
|