Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
21 changes: 20 additions & 1 deletion docs/docs/api/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,33 @@ init(document.getElementById('engine'), {
enableCondition: false,
});
```
###

### 默认打开移动端画布
```typescript
import { init } from '@alilc/lowcode-engine';

init({
device: 'mobile',
});
```
### device 参数详细说明

引擎默认支持的 device 类型有 `default`、`mobile`、`iphonex`、`iphone6`。

插件 `@alilc/lowcode-plugin-simulator-select` 支持的 device 类型有 `default`、`phone`、`tablet`、`desktop`。

如果需要自定义的 device 类型,需要补充 device 类型对应的样式,例如 device 为 phone 时,需要补充样式如下:

```css
.lc-simulator-device-phone {
top: 16px;
bottom: 16px;
left: 50%;
width: 375px;
transform: translateX(-50%);
margin: auto;
}

```

### 使用 utils 第三方工具扩展
Expand Down