Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
16dab0df
Commit
16dab0df
authored
Jul 22, 2020
by
李晓静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传按钮样式修改
parent
420d1a4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
index.tsx
components/apolloTable/component/base/edit/upload/index.tsx
+6
-2
index.tsx
components/apolloTable/component/base/extra/upload/index.tsx
+4
-3
No files found.
components/apolloTable/component/base/edit/upload/index.tsx
View file @
16dab0df
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
Modal
,
Tooltip
}
from
'antd'
;
import
{
Modal
,
Tooltip
,
Button
,
Icon
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
ApolloUploadProps
}
from
'../editInterface'
;
import
{
ApolloUploadProps
}
from
'../editInterface'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
...
@@ -80,6 +80,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
...
@@ -80,6 +80,7 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
return
(
return
(
<
div
key=
{
i
}
className=
{
s
.
picContainer
}
>
<
div
key=
{
i
}
className=
{
s
.
picContainer
}
>
<
Tooltip
placement=
"bottom"
title=
{
item
.
name
}
>
<
Tooltip
placement=
"bottom"
title=
{
item
.
name
}
>
<
img
<
img
className=
{
origin
===
'editForm'
?
classNames
(
s
.
pic
,
s
.
editForm
)
:
s
.
pic
}
className=
{
origin
===
'editForm'
?
classNames
(
s
.
pic
,
s
.
editForm
)
:
s
.
pic
}
src=
{
item
.
thumbUrl
}
src=
{
item
.
thumbUrl
}
...
@@ -90,7 +91,10 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
...
@@ -90,7 +91,10 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
})
}
})
}
{
!
disabled
&&
origin
===
'editForm'
&&
(
{
!
disabled
&&
origin
===
'editForm'
&&
(
<
div
className=
{
s
.
add
}
onClick=
{
toggleUploadDialog
.
bind
(
null
,
true
)
}
>
<
div
className=
{
s
.
add
}
onClick=
{
toggleUploadDialog
.
bind
(
null
,
true
)
}
>
<
img
alt=
""
className=
{
s
.
addIcon
}
src=
{
addIcon
}
/>
<
Button
>
<
Icon
type=
"upload"
/>
{
'上传'
}
</
Button
>
{
/* <img alt="" className={s.addIcon} src={addIcon} /> */
}
</
div
>
</
div
>
)
}
)
}
<
Modal
visible=
{
visible
}
title=
"文件上传"
onOk=
{
onOk
}
onCancel=
{
onCancel
}
>
<
Modal
visible=
{
visible
}
title=
"文件上传"
onOk=
{
onOk
}
onCancel=
{
onCancel
}
>
...
...
components/apolloTable/component/base/extra/upload/index.tsx
View file @
16dab0df
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
message
,
Upload
}
from
'antd'
;
import
{
message
,
Upload
,
Button
,
Icon
}
from
'antd'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
s
from
'./index.less'
;
import
s
from
'./index.less'
;
import
{
antiAssign
,
getRandom
}
from
'../../../../utils/utils'
;
import
{
antiAssign
,
getRandom
}
from
'../../../../utils/utils'
;
import
{
checkoutFileType
}
from
'./utils'
;
import
{
checkoutFileType
}
from
'./utils'
;
import
Preview
from
'./preview'
;
import
Preview
from
'./preview'
;
import
addIcon
from
'../../../../assets/addIcon.png'
;
message
.
config
({
message
.
config
({
maxCount
:
1
,
maxCount
:
1
,
...
@@ -147,7 +146,9 @@ const UploadCom = (props) => {
...
@@ -147,7 +146,9 @@ const UploadCom = (props) => {
showDownloadIcon
:
true
,
showDownloadIcon
:
true
,
}
}
}
}
>
>
<
img
alt=
""
className=
{
s
.
addIcon
}
src=
{
addIcon
}
/>
<
Button
>
<
Icon
type=
"upload"
/>
{
'上传'
}
</
Button
>
</
Upload
>
</
Upload
>
<
Preview
ref=
{
previewModel
}
/>
<
Preview
ref=
{
previewModel
}
/>
</
div
>
</
div
>
...
...
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