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

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

Open
Chrisyjs opened this issue Sep 7, 2023 · 0 comments
Open

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

Chrisyjs opened this issue Sep 7, 2023 · 0 comments
Labels
discussion Discussion / 方案探讨

Comments

@Chrisyjs
Copy link

Chrisyjs commented Sep 7, 2023

image

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

对于 mobileProps 和 pcProps 里的配置项

  • 如何渲染?
  • 设置器该如何设置?
        {
          "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 可以各自单独配置
@JackLian JackLian added the discussion Discussion / 方案探讨 label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion / 方案探讨
Projects
None yet
Development

No branches or pull requests

2 participants