mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 00:36:07 +00:00
d5d0e1036b
* docs: add docs * ignore dumi theme test * fix: error TS2717: Subsequent property declarations must have the same type. * update docs * deploy gh-pages * plugins docs * hash & cname * exportStatic * ssr * vercel * vercel * fix: deploy vercel * Delete vercel.json * docs * fix APP_DIST * on master branch
57 lines
691 B
Markdown
57 lines
691 B
Markdown
---
|
|
title: Blocks - 区块
|
|
---
|
|
|
|
# Blocks - 区块
|
|
|
|
## 字段区块
|
|
|
|
```ts
|
|
export default {
|
|
name: 'examples',
|
|
fields: [
|
|
{
|
|
name: 'content',
|
|
interface: 'string',
|
|
type: 'string',
|
|
block: {
|
|
type: 'textarea',
|
|
},
|
|
}
|
|
],
|
|
};
|
|
```
|
|
|
|
## 数据表区块
|
|
|
|
```ts
|
|
export default {
|
|
name: 'examples',
|
|
blocks: [
|
|
{
|
|
type: 'form',
|
|
name: 'form',
|
|
title: '表单',
|
|
fields: ['col1', 'col2'],
|
|
},
|
|
],
|
|
};
|
|
```
|
|
|
|
## 后台可配置
|
|
|
|
```ts
|
|
export const form = {
|
|
title: '表单',
|
|
options: {
|
|
// form blocks 配置项默认值
|
|
},
|
|
properties: {
|
|
// 需要开放配置的字段
|
|
},
|
|
linkages: {
|
|
// 字段联动
|
|
},
|
|
};
|
|
```
|