Skip to content

Commit

Permalink
build: upgrade docs deps
Browse files Browse the repository at this point in the history
  • Loading branch information
1ncounter committed Mar 22, 2024
1 parent fedbbca commit 3592356
Show file tree
Hide file tree
Showing 30 changed files with 816 additions and 744 deletions.
16 changes: 5 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### 安装

```
$ yarn
```

### 本地开发

```
$ yarn start
$ pnpm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### 构建

```
$ yarn build
$ pnpm build
```

### 部署

```bash
1. npm run build
2. npm publish # 记得改下版本号,比如 1.0.1
Expand All @@ -34,12 +27,13 @@ $ yarn build
5. lowcode-engine.cn 站点生效
```


## 功能

- [x] 支持本地离线搜索
- [x] 版本化文档管理
- [x] 离线静态部署
- [x] 主题(fork 宜搭开发者中心)

## 使用文档

https://docusaurus.io/zh-CN/docs/docs-introduction
10 changes: 5 additions & 5 deletions docs/config/navbar.js → docs/config/navbar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* 此配置的修改,如未生效,可以重新启动下即可
*/
module.exports = {
import type * as Preset from '@docusaurus/preset-classic';

const navbar: Preset.ThemeConfig['navbar'] = {
title: '',
logo: {
alt: 'LowCode-Engine',
Expand Down Expand Up @@ -63,7 +62,6 @@ module.exports = {
// position: 'right',
// dropdownActiveClassDisabled: true,
// },
// {
{
href: 'https://github.com/alibaba/lowcode-engine',
position: 'right',
Expand All @@ -82,3 +80,5 @@ module.exports = {
},
],
};

export default navbar;
27 changes: 7 additions & 20 deletions docs/config/sidebars.js → docs/config/sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const getDocsFromDir = require('../scripts/getDocsFromDir');
import getDocsFromDir from '../scripts/getDocsFromDir';

module.exports = {
// 手动配置的导航
// guide: [
// 'guide/quickStart/intro',
// 'guide/quickStart/start',
// {
// type: 'category',
// label: 'FAQ',
// collapsed: false,
// items: getDocsFromDir('guide/quickStart/faq'),
// },
// ],
const sidebars = {
/**
* 根据当前目录自动生成导航配置
*/
Expand All @@ -39,7 +22,9 @@ module.exports = {
type: 'category',
label: '扩展编辑器',
collapsed: false,
items: getDocsFromDir('guide/expand/editor', [{ dir: 'guide/expand/editor/parts', label: 'Parts·造物' }]),
items: getDocsFromDir('guide/expand/editor', [
{ dir: 'guide/expand/editor/parts', label: 'Parts·造物' },
]),
},
{
type: 'category',
Expand Down Expand Up @@ -109,3 +94,5 @@ module.exports = {
},
],
};

export default sidebars;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
community: [
{
type: 'autogenerated',
Expand Down
85 changes: 55 additions & 30 deletions docs/docs/api/commonUI.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_position: 10
> **@since** v1.3.0
## 简介

CommonUI API 是一个专为低代码引擎设计的组件 UI 库,使用它开发的插件,可以保证在不同项目和主题切换中能够保持一致性和兼容性。

## 组件列表
Expand All @@ -14,51 +15,50 @@ CommonUI API 是一个专为低代码引擎设计的组件 UI 库,使用它开

提示组件

| 参数 | 说明 | 类型 | 默认值 |
|-----------|--------------|---------------------------------------|--------|
| className | className | string (optional) | |
| children | tip 的内容 | IPublicTypeI18nData \| ReactNode | |
| direction | tip 的方向 | 'top' \| 'bottom' \| 'left' \| 'right' | |

| 参数 | 说明 | 类型 | 默认值 |
| --------- | ---------- | -------------------------------------- | ------ |
| className | className | string (optional) | |
| children | tip 的内容 | IPublicTypeI18nData \| ReactNode | |
| direction | tip 的方向 | 'top' \| 'bottom' \| 'left' \| 'right' | |

### HelpTip

带 help icon 的提示组件

| 参数 | 说明 | 类型 | 默认值 |
|-----------|--------|-----------------------------------|--------|
| help | 描述 | IPublicTypeHelpTipConfig | |
| direction | 方向 | IPublicTypeTipConfig['direction'] | 'top' |
| size | 方向 | IconProps['size'] | 'small'|
| 参数 | 说明 | 类型 | 默认值 |
| --------- | ---- | --------------------------------- | ------- |
| help | 描述 | IPublicTypeHelpTipConfig | |
| direction | 方向 | IPublicTypeTipConfig['direction'] | 'top' |
| size | 方向 | IconProps['size'] | 'small' |

### Title

标题组件

| 参数 | 说明 | 类型 | 默认值 |
|-----------|------------|-----------------------------|--------|
| title | 标题内容 | IPublicTypeTitleContent | |
| className | className | string (optional) | |
| onClick | 点击事件 | () => void (optional) | |
| 参数 | 说明 | 类型 | 默认值 |
| --------- | --------- | ----------------------- | ------ |
| title | 标题内容 | IPublicTypeTitleContent | |
| className | className | string (optional) | |
| onClick | 点击事件 | () => void (optional) | |

### ContextMenu

| 参数 | 说明 | 类型 | 默认值 |
|--------|----------------------------------------------------|------------------------------------|--------|
| menus | 定义上下文菜单的动作数组 | IPublicTypeContextMenuAction[] | |
| children | 组件的子元素 | React.ReactElement[] | |
| 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------------ | ------------------------------ | ------ |
| menus | 定义上下文菜单的动作数组 | IPublicTypeContextMenuAction[] | |
| children | 组件的子元素 | React.ReactElement[] | |

**IPublicTypeContextMenuAction Interface**

| 参数 | 说明 | 类型 | 默认值 |
|------------|--------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|----------------------------------------|
| name | 动作的唯一标识符<br/>Unique identifier for the action | string | |
| title | 显示的标题,可以是字符串或国际化数据<br/>Display title, can be a string or internationalized data | string \| IPublicTypeI18nData (optional) | |
| type | 菜单项类型<br/>Menu item type | IPublicEnumContextMenuType (optional) | IPublicEnumContextMenuType.MENU_ITEM |
| action | 点击时执行的动作,可选<br/>Action to execute on click, optional | (nodes: IPublicModelNode[]) => void (optional) | |
| items | 子菜单项或生成子节点的函数,可选,仅支持两级<br/>Sub-menu items or function to generate child node, optional | Omit<IPublicTypeContextMenuAction, 'items'>[] \| ((nodes: IPublicModelNode[]) => Omit<IPublicTypeContextMenuAction, 'items'>[]) (optional) | |
| condition | 显示条件函数<br/>Function to determine display condition | (nodes: IPublicModelNode[]) => boolean (optional) | |
| disabled | 禁用条件函数,可选<br/>Function to determine disabled condition, optional | (nodes: IPublicModelNode[]) => boolean (optional) | |
| 参数 | 说明 | 类型 | 默认值 |
| --------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------ | --- |
| name | 动作的唯一标识符<br/>Unique identifier for the action | string | |
| title | 显示的标题,可以是字符串或国际化数据 <br/> Display title, can be a string or internationalized data | string \| IPublicTypeI18nData (optional) | |
| type | 菜单项类型 <br/> Menu item type | IPublicEnumContextMenuType (optional) | IPublicEnumContextMenuType.MENU_ITEM |
| action | 点击时执行的动作,可选<br/>Action to execute on click, optional | (nodes: IPublicModelNode[]) => void (optional) | |
| items | 子菜单项或生成子节点的函数,可选,仅支持两级 <br/> Sub-menu items or function to generate child node, optional | `Omit<IPublicTypeContextMenuAction, 'items'>[] | ((nodes: IPublicModelNode[]) => Omit<IPublicTypeContextMenuAction, 'items'>[]) (optional)` | |
| condition | 显示条件函数 <br/> Function to determine display condition | (nodes: IPublicModelNode[]) => boolean (optional) | |
| disabled | 禁用条件函数,可选<br/>Function to determine disabled condition, optional | (nodes: IPublicModelNode[]) => boolean (optional) | |

**ContextMenu 示例**

Expand Down Expand Up @@ -127,84 +127,109 @@ export default App;
详细文档: [Balloon Documentation](https://fusion.design/pc/component/balloon)

### Breadcrumb

详细文档: [Breadcrumb Documentation](https://fusion.design/pc/component/breadcrumb)

### Button

详细文档: [Button Documentation](https://fusion.design/pc/component/button)

### Card

详细文档:[Card Documentation](https://fusion.design/pc/component/card)

### Checkbox

详细文档:[Checkbox Documentation](https://fusion.design/pc/component/checkbox)

### DatePicker

详细文档:[DatePicker Documentation](https://fusion.design/pc/component/datepicker)

### Dialog

详细文档:[Dialog Documentation](https://fusion.design/pc/component/dialog)

### Dropdown

详细文档:[Dropdown Documentation](https://fusion.design/pc/component/dropdown)

### Form

详细文档:[Form Documentation](https://fusion.design/pc/component/form)

### Icon

详细文档:[Icon Documentation](https://fusion.design/pc/component/icon)

引擎默认主题支持的 icon 列表:https://fusion.design/64063/component/icon?themeid=20133


### Input

详细文档:[Input Documentation](https://fusion.design/pc/component/input)

### Loading

详细文档:[Loading Documentation](https://fusion.design/pc/component/loading)

### Message

详细文档:[Message Documentation](https://fusion.design/pc/component/message)

### Overlay

详细文档:[Overlay Documentation](https://fusion.design/pc/component/overlay)

### Pagination

详细文档:[Pagination Documentation](https://fusion.design/pc/component/pagination)

### Radio

详细文档:[Radio Documentation](https://fusion.design/pc/component/radio)

### Search

详细文档:[Search Documentation](https://fusion.design/pc/component/search)

### Select

详细文档:[Select Documentation](https://fusion.design/pc/component/select)

### SplitButton

详细文档:[SplitButton Documentation](https://fusion.design/pc/component/splitbutton)

### Step

详细文档:[Step Documentation](https://fusion.design/pc/component/step)

### Switch

详细文档:[Switch Documentation](https://fusion.design/pc/component/switch)

### Tab

详细文档:[Tab Documentation](https://fusion.design/pc/component/tab)

### Table

详细文档:[Table Documentation](https://fusion.design/pc/component/table)

### Tree

详细文档:[Tree Documentation](https://fusion.design/pc/component/tree)

### TreeSelect

详细文档:[TreeSelect Documentation](https://fusion.design/pc/component/treeselect)

### Upload

详细文档:[Upload Documentation](https://fusion.design/pc/component/upload)

### Divider

详细文档:[Divider Documentation](https://fusion.design/pc/component/divider)

## 说明
Expand Down
8 changes: 5 additions & 3 deletions docs/docs/guide/appendix/setterDetails/mixed.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: MixedSetter
---

## 简介

可以让属性同时支持多个 setter

## 展示
Expand All @@ -10,6 +12,6 @@ title: MixedSetter

## 配置

| **属性名** | **类型** | **说明** |
| --- | --- | --- |
| setters | Array<String\> | SetterName |
| **属性名** | **类型** | **说明** |
| ---------- | --------------- | ---------- |
| setters | `Array<String>` | SetterName |
13 changes: 9 additions & 4 deletions docs/docs/guide/appendix/setterDetails/radioGroup.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
---
title: RadioGroupSetter
---

## 简介

用于直观的展示选择并选择。

## 展示

<img src="https://img.alicdn.com/imgextra/i2/O1CN01rId9td25yYv0my5Hd_!!6000000007595-2-tps-564-98.png" width="300"/>

## setter 配置
| 属性名 | 说明 |
| --- | --- |
| defaultValue | 默认值 |
| options | 传入的数据源,**参数格式**: [{img: 'url', value: 'text', label/title: 'text'}, ...] \| [ 'text', 'text', ...] |

| 属性名 | 说明 |
| ------------ | ------------------------------------------------------------------------------------ | ----------------------- |
| defaultValue | 默认值 |
| options | 传入的数据源,**参数格式**: `[{img: 'url', value: 'text', label/title: 'text'}, ...] | [ 'text', 'text', ...]` |

## 返回类型

String | Number | Boolean
会返回 options 中的 value 值
14 changes: 9 additions & 5 deletions docs/docs/guide/appendix/setterDetails/select.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
---
title: SelectSetter
---

## 简介

用来选择组件。在限定的可选性内进行选择,核心能力是选择

## 展示

<img src="https://img.alicdn.com/imgextra/i4/O1CN013arqCy1f1JfwdTGQo_!!6000000003946-2-tps-574-602.png" width="300"/>

## setter 配置
| 属性名 | 说明 |
| --- | --- |
| mode | 选择器模式 可选值: 'single', 'multiple', 'tag' |
| defaultValue | 默认值 |
| options | 传入的数据源,**参数格式**: [ {label/title: '文字', value: 'text'}, ...] |

| 属性名 | 说明 |
| ------------ | -------------------------------------------------------------------------- |
| mode | 选择器模式 可选值: 'single', 'multiple', 'tag' |
| defaultValue | 默认值 |
| options | 传入的数据源,**参数格式**: `[ {label/title: '文字', value: 'text'}, ...]` |

## 返回类型

Expand Down
Loading

0 comments on commit 3592356

Please sign in to comment.