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
ba12ccad
Commit
ba12ccad
authored
Jun 08, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update apolloTable upload
parent
8a5c07f6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
index.tsx
components/apolloTable/component/base/edit/select/index.tsx
+0
-1
index.less
components/apolloTable/component/base/edit/upload/index.less
+6
-1
index.tsx
components/apolloTable/component/base/edit/upload/index.tsx
+11
-5
index.tsx
components/apolloTable/detailForm/index.tsx
+2
-2
No files found.
components/apolloTable/component/base/edit/select/index.tsx
View file @
ba12ccad
...
@@ -16,7 +16,6 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
...
@@ -16,7 +16,6 @@ export const ApolloSelect = (props: ApolloSelectProps) => {
if
(
isMultiple
)
{
if
(
isMultiple
)
{
selfProps
.
mode
=
'multiple'
;
selfProps
.
mode
=
'multiple'
;
}
}
debugger
return
(
return
(
<
Select
<
Select
className=
{
styles
.
select
}
className=
{
styles
.
select
}
...
...
components/apolloTable/component/base/edit/upload/index.less
View file @
ba12ccad
...
@@ -6,10 +6,15 @@
...
@@ -6,10 +6,15 @@
display: flex;
display: flex;
align-items: center;
align-items: center;
border: 1px solid @primaryColor;
border: 1px solid @primaryColor;
min-height: 32px;
&.disabled {
background: @disabledColor;
border-color: #d9d9d9;
}
.add {
.add {
cursor: pointer;
cursor: pointer;
font-size: @textFontGen;
font-size: @textFontGen;
.addIcon{
.addIcon
{
width: 12px;
width: 12px;
}
}
}
}
...
...
components/apolloTable/component/base/edit/upload/index.tsx
View file @
ba12ccad
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
{
Modal
,
Tooltip
}
from
'antd'
;
import
{
Modal
,
Tooltip
}
from
'antd'
;
import
classNames
from
'classnames'
;
import
{
ApolloUploadProps
}
from
'../editInterface'
;
import
{
ApolloUploadProps
}
from
'../editInterface'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
import
{
antiAssign
}
from
'../../../../utils/utils'
;
import
s
from
'./index.less'
;
import
s
from
'./index.less'
;
...
@@ -7,7 +8,7 @@ import Upload from '../../extra/upload';
...
@@ -7,7 +8,7 @@ import Upload from '../../extra/upload';
import
addIcon
from
'../../../../assets/addIcon.png'
;
import
addIcon
from
'../../../../assets/addIcon.png'
;
export
const
ApolloUpload
=
(
props
:
ApolloUploadProps
)
=>
{
export
const
ApolloUpload
=
(
props
:
ApolloUploadProps
)
=>
{
const
{
isMultiple
,
onEmitChange
}
=
props
;
const
{
isMultiple
,
onEmitChange
,
onChange
,
disabled
}
=
props
;
const
selfProps
=
antiAssign
(
props
,
[
'onChange'
,
'value'
]);
const
selfProps
=
antiAssign
(
props
,
[
'onChange'
,
'value'
]);
if
(
isMultiple
)
{
if
(
isMultiple
)
{
selfProps
.
multiple
=
true
;
selfProps
.
multiple
=
true
;
...
@@ -45,6 +46,9 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
...
@@ -45,6 +46,9 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
if
(
typeof
onEmitChange
===
'function'
)
{
if
(
typeof
onEmitChange
===
'function'
)
{
onEmitChange
(
value
);
onEmitChange
(
value
);
}
}
if
(
typeof
onChange
===
'function'
)
{
onChange
(
value
);
}
toggleUploadDialog
(
false
);
toggleUploadDialog
(
false
);
};
};
const
onCancel
=
()
=>
{
const
onCancel
=
()
=>
{
...
@@ -58,10 +62,12 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
...
@@ -58,10 +62,12 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
e
.
nativeEvent
.
stopImmediatePropagation
();
e
.
nativeEvent
.
stopImmediatePropagation
();
};
};
return
(
return
(
<
div
className=
{
s
.
container
}
onClick=
{
onClickContainer
}
>
<
div
className=
{
disabled
?
classNames
(
s
.
container
,
s
.
disabled
)
:
s
.
container
}
onClick=
{
onClickContainer
}
>
{
!
disabled
&&
(
<
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
}
/>
<
img
alt=
""
className=
{
s
.
addIcon
}
src=
{
addIcon
}
/>
</
div
>
</
div
>
)
}
{
value
&&
{
value
&&
value
.
map
((
item
,
i
)
=>
{
value
.
map
((
item
,
i
)
=>
{
return
(
return
(
...
...
components/apolloTable/detailForm/index.tsx
View file @
ba12ccad
...
@@ -4,7 +4,7 @@ import { transferAttr } from '../component/base/_utils/transferAttr';
...
@@ -4,7 +4,7 @@ import { transferAttr } from '../component/base/_utils/transferAttr';
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
const
DetailForm
=
(
props
:
any
)
=>
{
const
DetailForm
=
(
props
:
any
)
=>
{
const
{
data
,
rowData
,
title
,
goEdit
}
=
props
;
const
{
data
,
rowData
,
title
,
goEdit
,
hideEditBtn
}
=
props
;
const
renderDetailForm
=
(
item
:
any
)
=>
{
const
renderDetailForm
=
(
item
:
any
)
=>
{
const
{
columnType
,
columnAttrObj
,
value
,
renderDetailForm
}
=
item
;
const
{
columnType
,
columnAttrObj
,
value
,
renderDetailForm
}
=
item
;
let
detailConfig
;
let
detailConfig
;
...
@@ -51,7 +51,7 @@ const DetailForm = (props: any) => {
...
@@ -51,7 +51,7 @@ const DetailForm = (props: any) => {
<
div
className=
{
styles
.
wrap
}
>
<
div
className=
{
styles
.
wrap
}
>
<
div
className=
{
styles
.
titleRow
}
>
<
div
className=
{
styles
.
titleRow
}
>
<
div
className=
{
styles
.
titleCls
}
>
{
title
}
</
div
>
<
div
className=
{
styles
.
titleCls
}
>
{
title
}
</
div
>
{
renderBtn
()
}
{
!
hideEditBtn
&&
renderBtn
()
}
</
div
>
</
div
>
<
div
id=
"gotop"
className=
{
styles
.
formWrap
}
>
<
div
id=
"gotop"
className=
{
styles
.
formWrap
}
>
{
data
.
map
((
item
:
any
,
index
:
number
)
=>
{
{
data
.
map
((
item
:
any
,
index
:
number
)
=>
{
...
...
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