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
b8ef848f
Commit
b8ef848f
authored
May 30, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加项目设置页面
parent
e70beb15
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
2 deletions
+56
-2
package-lock.json
package-lock.json
+0
-0
demo.ts
src/mocks/demo.ts
+16
-0
index.ts
src/router/index.ts
+2
-0
index.module.css
src/views/MenuLayout/index.module.css
+3
-0
index.tsx
src/views/MenuLayout/index.tsx
+2
-2
index.tsx
src/views/Project/ProjectSetting/index.tsx
+33
-0
No files found.
package-lock.json
View file @
b8ef848f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/mocks/demo.ts
View file @
b8ef848f
...
@@ -30,6 +30,22 @@ const demo = [
...
@@ -30,6 +30,22 @@ const demo = [
icon
:
""
,
icon
:
""
,
type
:
"product"
,
type
:
"product"
,
routes
:
[
routes
:
[
{
id
:
"PROJECT_SETTING"
,
type
:
"page"
,
name
:
"项目设置"
,
path
:
"/setting"
,
icon
:
""
,
element
:
"ProjectSetting"
,
show
:
"true"
,
// children: [
// {
// id: "PROJECT_OVERIVEW_CREATE",
// type: "operation",
// name: "创建项目",
// },
// ],
},
{
{
id
:
"PROJECT_OVERIVEW"
,
id
:
"PROJECT_OVERIVEW"
,
type
:
"page"
,
type
:
"page"
,
...
...
src/router/index.ts
View file @
b8ef848f
...
@@ -4,6 +4,7 @@ import MenuLayout from "@/views/MenuLayout";
...
@@ -4,6 +4,7 @@ import MenuLayout from "@/views/MenuLayout";
import
*
as
React
from
"react"
;
import
*
as
React
from
"react"
;
import
NotFound
from
"@/views/404"
;
import
NotFound
from
"@/views/404"
;
import
Demo
from
"@/views/demo"
;
import
Demo
from
"@/views/demo"
;
import
ProjectSetting
from
"@/views/Project/ProjectSetting"
;
export
type
route
=
{
export
type
route
=
{
id
?:
string
;
id
?:
string
;
...
@@ -36,6 +37,7 @@ export const elements: {
...
@@ -36,6 +37,7 @@ export const elements: {
})
=>
JSX
.
Element
;
})
=>
JSX
.
Element
;
}
=
{
}
=
{
Demo
:
Demo
,
Demo
:
Demo
,
ProjectSetting
:
ProjectSetting
,
};
};
export
const
routes
:
Array
<
route
|
navigate
>
=
[
export
const
routes
:
Array
<
route
|
navigate
>
=
[
...
...
src/views/MenuLayout/index.module.css
View file @
b8ef848f
...
@@ -3,3 +3,6 @@
...
@@ -3,3 +3,6 @@
align-items
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.content
{
flex
:
1
;
}
src/views/MenuLayout/index.tsx
View file @
b8ef848f
...
@@ -18,7 +18,7 @@ const MenuLayout = observer(() => {
...
@@ -18,7 +18,7 @@ const MenuLayout = observer(() => {
return
(
return
(
<
Box
className=
{
style
.
container
}
>
<
Box
className=
{
style
.
container
}
>
<
Box
sx=
{
{
width
:
"10%"
}
}
>
<
Box
sx=
{
{
width
:
"10%"
,
minWidth
:
"220px"
}
}
>
<
List
>
<
List
>
{
permissionStore
.
sidebarRouters
.
map
((
item
,
index
)
=>
{
{
permissionStore
.
sidebarRouters
.
map
((
item
,
index
)
=>
{
return
(
return
(
...
@@ -33,7 +33,7 @@ const MenuLayout = observer(() => {
...
@@ -33,7 +33,7 @@ const MenuLayout = observer(() => {
})
}
})
}
</
List
>
</
List
>
</
Box
>
</
Box
>
<
Box
sx=
{
{
width
:
"90%"
}
}
>
<
Box
className=
{
style
.
content
}
>
<
Outlet
></
Outlet
>
<
Outlet
></
Outlet
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
...
...
src/views/Project/ProjectSetting/index.tsx
0 → 100644
View file @
b8ef848f
import
{
useMessage
}
from
"@/components/MySnackbar"
;
import
usePass
from
"@/hooks/usePass"
;
import
{
operation
,
route
}
from
"@/router"
;
import
{
Button
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/system"
;
import
{
useEffect
}
from
"react"
;
const
ProjectSetting
=
({
childrenRoutes
,
}:
{
childrenRoutes
?:
Array
<
route
|
operation
>
;
})
=>
{
const
message
=
useMessage
();
const
isPass
=
usePass
();
useEffect
(()
=>
{
console
.
log
(
isPass
(
"PROJECT_OVERIVEW_CREATE"
),
"11111111111"
);
console
.
log
(
isPass
(
"PROJECT_SUMMARY_MEMBER"
),
"2222222"
);
console
.
log
(
isPass
(
"test"
),
"33333"
);
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[]);
return
(
<
Box
>
<
Box
>
ProjectSetting123
</
Box
>
<
Box
>
{
JSON
.
stringify
(
childrenRoutes
)
}
</
Box
>
<
Box
>
{
JSON
.
stringify
(
process
.
env
.
NODE_ENV
)
}
</
Box
>
<
Button
onClick=
{
()
=>
message
.
success
(
"测试测试"
)
}
>
message测试
</
Button
>
</
Box
>
);
};
export
default
ProjectSetting
;
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