mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
docs: remove title level from 示例 sections in documentation
This commit is contained in:
parent
4025a7d2e0
commit
9b19d8f889
@ -82,7 +82,7 @@ executeTransaction(fn: () => void, type: IPublicEnumTransitionType): void;
|
|||||||
```
|
```
|
||||||
**@since v1.0.16**
|
**@since v1.0.16**
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { common } from '@alilc/lowcode-engine';
|
import { common } from '@alilc/lowcode-engine';
|
||||||
import { IPublicEnumTransitionType } from '@alilc/lowcode-types';
|
import { IPublicEnumTransitionType } from '@alilc/lowcode-types';
|
||||||
@ -132,7 +132,8 @@ createIntl(instance: string | object): {
|
|||||||
|
|
||||||
**@since v1.0.17**
|
**@since v1.0.17**
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { common } from '@alilc/lowcode-engine';
|
import { common } from '@alilc/lowcode-engine';
|
||||||
import enUS from './en-US.json';
|
import enUS from './en-US.json';
|
||||||
@ -156,7 +157,7 @@ i18n 转换方法
|
|||||||
intl(data: IPublicTypeI18nData | string, params?: object): string;
|
intl(data: IPublicTypeI18nData | string, params?: object): string;
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```
|
```
|
||||||
const title = common.utils.intl(node.title)
|
const title = common.utils.intl(node.title)
|
||||||
```
|
```
|
||||||
|
|||||||
@ -24,7 +24,7 @@ sidebar_position: 8
|
|||||||
*/
|
*/
|
||||||
get(key: string, defaultValue?: any): any;
|
get(key: string, defaultValue?: any): any;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ config.get('keyB', { a: 1 });
|
|||||||
*/
|
*/
|
||||||
set(key: string, value: any): void;
|
set(key: string, value: any): void;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ config.set('keyC', 1);
|
|||||||
has(key: string): boolean;
|
has(key: string): boolean;
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ config.has('keyD');
|
|||||||
*/
|
*/
|
||||||
setConfig(config: { [key: string]: any }): void;
|
setConfig(config: { [key: string]: any }): void;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ config.getPreference().set(`${panelName}-pinned-status-isFloat`, false, 'skeleto
|
|||||||
*/
|
*/
|
||||||
onceGot(key: string): Promise<any>;
|
onceGot(key: string): Promise<any>;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ const value = await config.onceGot('keyA');
|
|||||||
*/
|
*/
|
||||||
onGot(key: string, fn: (data: any) => void): () => void;
|
onGot(key: string, fn: (data: any) => void): () => void;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { config } from '@alilc/lowcode-engine';
|
import { config } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)
|
||||||
|
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
直接在项目中引用 npm 包
|
直接在项目中引用 npm 包
|
||||||
```javascript
|
```javascript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
@ -85,7 +85,7 @@ getAssets(): IPublicTypeAssetsJson;
|
|||||||
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)
|
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)
|
||||||
|
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -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)
|
相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts)
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
import assets1 from '@alilc/mc-assets-<siteId>/assets.json';
|
import assets1 from '@alilc/mc-assets-<siteId>/assets.json';
|
||||||
@ -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)
|
相关类型:[IPublicTypeComponentAction](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/component-action.ts)
|
||||||
|
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
新增设计扩展位,并绑定事件
|
新增设计扩展位,并绑定事件
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
@ -186,7 +186,7 @@ removeBuiltinComponentAction(name: string): void;
|
|||||||
- lock:锁定,不可编辑
|
- lock:锁定,不可编辑
|
||||||
- unlock:解锁,可编辑
|
- unlock:解锁,可编辑
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ modifyBuiltinComponentAction(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
给原始的 remove 扩展时间添加执行前后的日志
|
给原始的 remove 扩展时间添加执行前后的日志
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
@ -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)
|
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ material.getComponentMeta('Input');
|
|||||||
```
|
```
|
||||||
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)
|
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
@ -393,7 +393,7 @@ registerMetadataTransducer(
|
|||||||
): void;
|
): void;
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
给每一个组件的配置添加高级配置面板,其中有一个是否渲染配置项
|
给每一个组件的配置添加高级配置面板,其中有一个是否渲染配置项
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine'
|
import { material } from '@alilc/lowcode-engine'
|
||||||
@ -475,7 +475,7 @@ material.registerMetadataTransducer((transducer) => {
|
|||||||
getRegisteredMetadataTransducers(): IPublicTypeMetadataTransducer[];
|
getRegisteredMetadataTransducers(): IPublicTypeMetadataTransducer[];
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine'
|
import { material } from '@alilc/lowcode-engine'
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ onChangeAssets(fn: () => void): IPublicTypeDisposable;
|
|||||||
|
|
||||||
相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts)
|
相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts)
|
||||||
|
|
||||||
##### 示例
|
**示例**
|
||||||
```typescript
|
```typescript
|
||||||
import { material } from '@alilc/lowcode-engine';
|
import { material } from '@alilc/lowcode-engine';
|
||||||
|
|
||||||
|
|||||||
@ -201,7 +201,7 @@ addPropsTransducer(
|
|||||||
- [IPublicTypePropsTransducer](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/props-transducer.ts)
|
- [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)
|
- [IPublicEnumTransformStage](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/enum/transform-stage.ts)
|
||||||
|
|
||||||
#### 示例
|
**示例**
|
||||||
在保存的时候删除每一个组件的 props.hidden
|
在保存的时候删除每一个组件的 props.hidden
|
||||||
```typescript
|
```typescript
|
||||||
import { project } from '@alilc/lowcode-engine';
|
import { project } from '@alilc/lowcode-engine';
|
||||||
|
|||||||
@ -20,7 +20,7 @@ sidebar_position: 3
|
|||||||
*/
|
*/
|
||||||
set(key: string, value: any): void;
|
set(key: string, value: any): void;
|
||||||
```
|
```
|
||||||
#### 示例
|
**示例**
|
||||||
设置若干用于画布渲染的变量,比如画布大小、locale 等。
|
设置若干用于画布渲染的变量,比如画布大小、locale 等。
|
||||||
|
|
||||||
以设置画布大小为例:
|
以设置画布大小为例:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user