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
8618ab6d
Commit
8618ab6d
authored
Jun 08, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update scrollBarWidth
parent
ba36eaf4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
Table.tsx
components/apolloTable/component/Table.tsx
+5
-0
index.tsx
components/apolloTable/component/base/edit/search/index.tsx
+2
-2
index.tsx
components/apolloTable/editFormV3/index.tsx
+25
-1
No files found.
components/apolloTable/component/Table.tsx
View file @
8618ab6d
...
...
@@ -368,8 +368,10 @@ export default class AirTable extends Component<TableProps, TableState> {
// totalHeight = tableHeight + scrollbarWidth;
// }
let
realWidth
=
tableWidth
;
let
paddingRight
=
0
;
if
(
rowCount
>
0
&&
rowCount
*
rowHeight
>
totalHeight
)
{
realWidth
=
tableWidth
+
scrollbarWidth
;
paddingRight
=
scrollbarWidth
;
}
return
(
<
Consumer
>
...
...
@@ -383,6 +385,9 @@ export default class AirTable extends Component<TableProps, TableState> {
?
classNames
(
styles
.
tableContainer
,
styles
.
scroll
)
:
styles
.
tableContainer
}
style=
{
{
paddingRight
:
this
.
props
.
onScroll
?
paddingRight
:
0
,
}
}
>
{
totalWidth
>
tableWidth
&&
leftCount
>
0
&&
(
<
div
...
...
components/apolloTable/component/base/edit/search/index.tsx
View file @
8618ab6d
...
...
@@ -6,10 +6,10 @@ import { antiAssign } from '../../../../utils/utils';
import
s
from
'./index.less'
;
export
const
ApolloSearch
=
(
props
:
ApolloSearchProps
)
=>
{
const
{
onChange
,
maxCount
,
isMultiple
,
request
,
type
}
=
props
;
const
{
onChange
,
maxCount
,
isMultiple
,
request
}
=
props
;
const
selfProps
=
antiAssign
(
props
,
[
'columnConfig'
,
'onChange'
,
'isMultiple'
,
'options'
,
'request'
,
'maxCount'
]);
const
changeValue
=
(
value
)
=>
{
if
(
maxCount
&&
maxCount
<
value
.
length
)
{
if
(
isMultiple
&&
maxCount
&&
maxCount
<
value
.
length
)
{
message
.
warn
(
`最多选择
${
maxCount
}
个`
);
return
;
}
...
...
components/apolloTable/editFormV3/index.tsx
View file @
8618ab6d
...
...
@@ -83,6 +83,30 @@ class FormWrap extends Component {
);
};
validateRequired
=
(
item
,
rule
,
value
,
callback
)
=>
{
const
{
columnAttrObj
=
{}
}
=
item
;
const
{
validator
}
=
columnAttrObj
;
debugger
;
if
(
!
item
.
requiredFlag
)
{
callback
();
return
;
}
if
(
!
value
||
value
.
length
===
0
)
{
callback
(
'必填项不能为空'
);
return
;
}
const
[
first
]
=
value
;
if
(
!
first
.
text
&&
first
.
text
!==
0
&&
!
first
.
value
&&
first
.
value
!==
0
)
{
callback
(
'必填项不能为空'
);
return
;
}
if
(
validator
&&
typeof
validator
===
'function'
)
{
const
values
=
this
.
props
.
form
.
getFieldsValue
();
callback
(
validator
({
value
,
values
,
item
}));
}
callback
();
};
renderEditForm
=
(
item
)
=>
{
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
{
rowData
}
=
this
.
props
;
...
...
@@ -117,7 +141,7 @@ class FormWrap extends Component {
{
getFieldDecorator
(
columnName
,
{
validateFirst
,
validateTrigger
,
rules
:
[{
required
:
!!
item
.
requiredFlag
},
...
rules
],
rules
:
[{
required
:
!!
item
.
requiredFlag
,
message
:
'必填项不能为空'
},
...
rules
],
initialValue
:
getFormat
(
detailConfig
,
item
,
value
),
})(<
EditComp
{
...
transferColumn
}
columnConfig=
{
item
}
disabled=
{
readOnlyFlag
}
/>)
}
</
FormItem
>
...
...
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