baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
16.51k stars 2.41k forks source link

dynamic input-range #10144

Closed SergShulga closed 1 month ago

SergShulga commented 2 months ago

Input-range is a nice element, but has static min\max values.

This notation is unacceptable

amis_filter_item = {
            "type": "input-range", "multiple": True, "size": "lg",
            "min": "${xxx}", "max": "${xxx}", "step": "${xxx}"
        }

How can I set them dynamically from the database? Is there no way to use source or initApi?

This element is used in my filter on ModelAdmin representation (fastapi-amis-admin), and I want to set limits depending on the target data.

it`s real?

allenve commented 1 month ago

it's supports variables after version 3.3.0 see https://aisuda.bce.baidu.com/amis/zh-CN/components/form/input-range#%E5%B1%9E%E6%80%A7%E8%A1%A8