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

请问能否动态的改变组件属性下面的setter的props里面的某个属性?

Open yz1311 opened this issue 3 years ago • 2 comments

详细描述 bug(必填)

通过field属性能否改变另外一个属性下面的setter的props里面的某个属性?

另外在自定义组件的meta文件中,setter的props的属性能否加入条件判断?

如何复现 bug?(必填,非常重要)

预期行为(必填,非常重要)

bug 截图(可选)

Environments (please complete the following information) (required): / 请提供如下信息(必填)

  • AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本
  • AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
  • Browser [e.g. chrome, safari] / 浏览器版本
  • materials / plugins / tools / 其他物料 / 插件 / 工具链版本

(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)

Additional context (optional) / 更多额外信息(可选)

Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

yz1311 avatar Aug 30 '22 12:08 yz1311

image

luotongxin1998 avatar Dec 09 '22 12:12 luotongxin1998

image

试试 setter 的 DynamicProps

{
  name: 'propA',
  title: '属性A',
  setter: {
    componentName: 'NumberSetter',
    props: (target: SettingTarget) => {
      // 根据需要构造 setter 的 props 返回即可
      const setterProps = {};
      return setterProps;
    },
  },
}

DiligentNezha avatar Jan 10 '23 06:01 DiligentNezha