Skip to content

Commit

Permalink
add: C7NRecord 引用规范
Browse files Browse the repository at this point in the history
  • Loading branch information
hzm0321 committed Jun 7, 2023
1 parent e1a5b1b commit 203aa7e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
9 changes: 9 additions & 0 deletions blog/2023-05-06-er/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
slug: ER
title: 基于 antv/x6 实现 ER 图
authors: [hzm]
tags: [antv/x6, er]
---

## 三类空间

17 changes: 16 additions & 1 deletion docs/8.c7n/8.1.DataSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const demoDS = (): DataSetProps => ({
如果一个文件同时导入的 `2个`以上的 `DS`,应当使用别名的方式,如 `import { FN as DemoFN } from './demoDS';`
,命名规范遵循帕斯卡命名法。单文件同时存在 2个以上文件内 `DS`,命名方式同理。

### 8.1.4. events 配置
### 8.1.3. events 配置

`DS` 添加 `event` 主要有 3 种方式:

Expand All @@ -89,4 +89,19 @@ const demoDS = (): DataSetProps => ({
</div>
</details>

### 8.1.4. Record 类型引入规范
<intro type="should" />

record 是 DataSet 数据源中存储的记录。类型定义在 `choerodon-ui/pro/lib/data-set/Record` 中。
由于 TS 默认工具函数中存在 `Record` 工具函数,为了避免两者理解上冲突,因此在使用时应当使用 `C7NRecord` 来引入。

```ts
// This will error
import Record from 'choerodon-ui/pro/lib/data-set/Record';

// This will right
import C7NRecord from 'choerodon-ui/pro/lib/data-set/Record';
```


<maintainer authors={["hzm"]}/>
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const config = {
alt: '汉得中台 aPaaS 前端团队', src: 'img/logo.svg',
}, items: [{
type: 'doc', docId: 'developStyle', position: 'left', label: '项目开发规范',
}, { href: 'https://beta.reactjs.org/', label: 'React Docs(BETA)', position: 'left' }, {
}, { href: 'https://react.dev/', label: 'React Docs', position: 'left' }, {
to: '/empty',
label: 'react-vision',
position: 'left'
Expand Down

0 comments on commit 203aa7e

Please sign in to comment.