didi / epage

一款基于schema的低代码可视化页面配置工具
http://epage.didichuxing.com
MIT License
460 stars 94 forks source link

需求: 设计器最好能够支持拖拽的方式添加widget等 #7

Open wqr2016 opened 4 years ago

wqr2016 commented 4 years ago

Describe the bug A clear and concise description of what the bug is. 背景: 1) 现在设计器只支持点击的方式添加widget,操作成本有点高。 2) 预览时无法看到后面store里面的数据情况 需求: 1) 设计器增加拖拽的方式添加widget 2) 预览时,能够有地方看到后面store里面的数据情况,最好是json方式展示一下,比如在schema后面增加”页面数据“这个tab。

备注: 友情提醒一下:留的微信群二维码已经过期,无法使用。 ^-^.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

tt-ghost commented 4 years ago

@wqr2016

另外,一般在用户填写表单的时候实时看form data场景更多些,即new Render()

二维码以为会一直有效呢😂,我更新下~

wqr2016 commented 4 years ago

@wqr2016

  • 第1个问题,因为设计器和渲染是独立设计(为了更好支持不同组件库渲染),设计器中设计及预览视图下的面板其实跟外层是独立的,暂时应该不会有拖动添加这种操作
  • 第2个问题,不知道你说的是不是预览视图中填写表单的值,如果是的话有,原因主要有以下几个:

    • epage不是单纯表单设计器,后续会增加更多展示类组件,表单值占用一个主tab并不一定合适
    • 另外设计表单的场景只有在预览视图才能填写表单,这时查看form data才有意义,所以看form data放在预览视图下更合适 如果希望在设计表单的时候就想看实时的form data,可以自行实现一个按钮或展示区,通过epage.store.getFormData()(这个方法文档上暂时未更新)获取填写的表单

另外,一般在用户填写表单的时候实时看form data场景更多些,即new Render()

二维码以为会一直有效呢😂,我更新下~

感谢及时回复: 第2个问题,确实是预留视图中填写表单的值,formData放在预览图下面是最合适的。

另外formData里面的json格式没有对应的文档,不清楚读取widget值的规则。 这规则会影响到后续扩展widget时,哪些widget只是对外展示用而不用来取值,哪些widget是用来读取值。