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
aefe0d95
Commit
aefe0d95
authored
Oct 10, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 工作台增加无项目判断
parent
7f82c667
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
23 deletions
+29
-23
index.tsx
src/views/Project/ProjectWorkbench/index.tsx
+29
-23
No files found.
src/views/Project/ProjectWorkbench/index.tsx
View file @
aefe0d95
...
@@ -10,11 +10,13 @@ import { memo, useMemo } from "react";
...
@@ -10,11 +10,13 @@ import { memo, useMemo } from "react";
import
{
Box
}
from
"@mui/system"
;
import
{
Box
}
from
"@mui/system"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
{
useStores
}
from
"@/store/index"
;
import
WorkbenchTemplate
from
"./workbenchTemplate"
;
import
WorkbenchTemplate
from
"./workbenchTemplate"
;
import
WorkbenchList
from
"./workbenchList"
;
import
WorkbenchList
from
"./workbenchList"
;
import
Tabs
from
"@/components/mui/Tabs"
;
import
Tabs
from
"@/components/mui/Tabs"
;
import
usePass
from
"@/hooks/usePass"
;
import
usePass
from
"@/hooks/usePass"
;
import
NoProject
from
"@/components/BusinessComponents/NoProject"
;
import
Template
from
"@/assets/project/workbenchTemplate.svg"
;
import
Template
from
"@/assets/project/workbenchTemplate.svg"
;
import
TemplateSelect
from
"@/assets/project/workbenchTemplate_select.svg"
;
import
TemplateSelect
from
"@/assets/project/workbenchTemplate_select.svg"
;
import
TemplateHover
from
"@/assets/project/workbenchTemplate_hover.svg"
;
import
TemplateHover
from
"@/assets/project/workbenchTemplate_hover.svg"
;
...
@@ -23,6 +25,7 @@ import ListHover from "@/assets/project/workbenchList_hover.svg";
...
@@ -23,6 +25,7 @@ import ListHover from "@/assets/project/workbenchList_hover.svg";
import
ListSelect
from
"@/assets/project/workbenchList_select.svg"
;
import
ListSelect
from
"@/assets/project/workbenchList_select.svg"
;
const
ProjectWorkbench
=
observer
(()
=>
{
const
ProjectWorkbench
=
observer
(()
=>
{
const
{
currentProjectStore
}
=
useStores
();
const
isPass
=
usePass
();
const
isPass
=
usePass
();
const
location
:
any
=
useLocation
();
const
location
:
any
=
useLocation
();
...
@@ -48,30 +51,33 @@ const ProjectWorkbench = observer(() => {
...
@@ -48,30 +51,33 @@ const ProjectWorkbench = observer(() => {
},
},
];
];
},
[
isPass
]);
},
[
isPass
]);
if
(
currentProjectStore
.
currentProjectInfo
.
name
)
{
return
(
return
(
<
div
style=
{
{
padding
:
"28px 24px 24px"
}
}
>
<
div
style=
{
{
padding
:
"28px 24px 24px"
}
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"center"
}
}
>
<
span
<
span
style=
{
{
style=
{
{
fontSize
:
"18px"
,
fontSize
:
"18px"
,
lineHeight
:
"26px"
,
lineHeight
:
"26px"
,
fontWeight
:
"600"
,
fontWeight
:
"600"
,
color
:
"#1E2633"
,
color
:
"#1E2633"
,
marginBottom
:
"3px"
,
marginBottom
:
"3px"
,
}
}
}
}
>
>
工作台
工作台
</
span
>
</
span
>
</
div
>
<
Box
sx=
{
{
width
:
"100%"
,
typography
:
"body1"
}
}
>
<
Tabs
tabList=
{
tabList
}
defaultValue=
{
location
?.
state
?.
type
||
"workbenchTemplate"
}
/>
</
Box
>
</
div
>
</
div
>
<
Box
sx=
{
{
width
:
"100%"
,
typography
:
"body1"
}
}
>
);
<
Tabs
}
else
{
tabList=
{
tabList
}
return
<
NoProject
/>;
defaultValue=
{
location
?.
state
?.
type
||
"workbenchTemplate"
}
}
/>
</
Box
>
</
div
>
);
});
});
export
default
memo
(
ProjectWorkbench
);
export
default
memo
(
ProjectWorkbench
);
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