amis icon indicating copy to clipboard operation
amis copied to clipboard

数据映射怎么去处理乘法的需求

Open tangjion opened this issue 5 years ago • 2 comments

实现场景:

需要根据后端返回的数据进行乘法运算

存在的问题:

但数据映射的过滤器里面,我只看到了加法和减法,没有乘法的

当前方案:

请粘贴你当前方案的完整 amis schema 代码...

code here...

tangjion avatar Aug 03 '21 06:08 tangjion

registerFilter('times', (input: any, v: number) => {
    if (input) {
        return input * v;
    } else {
        return input;
    }

});

hiro0729 avatar Aug 05 '21 08:08 hiro0729

欢迎 PR

RickCole21 avatar Aug 26 '21 11:08 RickCole21