Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
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
Administrator
bkunyun
Commits
de0ea244
Commit
de0ea244
authored
Aug 31, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20220801' of
http://120.77.149.83/root/bkunyun
into feat-20220801
parents
0808d488
55ec68d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
Tabs.tsx
src/components/mui/Tabs.tsx
+12
-6
index.tsx
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
+2
-1
No files found.
src/components/mui/Tabs.tsx
View file @
de0ea244
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-05-31 10:18:13
* @Date: 2022-05-31 10:18:13
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-08-3
0 18:42:45
* @LastEditTime: 2022-08-3
1 20:25:56
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @FilePath: /bkunyun/src/views/Project/ProjectSetting/index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -27,6 +27,8 @@ interface ITabList {
...
@@ -27,6 +27,8 @@ interface ITabList {
}
}
interface
IProps
{
interface
IProps
{
value
?:
string
;
onChange
?:
(
val
:
string
)
=>
void
;
tabList
:
ITabList
[];
tabList
:
ITabList
[];
defaultValue
?:
string
;
defaultValue
?:
string
;
tabPanelSx
?:
any
;
tabPanelSx
?:
any
;
...
@@ -71,11 +73,14 @@ const theme = createTheme({
...
@@ -71,11 +73,14 @@ const theme = createTheme({
const
Tabs
=
(
props
:
IProps
)
=>
{
const
Tabs
=
(
props
:
IProps
)
=>
{
const
{
const
{
tabList
,
tabList
,
value
,
defaultValue
,
defaultValue
,
onChange
,
allowNullValue
=
false
,
allowNullValue
=
false
,
tabPanelSx
=
{
padding
:
"24px 0 0 0"
},
tabPanelSx
=
{
padding
:
"24px 0 0 0"
},
}
=
props
;
}
=
props
;
const
[
value
,
setValue
]
=
useState
(
const
[
tabValue
,
setTabValue
]
=
useState
(
defaultValue
defaultValue
?
defaultValue
?
defaultValue
:
allowNullValue
:
allowNullValue
...
@@ -85,8 +90,9 @@ const Tabs = (props: IProps) => {
...
@@ -85,8 +90,9 @@ const Tabs = (props: IProps) => {
const
[
hoverValue
,
setHoverValue
]
=
useState
(
''
)
const
[
hoverValue
,
setHoverValue
]
=
useState
(
''
)
const
onChange
=
(
val
:
string
)
=>
{
const
onTabChange
=
(
val
:
string
)
=>
{
setValue
(
val
);
setTabValue
(
val
)
onChange
&&
onChange
(
val
);
};
};
const
getImgSrc
=
useCallback
((
item
:
ITabList
)
=>
{
const
getImgSrc
=
useCallback
((
item
:
ITabList
)
=>
{
...
@@ -128,11 +134,11 @@ const Tabs = (props: IProps) => {
...
@@ -128,11 +134,11 @@ const Tabs = (props: IProps) => {
return
(
return
(
<
ThemeProvider
theme=
{
theme
}
>
<
ThemeProvider
theme=
{
theme
}
>
<
TabContext
value=
{
value
}
>
<
TabContext
value=
{
value
||
tabValue
}
>
<
Box
sx=
{
{
borderBottom
:
1
,
borderColor
:
"#EDEFF2"
}
}
>
<
Box
sx=
{
{
borderBottom
:
1
,
borderColor
:
"#EDEFF2"
}
}
>
<
TabList
<
TabList
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
onChange=
{
(
e
:
any
,
val
:
string
)
=>
{
onChange
(
val
);
on
Tab
Change
(
val
);
}
}
}
}
>
>
{
tabList
{
tabList
...
...
src/views/WorkFlowEdit/components/ParameterSetting/index.tsx
View file @
de0ea244
...
@@ -647,7 +647,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
...
@@ -647,7 +647,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
</
div
>
</
div
>
<
Tabs
<
Tabs
tabList=
{
paramsTabList
}
tabList=
{
paramsTabList
}
defaultValue=
{
activeParamsTab
}
value=
{
activeParamsTab
}
// defaultValue=
{
activeParamsTab
}
allowNullValue=
{
true
}
allowNullValue=
{
true
}
tabPanelSx=
{
{
padding
:
"7px 0"
}
}
tabPanelSx=
{
{
padding
:
"7px 0"
}
}
/>
/>
...
...
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