alibaba / alibaba/lowcode-engine

如何实现切换设备展示不同物料及对应设置器

Open
#2,456 0 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/alibaba/lowcode-engine/assets/22340685/fba60280-ca79-4542-a23b-779ea367ca90)

希望在切换设备的时候,展示不同的物料,pc 或 mobile。目前可以做到监听设备的变化,schema 切换成对应端的组件。
但是 props 该怎么办呢?目前是按下面方式设计的,有公共的 props 和某一个端单独的 props,目前有以下两个问题

对于 mobileProps 和 pcProps 里的配置项
- 如何渲染?
- 设置器该如何设置?
```json
{
"componentName": "Input",
"id": "node_ocll4vogf12",
"props": {
"xtitle": "输入",
"xname": "input1",
"xrequired": true,
"mobileProps": {
"clearable": true
},
"pcProps": {
"bordered": true
}
},
"hidden": false,
"title": "",
"isLocked": false,
"condition": true,
"conditionGroup": ""
},
```

也可以给一些其他思路,如何实现物料随设备切换而切换?两端的物料有相同的 props 以及不同的 props,切换设备的时候希望

- 物料切换
- 相同的 props 同步修改
- 不同的 props 可以各自单独配置

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named in the issue. Start by locating the device-switching, schema, material, and setter flows in the repository, then clarify the data model and scope with maintainers; done means mobile and PC materials switch correctly, shared props stay synchronized, and per-device props can be configured independently.

Written by the indexing model from the issue text.

Assessment

Domain
design, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.