Commit bb194039 authored by 周宏民's avatar 周宏民

fix: 修改指标选择业务组件,添加可显示指标名称

parent 5e0b8a2c
......@@ -106,6 +106,7 @@ const Demo = () => {
<h3>无 user, 无“保存修改”按钮</h3>
<PandaQuotaSelect
buttonProps={{}}
showQuotaName={true}
// defaultSelect={'all'}
deviceList={deviceList}
pointType={pointType}
......
......@@ -48,6 +48,7 @@ const QuotaSelect = ({
defaultSelect,
disabledList,
isCommonTag,
showQuotaName,
}) => {
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('ec-quota-select');
......@@ -344,7 +345,7 @@ const QuotaSelect = ({
>
{buttonProps.children
? buttonProps.children
: `${item.deviceName}(${item.confList ? item.confList.length : 0})`}
: `${item.deviceName}(${item.confList ?showQuotaName?item.confList.join(','): item.confList.length : 0})`}
</Button>
))}
</div>
......@@ -505,6 +506,7 @@ QuotaSelect.defaultProps = {
defaultSelect: 'emphasis',
disabledList: [],
isCommonTag: false,
showQuotaName: false,
};
QuotaSelect.propTypes = {
......@@ -528,6 +530,7 @@ QuotaSelect.propTypes = {
defaultSelect: PropTypes.string,
disabledList: PropTypes.array,
isCommonTag: PropTypes.bool,
showQuotaName: PropTypes.bool,
};
export default QuotaSelect;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment