Skip to content

Commit

Permalink
📝 docs: 补充文档
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 6, 2021
1 parent fa87278 commit 2c0ea22
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/components/biz/examples/Mindflow/Demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (process.env.NODE_ENV !== 'production') {
const { Group } = Radio;

const MindflowDemo = () => {
const [type, setType] = useState<'demo' | 'museum'>('demo');
const [type, setType] = useState<'demo' | 'museum' | 'thinking'>('thinking');

return (
<div>
Expand All @@ -27,6 +27,7 @@ const MindflowDemo = () => {
>
<Radio value={'demo'}>demo</Radio>
<Radio value={'museum'}>博物馆案例</Radio>
<Radio value={'thinking'}>思考案例</Radio>
</Group>
</div>
<Mindflow data={datasource[type]} height={600} />
Expand Down
63 changes: 63 additions & 0 deletions docs/components/biz/examples/Mindflow/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,69 @@ export const demo: MindflowData = {
],
};

export const thinking: MindflowData = {
nodes: [
{
id: '1',
data: {
type: 'question',
title: '如何设计 Mindflow',
},
},
{
id: '2',
data: {
type: 'information',
title:
'https://www.yuque.com/arvinxx/tu0agc/583fa27a-05f6-410f-84a8-304500513d84',
infoType: 'url',
},
},
{
id: '3',
data: {
type: 'information',
title:
'https://gw.alipayobjects.com/zos/antfincdn/w%26UFkCsvSt/7d30e63e-607c-4889-810e-664d8c8ccb08.png',
infoType: 'image',
},
},
{
id: '4',
data: {
type: 'idea',
title: '信息节点的展开与折叠',
description: '发散与收敛交互',
},
},
{
id: '5',
data: {
type: 'idea',
title: '在边上展示依据',
},
},
],
edges: [
{
source: '1',
target: '2',
},
{
source: '1',
target: '3',
},
{
source: '2',
target: '5',
},
{
source: '3',
target: '4',
},
],
};

export const museum: MindflowData = {
nodes: [
{
Expand Down

0 comments on commit 2c0ea22

Please sign in to comment.