oak-general-business/es/components/articleMenu/treeManager/index.js

32 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export default OakComponent({
entity: 'articleMenu',
isList: true,
methods: {
gotoDoc() {
const { onMenuView } = this.props;
onMenuView && onMenuView();
},
gotoArticleDetail(oakId) {
const { onArticleView } = this.props;
onArticleView && onArticleView(oakId);
},
},
properties: {
entity: '',
entityId: '',
show: 'edit', // edit为编辑doc为查看preview为预览
articleMenuId: '', // 菜单id
articleId: '', //文章id
tocPosition: 'none', //文章目录显示位置none为不显示目录
highlightBgColor: 'none', //点击文章目录时标题高亮背景色none为不显示高亮背景色
onMenuView: () => undefined, //查看全部菜单
onMenuViewById: (articleMenuId) => undefined, //查看指定id菜单
onArticleView: (oakId) => undefined, //查看文章
onArticlePreview: (content, title) => undefined, //预览文章
onArticleEdit: (oakId) => undefined, //编辑文章
setCopyArticleUrl: (id) => '',
origin: 'qiniu', // cos origin默认七牛云
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id
},
});