drip-table icon indicating copy to clipboard operation
drip-table copied to clipboard

文本组件解析value数组的形式

Open abmxb789 opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. 通过表单多选框配置数据的时候,接口返回[value]形式的时候,希望可以解析成对应的label拼接,目前只支持单个字符串解析

Describe the solution you'd like 文本组件通过配置映射关系的形式,可以自动解析出来

Describe alternatives you've considered 通过获取当前列的column,在自定义文本来去格式化数据

Additional context Add any other context or screenshots about the feature request here.

abmxb789 avatar Dec 26 '22 09:12 abmxb789

https://drip-table.jd.com/drip-table/components/text#i18n

raoenhui avatar Dec 26 '22 09:12 raoenhui

{ key: "mock_1", title: "商品名称", dataIndex: "status", component: "text", options: { mode: "single", i18n: { onSale: "售卖中" } }, },value为['onSale','finish'],想转成“售卖中,完成”

raoenhui avatar Dec 26 '22 09:12 raoenhui

通过字段数据处理即可

helloqian12138 avatar Apr 25 '24 03:04 helloqian12138