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
b93137dc
Commit
b93137dc
authored
Jun 05, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update apolloTable upload
parent
c1601ee7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
index.tsx
components/apolloTable/component/base/detail/link/index.tsx
+6
-1
index.tsx
components/apolloTable/component/base/edit/upload/index.tsx
+3
-0
index.tsx
components/apolloTable/component/base/extra/upload/index.tsx
+4
-1
index.tsx
components/apolloTable/component/filter-condition/index.tsx
+8
-2
No files found.
components/apolloTable/component/base/detail/link/index.tsx
View file @
b93137dc
...
...
@@ -11,7 +11,12 @@ export const ApolloLinkDetail = (props: LinkProps) => {
{
value
.
map
((
item
,
i
)
=>
{
return
(
<
div
key=
{
i
}
>
<
a
href=
{
item
.
value
}
style=
{
{
textDecoration
:
'underline'
}
}
rel=
"noopener noreferrer"
>
<
a
target=
"_blank"
href=
{
item
.
value
}
style=
{
{
textDecoration
:
'underline'
}
}
rel=
"noopener noreferrer"
>
{
item
.
text
||
item
.
value
}
</
a
>
</
div
>
...
...
components/apolloTable/component/base/edit/upload/index.tsx
View file @
b93137dc
...
...
@@ -11,6 +11,9 @@ export const ApolloUpload = (props: ApolloUploadProps) => {
const
selfProps
=
antiAssign
(
props
,
[
'onChange'
,
'value'
]);
if
(
isMultiple
)
{
selfProps
.
multiple
=
true
;
}
else
{
selfProps
.
multiple
=
false
;
selfProps
.
maxLength
=
1
;
}
const
[
value
,
setValue
]
=
useState
(
props
.
value
||
[]);
const
changeValue
=
(
value
)
=>
{
...
...
components/apolloTable/component/base/extra/upload/index.tsx
View file @
b93137dc
...
...
@@ -12,7 +12,7 @@ message.config({
});
const
UploadCom
=
(
props
)
=>
{
const
{
onChange
,
CDN_HOST
,
getFormat
,
setFormat
,
data
,
domain
}
=
props
;
const
{
onChange
,
CDN_HOST
,
getFormat
,
setFormat
,
data
,
domain
,
maxLength
}
=
props
;
const
selfProps
=
antiAssign
(
props
,
[
'onChange'
,
'CDN_HOST'
,
'data'
]);
const
getFormatFileList
=
(
fileList
=
[])
=>
{
if
(
!
fileList
)
{
...
...
@@ -88,6 +88,9 @@ const UploadCom = (props) => {
const
changeFileList
=
({
file
,
fileList
})
=>
{
let
newList
=
fileList
;
if
(
maxLength
)
{
newList
=
fileList
.
slice
(
-
maxLength
);
}
if
(
file
.
status
===
'done'
&&
file
.
response
)
{
const
itemObj
=
setFormatFile
(
file
);
newList
=
fileList
.
map
((
item
)
=>
{
...
...
components/apolloTable/component/filter-condition/index.tsx
View file @
b93137dc
...
...
@@ -18,18 +18,24 @@ const formatTags = (columns: ColumnProps[], tags: any[]) => {
return
item
.
columnName
===
tag
.
colName
;
});
if
(
!
colConfig
)
return
;
const
{
componentAttr
}
=
config
[
colConfig
.
columnType
];
const
{
operator
=
[],
columnType
}
=
colConfig
;
const
{
componentAttr
,
getFormatter
}
=
config
[
columnType
];
const
newProps
=
{
...(
componentAttr
||
{}),
...(
colConfig
.
columnAttrObj
||
{}),
};
const
transferColumn
=
transferAttr
(
columnType
,
newProps
);
cons
t
value
=
tag
.
colValues
le
t
value
=
tag
.
colValues
.
map
((
item
:
any
)
=>
{
return
item
.
text
;
})
.
join
(
','
);
if
(
Number
(
columnType
)
===
11
&&
getFormatter
)
{
value
=
getFormatter
(
tag
.
colValues
,
transferColumn
);
if
(
value
.
format
)
{
value
=
value
.
format
(
transferColumn
.
format
);
}
}
const
op
=
operator
.
find
((
item
:
any
)
=>
{
return
item
.
id
===
tag
.
operationCode
;
...
...
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