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
ef0601fd
Commit
ef0601fd
authored
Jul 20, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 上传文件弹窗重构
parent
829ec90b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
index.tsx
src/views/Project/ProjectData/UpLoaderFile/index.tsx
+0
-0
index.tsx
src/views/Project/ProjectData/index.tsx
+10
-12
No files found.
src/views/Project/ProjectData/UpLoaderFile/index.tsx
View file @
ef0601fd
This diff is collapsed.
Click to expand it.
src/views/Project/ProjectData/index.tsx
View file @
ef0601fd
...
@@ -83,6 +83,7 @@ const ProjectData = observer(() => {
...
@@ -83,6 +83,7 @@ const ProjectData = observer(() => {
const
[
moveDialogOpen
,
setMoveDialogOpen
]
=
useState
(
false
);
const
[
moveDialogOpen
,
setMoveDialogOpen
]
=
useState
(
false
);
// 文件删除弹窗控制
// 文件删除弹窗控制
const
[
deleteDialogOpen
,
setDeleteDialogOpen
]
=
useState
(
false
);
const
[
deleteDialogOpen
,
setDeleteDialogOpen
]
=
useState
(
false
);
const
[
uploaderDialogOpen
,
setUploaderDialogOpen
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
locationInfo
:
any
=
location
?.
state
;
const
locationInfo
:
any
=
location
?.
state
;
...
@@ -432,12 +433,6 @@ const ProjectData = observer(() => {
...
@@ -432,12 +433,6 @@ const ProjectData = observer(() => {
);
);
};
};
// 文件上传
let
UpLoaderFileRef
:
any
=
React
.
createRef
();
const
hanleShowUpLoaderFileDialog
=
()
=>
{
UpLoaderFileRef
.
current
.
showDialog
();
};
// 下载文件
// 下载文件
const
hanleDownloadFile
=
(
item
:
any
)
=>
{
const
hanleDownloadFile
=
(
item
:
any
)
=>
{
const
downloadPath
=
const
downloadPath
=
...
@@ -556,7 +551,7 @@ const ProjectData = observer(() => {
...
@@ -556,7 +551,7 @@ const ProjectData = observer(() => {
variant=
"contained"
variant=
"contained"
size=
"small"
size=
"small"
style=
{
{
marginRight
:
"12px"
}
}
style=
{
{
marginRight
:
"12px"
}
}
onClick=
{
hanleShowUpLoaderFileDialog
}
onClick=
{
()
=>
setUploaderDialogOpen
(
true
)
}
disabled=
{
disabled=
{
selectIds
.
length
!==
0
||
selectIds
.
length
!==
0
||
!
isPass
(
"PROJECT_DATA_UPLOAD"
,
"USER"
)
!
isPass
(
"PROJECT_DATA_UPLOAD"
,
"USER"
)
...
@@ -685,11 +680,14 @@ const ProjectData = observer(() => {
...
@@ -685,11 +680,14 @@ const ProjectData = observer(() => {
showList=
{
showList
}
showList=
{
showList
}
></
DeleteDialog
>
></
DeleteDialog
>
)
}
)
}
<
UpLoaderFile
{
uploaderDialogOpen
&&
(
onRef=
{
UpLoaderFileRef
}
<
UpLoaderFile
path=
{
path
}
uploaderDialogOpen=
{
uploaderDialogOpen
}
list=
{
allList
}
setUploaderDialogOpen=
{
setUploaderDialogOpen
}
></
UpLoaderFile
>
path=
{
path
}
list=
{
allList
}
></
UpLoaderFile
>
)
}
{
moveDialogOpen
&&
(
{
moveDialogOpen
&&
(
<
MoveFile
<
MoveFile
moveDialogOpen=
{
moveDialogOpen
}
moveDialogOpen=
{
moveDialogOpen
}
...
...
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