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
54000886
Commit
54000886
authored
Jul 29, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹框类组件修改为不同步数据
parent
6705ef2e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
index.tsx
...nents/apolloTable/component/base/edit/container/index.tsx
+10
-9
index.tsx
components/apolloTable/component/base/edit/input/index.tsx
+1
-0
index.less
components/apolloTable/component/base/edit/search/index.less
+3
-0
index.tsx
...nents/apolloTable/component/base/edit/text-link/index.tsx
+1
-2
index.tsx
...onents/apolloTable/component/base/edit/textarea/index.tsx
+2
-2
No files found.
components/apolloTable/component/base/edit/container/index.tsx
View file @
54000886
...
...
@@ -22,15 +22,16 @@ export default function CellContainer<P extends Props>(Comp) {
};
this
.
container
=
React
.
createRef
();
}
static
getDerivedStateFromProps
(
nextProps
:
any
,
prevState
:
any
)
{
if
(
JSON
.
stringify
(
prevState
.
propsValue
)
!==
JSON
.
stringify
(
nextProps
.
value
))
{
return
{
propsValue
:
nextProps
.
value
,
value
:
nextProps
.
value
,
};
}
return
null
;
}
// 编辑单元格实时更新
// static getDerivedStateFromProps(nextProps: any, prevState: any) {
// if (JSON.stringify(prevState.propsValue) !== JSON.stringify(nextProps.value)) {
// return {
// propsValue: nextProps.value,
// value: nextProps.value,
// };
// }
// return null;
// }
componentDidMount
():
void
{
document
.
addEventListener
(
'click'
,
this
.
onBlur
,
false
);
}
...
...
components/apolloTable/component/base/edit/input/index.tsx
View file @
54000886
...
...
@@ -19,6 +19,7 @@ export const ApolloInput = (props: ApolloInputProps) => {
'maxPopHeight'
,
'getPopupContainer'
,
'getCalendarContainer'
,
'origin'
,
]);
const
[
inputVal
,
setInputVal
]
=
useState
(
value
);
useEffect
(()
=>
{
...
...
components/apolloTable/component/base/edit/search/index.less
View file @
54000886
...
...
@@ -13,6 +13,9 @@
:global(.ant-select-selection__rendered) {
width: 100%;
}
:global(.ant-select-dropdown-menu) {
max-height: none;
}
}
.searchDropdown {
overflow: auto;
...
...
components/apolloTable/component/base/edit/text-link/index.tsx
View file @
54000886
...
...
@@ -29,10 +29,9 @@ export const ApolloTextLink = (props: ApolloTextAreaProps) => {
const
[
visible
,
setVisible
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
origin
!==
'editForm'
)
{
setCurValue
(
value
);
getMore
();
}
},
[
value
]);
},
[]);
const
[
inputVal
,
setInputVal
]
=
useState
(
value
);
useEffect
(()
=>
{
setInputVal
(
value
);
...
...
components/apolloTable/component/base/edit/textarea/index.tsx
View file @
54000886
...
...
@@ -22,15 +22,15 @@ export const ApolloTextArea = (props: ApolloTextAreaProps) => {
'maxPopHeight'
,
'getPopupContainer'
,
'getCalendarContainer'
,
'origin'
,
]);
const
[
curValue
,
setCurValue
]
=
useState
(
value
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
origin
!==
'editForm'
)
{
setCurValue
(
value
);
getMore
();
}
},
[
value
]);
},
[]);
const
[
inputVal
,
setInputVal
]
=
useState
(
value
);
useEffect
(()
=>
{
...
...
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