lowcode-engine icon indicating copy to clipboard operation
lowcode-engine copied to clipboard

如何在变量绑定对话框中拿到JSExpression 的运行结果

Open sundi78634 opened this issue 2 years ago • 5 comments

Describe the bug (required) / 详细描述 bug(必填)

如何在变量绑定对话框中拿到JSExpression 的运行结果? 目前的变量绑定无法直观获得表达式结果。 image


To Reproduce (required) / 如何复现 bug?(必填,非常重要)

Steps to reproduce the behavior: / 详细复现步骤:

image

  1. 点击变量绑定

Expected behavior (required) / 预期行为(必填,非常重要)

期望在VariableBindDialog插件中获取Js 表达式的运行结果,直观的展示出来。 目前VariableBindDialog中获取的field value是一个对象,无法获取运行后的结果。 { mock: "some mock data", type: "JSExpression", value: "this.state.text ?? 123123123" }


环境信息

  • 引擎版本 1.0.8
  • ext 版本 1.0.3
  • 物料
    • moment﹫2.24.0
    • lodash
    • iconfont-icons
    • ﹫ant-design/icons﹫4.7.0
    • antd﹫4.19.5
    • ﹫alifd/next﹫1.23.0
    • ﹫alilc/lowcode-materials﹫1.0.3

sundi78634 avatar Jun 21 '22 08:06 sundi78634

可以尝试一下:

1,通过 API 找到 node,https://www.yuque.com/lce/doc/dcrbff

  1. node.exportSchema('render') 找到对应的 props。

liujuping avatar Jun 21 '22 08:06 liujuping

@liujuping 测试了一下获取到的还是filed value。exportSchema参数的其他几个TransformStage枚举都是一样的结果。

image

sundi78634 avatar Jun 21 '22 08:06 sundi78634

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] avatar Jul 02 '22 02:07 github-actions[bot]

朋友,你这个问题解决了嘛?

anpmd avatar Dec 21 '22 07:12 anpmd

@sundi78634

anpmd avatar Dec 21 '22 07:12 anpmd