Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: remove title level from 示例 sections in documentation #2862

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/docs/api/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ executeTransaction(fn: () => void, type: IPublicEnumTransitionType): void;
```
**@since v1.0.16**

##### 示例
**示例**
```typescript
import { common } from '@alilc/lowcode-engine';
import { IPublicEnumTransitionType } from '@alilc/lowcode-types';
Expand Down Expand Up @@ -132,7 +132,8 @@ createIntl(instance: string | object): {

**@since v1.0.17**

##### 示例
**示例**

```typescript
import { common } from '@alilc/lowcode-engine';
import enUS from './en-US.json';
Expand All @@ -156,7 +157,7 @@ i18n 转换方法
intl(data: IPublicTypeI18nData | string, params?: object): string;
```

##### 示例
**示例**
```
const title = common.utils.intl(node.title)
```
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/api/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sidebar_position: 8
*/
get(key: string, defaultValue?: any): any;
```
#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand All @@ -43,7 +43,7 @@ config.get('keyB', { a: 1 });
*/
set(key: string, value: any): void;
```
#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand All @@ -63,7 +63,7 @@ config.set('keyC', 1);
has(key: string): boolean;
```

#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand All @@ -81,7 +81,7 @@ config.has('keyD');
*/
setConfig(config: { [key: string]: any }): void;
```
#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand Down Expand Up @@ -134,7 +134,7 @@ config.getPreference().set(`${panelName}-pinned-status-isFloat`, false, 'skeleto
*/
onceGot(key: string): Promise<any>;
```
#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand All @@ -160,7 +160,7 @@ const value = await config.onceGot('keyA');
*/
onGot(key: string, fn: (data: any) => void): () => void;
```
#### 示例
**示例**
```typescript
import { config } from '@alilc/lowcode-engine';

Expand Down
22 changes: 11 additions & 11 deletions docs/docs/api/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ setAssets(assets: IPublicTypeAssetsJson): void;
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)


##### 示例
**示例**
直接在项目中引用 npm 包
```javascript
import { material } from '@alilc/lowcode-engine';
Expand Down Expand Up @@ -85,7 +85,7 @@ getAssets(): IPublicTypeAssetsJson;
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)


##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';

Expand All @@ -106,7 +106,7 @@ loadIncrementalAssets(incrementalAssets: IPublicTypeAssetsJson): Promise<void>;
```
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';
import assets1 from '@alilc/mc-assets-<siteId>/assets.json';
Expand Down Expand Up @@ -146,7 +146,7 @@ addBuiltinComponentAction(action: IPublicTypeComponentAction): void;
相关类型:[IPublicTypeComponentAction](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/component-action.ts)


##### 示例
**示例**
新增设计扩展位,并绑定事件
```typescript
import { material } from '@alilc/lowcode-engine';
Expand Down Expand Up @@ -186,7 +186,7 @@ removeBuiltinComponentAction(name: string): void;
- lock:锁定,不可编辑
- unlock:解锁,可编辑

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';

Expand Down Expand Up @@ -222,7 +222,7 @@ modifyBuiltinComponentAction(



##### 示例
**示例**
给原始的 remove 扩展时间添加执行前后的日志
```typescript
import { material } from '@alilc/lowcode-engine';
Expand Down Expand Up @@ -335,7 +335,7 @@ getComponentMeta(componentName: string): IPublicModelComponentMeta | null;
```
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';

Expand All @@ -356,7 +356,7 @@ material.getComponentMeta('Input');
```
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';

Expand Down Expand Up @@ -393,7 +393,7 @@ registerMetadataTransducer(
): void;
```

##### 示例
**示例**
给每一个组件的配置添加高级配置面板,其中有一个是否渲染配置项
```typescript
import { material } from '@alilc/lowcode-engine'
Expand Down Expand Up @@ -475,7 +475,7 @@ material.registerMetadataTransducer((transducer) => {
getRegisteredMetadataTransducers(): IPublicTypeMetadataTransducer[];
```

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine'

Expand All @@ -496,7 +496,7 @@ onChangeAssets(fn: () => void): IPublicTypeDisposable;

相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts)

##### 示例
**示例**
```typescript
import { material } from '@alilc/lowcode-engine';

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ addPropsTransducer(
- [IPublicTypePropsTransducer](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/props-transducer.ts)
- [IPublicEnumTransformStage](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/enum/transform-stage.ts)

#### 示例
**示例**
在保存的时候删除每一个组件的 props.hidden
```typescript
import { project } from '@alilc/lowcode-engine';
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api/simulatorHost.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sidebar_position: 3
*/
set(key: string, value: any): void;
```
#### 示例
**示例**
设置若干用于画布渲染的变量,比如画布大小、locale 等。

以设置画布大小为例:
Expand Down
Loading