Merge pull request #10250 from 2betop/feat-list-select

feat: list-select 支持 label 用变量 Close: #9807
This commit is contained in:
hsm-lv 2024-05-17 10:54:50 +08:00 committed by GitHub
commit 5bc5ff079e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,8 @@ import {
OptionsControlProps,
Option,
FormOptionsControl,
getVariable
getVariable,
filter
} from 'amis-core';
import {ActionObject, Schema} from 'amis-core';
import {createObject, isEmpty} from 'amis-core';
@ -236,7 +237,7 @@ export default class ListControl extends React.Component<ListProps, any> {
) : null,
option[labelField || 'label'] ? (
<div key="label" className={cx('ListControl-itemLabel')}>
{String(option[labelField || 'label'])}
{filter(String(option[labelField || 'label']), data)}
</div>
) : null
// {/* {option.tip ? (<div className={`${ns}ListControl-tip`}>{option.tip}</div>) : null} */}