Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
695ec54a
Commit
695ec54a
authored
Apr 07, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按钮权限组建修复
parent
310401bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
index.tsx
src/components/AuthButton/index.tsx
+3
-2
index.tsx
src/pages/systemSetting/materialmanagement/index.tsx
+1
-1
No files found.
src/components/AuthButton/index.tsx
View file @
695ec54a
...
@@ -23,12 +23,13 @@ const AuthButton = (props: AuthButtonProps) => {
...
@@ -23,12 +23,13 @@ const AuthButton = (props: AuthButtonProps) => {
const
{
pathname
}
=
new
URL
(
window
.
location
.
href
);
const
{
pathname
}
=
new
URL
(
window
.
location
.
href
);
const
RoutesAuth
=
auth
.
filter
((
item
:
any
)
=>
item
?.
u
===
pathname
)
const
RoutesAuth
=
auth
.
filter
((
item
:
any
)
=>
item
?.
u
===
pathname
)
// console.log(pathname, RoutesAuth)
const
_authorityBtn
=
()
=>
{
const
_authorityBtn
=
()
=>
{
// 本地开发时传的特殊标识,直接开放权限
// 本地开发时传的特殊标识,直接开放权限
if
(
btnCode
===
'DevTest'
)
return
true
if
(
btnCode
===
'DevTest'
)
return
true
if
(
RoutesAuth
.
length
>
0
)
{
if
(
RoutesAuth
.
length
>
0
)
{
const
{
b
}
=
RoutesAuth
[
0
];
const
{
b
}
=
RoutesAuth
[
0
];
console
.
log
(
RoutesAuth
.
length
,
RoutesAuth
)
for
(
let
i
=
0
;
i
<
b
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
b
.
length
;
i
++
)
{
if
(
btnCode
)
{
if
(
btnCode
)
{
// 是否有页面标识
// 是否有页面标识
...
@@ -42,6 +43,6 @@ const AuthButton = (props: AuthButtonProps) => {
...
@@ -42,6 +43,6 @@ const AuthButton = (props: AuthButtonProps) => {
return
false
return
false
}
}
}
}
return
_authorityBtn
?
children
:
null
return
_authorityBtn
()
?
children
:
null
}
}
export
default
AuthButton
;
export
default
AuthButton
;
src/pages/systemSetting/materialmanagement/index.tsx
View file @
695ec54a
...
@@ -285,7 +285,7 @@ const Materialmanagement = () => {
...
@@ -285,7 +285,7 @@ const Materialmanagement = () => {
}
}
</
div
>
</
div
>
<
div
className=
{
styles
.
Pagination
}
>
<
div
className=
{
styles
.
Pagination
}
>
<
Pagination
total=
{
total
}
pageSize=
{
from
.
pageSize
}
onChange=
{
handlePaginationChange
}
/>
<
Pagination
total=
{
total
}
pageSize=
{
from
.
pageSize
}
onChange=
{
handlePaginationChange
}
current=
{
from
.
current
}
/>
</
div
>
</
div
>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
...
...
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