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
34441bae
Commit
34441bae
authored
Jun 23, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加兼容
parent
d276efd5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
Cell.tsx
components/apolloTable/component/Cell.tsx
+3
-3
index.tsx
components/apolloTable/component/filter-condition/index.tsx
+5
-1
index.tsx
components/apolloTable/component/filter/index.tsx
+9
-6
index.tsx
components/apolloTable/editFormV3/index.tsx
+9
-1
No files found.
components/apolloTable/component/Cell.tsx
View file @
34441bae
...
...
@@ -174,9 +174,9 @@ const Cell = (props: CellProps) => {
}
onClick=
{
()
=>
{
// 不可编辑状态
if
(
!
cellEditable
||
readOnlyFlag
||
(
dynamicCellConfigDTO
&&
dynamicCellConfigDTO
.
readonlyFlag
))
{
return
false
;
}
//
if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag))
{
//
return false;
//
}
if
(
selectedCell
===
`${position}_${cellKey}`
)
{
setStatus
(
'edit'
);
}
else
{
...
...
components/apolloTable/component/filter-condition/index.tsx
View file @
34441bae
...
...
@@ -18,7 +18,11 @@ const formatTags = (columns: ColumnProps[], tags: any[]) => {
return
item
.
columnName
===
tag
.
colName
;
});
if
(
!
colConfig
)
return
;
const
{
operator
=
[],
columnType
}
=
colConfig
;
const
{
operator
=
[]
}
=
colConfig
;
let
{
columnType
}
=
colConfig
;
if
(
!
config
[
columnType
])
{
columnType
=
'1'
;
}
const
{
componentAttr
,
getFormatter
}
=
config
[
columnType
];
const
newProps
=
{
...(
componentAttr
||
{}),
...
...
components/apolloTable/component/filter/index.tsx
View file @
34441bae
...
...
@@ -166,12 +166,12 @@ export default class Filter extends Component<Props, State> {
for
(
let
i
=
0
;
i
<
filterConfig
.
length
;
i
++
)
{
// 筛选条件值为undefined或[]或[{text:'',value:''}]都算空,不能提交
if
(
!
filterConfig
[
i
].
colName
||
!
filterConfig
[
i
].
operationCode
||
!
filterConfig
[
i
].
colValues
||
filterConfig
[
i
].
colValues
.
length
===
0
||
(
!
filterConfig
[
i
].
colValues
&&
filterConfig
[
i
].
colValues
!==
0
)
||
(
!
filterConfig
[
i
].
colValues
[
0
].
text
&&
filterConfig
[
i
].
colValues
[
0
].
text
!==
0
)
!
filterConfig
[
i
].
colName
||
!
filterConfig
[
i
].
operationCode
||
!
filterConfig
[
i
].
colValues
||
filterConfig
[
i
].
colValues
.
length
===
0
||
(
!
filterConfig
[
i
].
colValues
&&
filterConfig
[
i
].
colValues
!==
0
)
||
(
!
filterConfig
[
i
].
colValues
[
0
].
text
&&
filterConfig
[
i
].
colValues
[
0
].
text
!==
0
)
)
{
message
.
error
(
locale
.
filterEmpty
);
return
;
...
...
@@ -210,6 +210,9 @@ export default class Filter extends Component<Props, State> {
if
(
filterItem
)
{
operateOptions
=
filterItem
.
operator
;
type
=
String
(
filterItem
.
columnType
);
if
(
!
config
[
type
])
{
type
=
'1'
;
}
delete
filterItem
.
columnAttrObj
.
maxLength
;
const
{
columnAttrObj
}
=
filterItem
;
newProps
=
{
...
...
components/apolloTable/editFormV3/index.tsx
View file @
34441bae
...
...
@@ -116,7 +116,15 @@ class FormWrap extends Component {
validateTrigger
,
rules
:
[{
required
:
!!
item
.
requiredFlag
,
message
:
'必填项不能为空'
},
...
rules
],
initialValue
:
getFormat
(
detailConfig
,
item
,
value
),
})(<
EditComp
{
...
transferColumn
}
columnConfig=
{
item
}
disabled=
{
disabled
}
origin=
"editForm"
/>)
}
})(
<
EditComp
{
...
transferColumn
}
columnConfig=
{
item
}
disabled=
{
disabled
}
origin=
"editForm"
form=
{
this
.
props
.
form
}
/>,
)
}
</
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