8000 期望支持自定义公式,类似自定义过滤器 · Issue #10875 · baidu/amis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
期望支持自定义公式,类似自定义过滤器 #10875
Open
@thinkingc

Description

@thinkingc

是否关联于某个问题吗:

过滤器已经不推荐使用,推荐使用表达式,但没有办法自定义公式,还是要自定义过滤器实现。

https://baidu.github.io/amis/zh-CN/docs/concepts/expression#%E5%85%AC%E5%BC%8F

预期的解决方案:

期望支持自定义公式。比如

import { registerFunction } from 'amis'

registerFunction('CUSTOM_SUM', (a, b, fn) => { return  fn(a) + fn(b) }

{
tpl: "CUSTOM_SUM(1,2, item => item * -1)"
}

其他可接受方案:

任何附加信息:

Metadata

Metadata

Assignees

Labels

docoptimizing documentenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0