GeezerVison is showing github.com — docs: remove title level from 示例 sections in documentation · Devancn/lowcode-engine@9b19d8f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/common.md +4-3Lines changed: 4 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -82,7 +82,7 @@ executeTransaction(fn: () => void, type: IPublicEnumTransitionType): void; | 82 | 82 | ``` | 83 | 83 | **@since v1.0.16** | 84 | 84 |
| 85 | | -##### 示例 | | 85 | +**示例** | 86 | 86 | ```typescript | 87 | 87 | import { common } from '@alilc/lowcode-engine'; | 88 | 88 | import { IPublicEnumTransitionType } from '@alilc/lowcode-types'; | @@ -132,7 +132,8 @@ createIntl(instance: string | object): { | 132 | 132 |
| 133 | 133 | **@since v1.0.17** | 134 | 134 |
| 135 | | -##### 示例 | | 135 | +**示例** | | 136 | + | 136 | 137 | ```typescript | 137 | 138 | import { common } from '@alilc/lowcode-engine'; | 138 | 139 | import enUS from './en-US.json'; | @@ -156,7 +157,7 @@ i18n 转换方法 | 156 | 157 | intl(data: IPublicTypeI18nData | string, params?: object): string; | 157 | 158 | ``` | 158 | 159 |
| 159 | | -##### 示例 | | 160 | +**示例** | 160 | 161 | ``` | 161 | 162 | const title = common.utils.intl(node.title) | 162 | 163 | ``` | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/config.md +6-6Lines changed: 6 additions & 6 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -24,7 +24,7 @@ sidebar_position: 8 | 24 | 24 | */ | 25 | 25 | get(key: string, defaultValue?: any): any; | 26 | 26 | ``` | 27 | | -#### 示例 | | 27 | +**示例** | 28 | 28 | ```typescript | 29 | 29 | import { config } from '@alilc/lowcode-engine'; | 30 | 30 |
| @@ -43,7 +43,7 @@ config.get('keyB', { a: 1 }); | 43 | 43 | */ | 44 | 44 | set(key: string, value: any): void; | 45 | 45 | ``` | 46 | | -#### 示例 | | 46 | +**示例** | 47 | 47 | ```typescript | 48 | 48 | import { config } from '@alilc/lowcode-engine'; | 49 | 49 |
| @@ -63,7 +63,7 @@ config.set('keyC', 1); | 63 | 63 | has(key: string): boolean; | 64 | 64 | ``` | 65 | 65 |
| 66 | | -#### 示例 | | 66 | +**示例** | 67 | 67 | ```typescript | 68 | 68 | import { config } from '@alilc/lowcode-engine'; | 69 | 69 |
| @@ -81,7 +81,7 @@ config.has('keyD'); | 81 | 81 | */ | 82 | 82 | setConfig(config: { [key: string]: any }): void; | 83 | 83 | ``` | 84 | | -#### 示例 | | 84 | +**示例** | 85 | 85 | ```typescript | 86 | 86 | import { config } from '@alilc/lowcode-engine'; | 87 | 87 |
| @@ -134,7 +134,7 @@ config.getPreference().set(`${panelName}-pinned-status-isFloat`, false, 'skeleto | 134 | 134 | */ | 135 | 135 | onceGot(key: string): Promise<any>; | 136 | 136 | ``` | 137 | | -#### 示例 | | 137 | +**示例** | 138 | 138 | ```typescript | 139 | 139 | import { config } from '@alilc/lowcode-engine'; | 140 | 140 |
| @@ -160,7 +160,7 @@ const value = await config.onceGot('keyA'); | 160 | 160 | */ | 161 | 161 | onGot(key: string, fn: (data: any) => void): () => void; | 162 | 162 | ``` | 163 | | -#### 示例 | | 163 | +**示例** | 164 | 164 | ```typescript | 165 | 165 | import { config } from '@alilc/lowcode-engine'; | 166 | 166 |
| |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/material.md +11-11Lines changed: 11 additions & 11 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -39,7 +39,7 @@ setAssets(assets: IPublicTypeAssetsJson): void; | 39 | 39 | 相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts) | 40 | 40 |
| 41 | 41 |
| 42 | | -##### 示例 | | 42 | +**示例** | 43 | 43 | 直接在项目中引用 npm 包 | 44 | 44 | ```javascript | 45 | 45 | import { material } from '@alilc/lowcode-engine'; | @@ -85,7 +85,7 @@ getAssets(): IPublicTypeAssetsJson; | 85 | 85 | 相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts) | 86 | 86 |
| 87 | 87 |
| 88 | | -##### 示例 | | 88 | +**示例** | 89 | 89 | ```typescript | 90 | 90 | import { material } from '@alilc/lowcode-engine'; | 91 | 91 |
| @@ -106,7 +106,7 @@ loadIncrementalAssets(incrementalAssets: IPublicTypeAssetsJson): Promise<void>; | 106 | 106 | ``` | 107 | 107 | 相关类型:[IPublicTypeAssetsJson](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/assets-json.ts) | 108 | 108 |
| 109 | | -##### 示例 | | 109 | +**示例** | 110 | 110 | ```typescript | 111 | 111 | import { material } from '@alilc/lowcode-engine'; | 112 | 112 | import assets1 from '@alilc/mc-assets-<siteId>/assets.json'; | @@ -146,7 +146,7 @@ addBuiltinComponentAction(action: IPublicTypeComponentAction): void; | 146 | 146 | 相关类型:[IPublicTypeComponentAction](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/component-action.ts) | 147 | 147 |
| 148 | 148 |
| 149 | | -##### 示例 | | 149 | +**示例** | 150 | 150 | 新增设计扩展位,并绑定事件 | 151 | 151 | ```typescript | 152 | 152 | import { material } from '@alilc/lowcode-engine'; | @@ -186,7 +186,7 @@ removeBuiltinComponentAction(name: string): void; | 186 | 186 | - lock:锁定,不可编辑 | 187 | 187 | - unlock:解锁,可编辑 | 188 | 188 |
| 189 | | -##### 示例 | | 189 | +**示例** | 190 | 190 | ```typescript | 191 | 191 | import { material } from '@alilc/lowcode-engine'; | 192 | 192 |
| @@ -222,7 +222,7 @@ modifyBuiltinComponentAction( | 222 | 222 |
| 223 | 223 |
| 224 | 224 |
| 225 | | -##### 示例 | | 225 | +**示例** | 226 | 226 | 给原始的 remove 扩展时间添加执行前后的日志 | 227 | 227 | ```typescript | 228 | 228 | import { material } from '@alilc/lowcode-engine'; | @@ -335,7 +335,7 @@ getComponentMeta(componentName: string): IPublicModelComponentMeta | null; | 335 | 335 | ``` | 336 | 336 | 相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts) | 337 | 337 |
| 338 | | -##### 示例 | | 338 | +**示例** | 339 | 339 | ```typescript | 340 | 340 | import { material } from '@alilc/lowcode-engine'; | 341 | 341 |
| @@ -356,7 +356,7 @@ material.getComponentMeta('Input'); | 356 | 356 | ``` | 357 | 357 | 相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts) | 358 | 358 |
| 359 | | -##### 示例 | | 359 | +**示例** | 360 | 360 | ```typescript | 361 | 361 | import { material } from '@alilc/lowcode-engine'; | 362 | 362 |
| @@ -393,7 +393,7 @@ registerMetadataTransducer( | 393 | 393 | ): void; | 394 | 394 | ``` | 395 | 395 |
| 396 | | -##### 示例 | | 396 | +**示例** | 397 | 397 | 给每一个组件的配置添加高级配置面板,其中有一个是否渲染配置项 | 398 | 398 | ```typescript | 399 | 399 | import { material } from '@alilc/lowcode-engine' | @@ -475,7 +475,7 @@ material.registerMetadataTransducer((transducer) => { | 475 | 475 | getRegisteredMetadataTransducers(): IPublicTypeMetadataTransducer[]; | 476 | 476 | ``` | 477 | 477 |
| 478 | | -##### 示例 | | 478 | +**示例** | 479 | 479 | ```typescript | 480 | 480 | import { material } from '@alilc/lowcode-engine' | 481 | 481 |
| @@ -496,7 +496,7 @@ onChangeAssets(fn: () => void): IPublicTypeDisposable; | 496 | 496 |
| 497 | 497 | 相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts) | 498 | 498 |
| 499 | | -##### 示例 | | 499 | +**示例** | 500 | 500 | ```typescript | 501 | 501 | import { material } from '@alilc/lowcode-engine'; | 502 | 502 |
| |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/project.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -201,7 +201,7 @@ addPropsTransducer( | 201 | 201 | - [IPublicTypePropsTransducer](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/props-transducer.ts) | 202 | 202 | - [IPublicEnumTransformStage](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/enum/transform-stage.ts) | 203 | 203 |
| 204 | | -#### 示例 | | 204 | +**示例** | 205 | 205 | 在保存的时候删除每一个组件的 props.hidden | 206 | 206 | ```typescript | 207 | 207 | import { project } from '@alilc/lowcode-engine'; | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/simulatorHost.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,7 +20,7 @@ sidebar_position: 3 | 20 | 20 | */ | 21 | 21 | set(key: string, value: any): void; | 22 | 22 | ``` | 23 | | -#### 示例 | | 23 | +**示例** | 24 | 24 | 设置若干用于画布渲染的变量,比如画布大小、locale 等。 | 25 | 25 |
| 26 | 26 | 以设置画布大小为例: | |
|