52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
export default OakComponent({
|
||
entity: 'article',
|
||
isList: true,
|
||
properties: {
|
||
articleMenuId: '',
|
||
onChildEditArticleChange: (data) => undefined,
|
||
show: 'edit', // edit为编辑,doc为查看,preview为预览
|
||
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
|
||
breadcrumbItems: [],
|
||
drawerOpen: false,
|
||
changeDrawerOpen: (open) => undefined,
|
||
selectedArticleId: '',
|
||
openArray: [],
|
||
getTopInfo: (data) => undefined,
|
||
articleId: '',
|
||
currentArticle: '',
|
||
setCurrentArticle: (id) => undefined,
|
||
setCopyArticleUrl: (id) => '',
|
||
},
|
||
projection: {
|
||
id: 1,
|
||
name: 1,
|
||
articleMenuId: 1,
|
||
},
|
||
filters: [
|
||
{
|
||
filter() {
|
||
const { articleMenuId } = this.props;
|
||
return {
|
||
articleMenuId,
|
||
};
|
||
}
|
||
}
|
||
],
|
||
formData({ data: rows }) {
|
||
return {
|
||
rows,
|
||
};
|
||
},
|
||
methods: {
|
||
async createOne() {
|
||
const { articleMenuId } = this.props;
|
||
this.addItem({
|
||
name: '文章标题',
|
||
content: '',
|
||
articleMenuId,
|
||
});
|
||
await this.execute();
|
||
},
|
||
}
|
||
});
|