Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
wisdom-components
Commits
bb194039
Commit
bb194039
authored
Aug 18, 2023
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改指标选择业务组件,添加可显示指标名称
parent
5e0b8a2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Basic.tsx
...ages/extend-components/EC_QuotaSelect/src/demos/Basic.tsx
+1
-0
index.js
packages/extend-components/EC_QuotaSelect/src/index.js
+4
-1
No files found.
packages/extend-components/EC_QuotaSelect/src/demos/Basic.tsx
View file @
bb194039
...
@@ -106,6 +106,7 @@ const Demo = () => {
...
@@ -106,6 +106,7 @@ const Demo = () => {
<
h3
>
无 user, 无“保存修改”按钮
</
h3
>
<
h3
>
无 user, 无“保存修改”按钮
</
h3
>
<
PandaQuotaSelect
<
PandaQuotaSelect
buttonProps=
{
{}
}
buttonProps=
{
{}
}
showQuotaName=
{
true
}
// defaultSelect={'all'}
// defaultSelect={'all'}
deviceList=
{
deviceList
}
deviceList=
{
deviceList
}
pointType=
{
pointType
}
pointType=
{
pointType
}
...
...
packages/extend-components/EC_QuotaSelect/src/index.js
View file @
bb194039
...
@@ -48,6 +48,7 @@ const QuotaSelect = ({
...
@@ -48,6 +48,7 @@ const QuotaSelect = ({
defaultSelect
,
defaultSelect
,
disabledList
,
disabledList
,
isCommonTag
,
isCommonTag
,
showQuotaName
,
})
=>
{
})
=>
{
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
{
getPrefixCls
}
=
useContext
(
ConfigProvider
.
ConfigContext
);
const
prefixCls
=
getPrefixCls
(
'ec-quota-select'
);
const
prefixCls
=
getPrefixCls
(
'ec-quota-select'
);
...
@@ -344,7 +345,7 @@ const QuotaSelect = ({
...
@@ -344,7 +345,7 @@ const QuotaSelect = ({
>
>
{
buttonProps
.
children
{
buttonProps
.
children
?
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
>
<
/Button
>
))}
))}
<
/div
>
<
/div
>
...
@@ -505,6 +506,7 @@ QuotaSelect.defaultProps = {
...
@@ -505,6 +506,7 @@ QuotaSelect.defaultProps = {
defaultSelect
:
'emphasis'
,
defaultSelect
:
'emphasis'
,
disabledList
:
[],
disabledList
:
[],
isCommonTag
:
false
,
isCommonTag
:
false
,
showQuotaName
:
false
,
};
};
QuotaSelect
.
propTypes
=
{
QuotaSelect
.
propTypes
=
{
...
@@ -528,6 +530,7 @@ QuotaSelect.propTypes = {
...
@@ -528,6 +530,7 @@ QuotaSelect.propTypes = {
defaultSelect
:
PropTypes
.
string
,
defaultSelect
:
PropTypes
.
string
,
disabledList
:
PropTypes
.
array
,
disabledList
:
PropTypes
.
array
,
isCommonTag
:
PropTypes
.
bool
,
isCommonTag
:
PropTypes
.
bool
,
showQuotaName
:
PropTypes
.
bool
,
};
};
export
default
QuotaSelect
;
export
default
QuotaSelect
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment