Skip to content

Commit d7bc3b0

Browse files
author
fanyang
committed
docs: 快速上手页优化 & API页方法分类 & 修复sites启动运行warning & 修复API页中英切换左侧nav不一致问题
1 parent af3bdc5 commit d7bc3b0

File tree

17 files changed

+3966
-2089
lines changed

17 files changed

+3966
-2089
lines changed

examples/demo.html

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,50 @@
1212
<link rel="stylesheet" href="../packages/core/dist/index.css" />
1313
</head>
1414
<body>
15+
<!-- 创建容器 -->
1516
<div id="container"></div>
1617
<script src="../packages/core/dist/index.min.js"></script>
1718
<script src="../packages/extension/dist/index.min.js"></script>
1819
<script>
20+
// 准备图数据
21+
const data = {
22+
// 节点
23+
nodes: [
24+
{
25+
id: '21',
26+
type: 'rect',
27+
x: 100,
28+
y: 200,
29+
text: 'rect node',
30+
},
31+
{
32+
id: '50',
33+
type: 'circle',
34+
x: 300,
35+
y: 400,
36+
text: 'circle node',
37+
},
38+
],
39+
// 边
40+
edges: [
41+
{
42+
type: 'polyline',
43+
sourceNodeId: '50',
44+
targetNodeId: '21',
45+
},
46+
],
47+
}
48+
49+
// 创建实例
1950
const lf = new Core.default({
2051
container: document.querySelector('#container'),
52+
width: 700,
53+
height: 500,
54+
grid: true,
2155
})
22-
lf.render({})
56+
57+
// 渲染实例
58+
lf.render(data)
2359

2460
console.log('Core --->>>', Core)
2561
console.log('Extension --->>>', Extension)

pnpm-lock.yaml

Lines changed: 2444 additions & 701 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sites/docs/docs/api/detail/constructor.en-US.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: constructor
3+
toc: content
4+
order: 0
5+
---
16
> All node instance operations on the flowchart, as well as events and behavior listening, are performed on the `LogicFlow` instance.
27
38
## configure

sites/docs/docs/api/detail/constructor.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: constructor
3+
toc: content
4+
order: 0
5+
---
16
> 流程图上所有的节点实例操作以及事件,行为监听都在 `LogicFlow` 实例上进行。
27
38
## 配置

0 commit comments

Comments
 (0)