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
a6ce9192
Commit
a6ce9192
authored
Dec 17, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
279fe499
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
DragResized.tsx
components/apolloTable/component/DragResized.tsx
+8
-8
DragSorted.tsx
components/apolloTable/component/DragSorted.tsx
+3
-3
No files found.
components/apolloTable/component/DragResized.tsx
View file @
a6ce9192
...
@@ -48,14 +48,6 @@ const DragResized = (props: any) => {
...
@@ -48,14 +48,6 @@ const DragResized = (props: any) => {
}
}
newColumns
.
push
(
item
);
newColumns
.
push
(
item
);
});
});
// 业务回调
if
(
typeof
onDragResized
===
'function'
)
{
onDragResized
(
newColumns
);
}
// table回调
if
(
typeof
onDragResizedCb
===
'function'
)
{
onDragResizedCb
(
newColumns
);
}
// 缓存操作
// 缓存操作
if
(
cachedFeAttr
)
{
if
(
cachedFeAttr
)
{
const
cachedCols
=
getCache
({
tableId
});
const
cachedCols
=
getCache
({
tableId
});
...
@@ -67,6 +59,14 @@ const DragResized = (props: any) => {
...
@@ -67,6 +59,14 @@ const DragResized = (props: any) => {
saveCache
({
tableId
,
data
:
cachedCols
});
saveCache
({
tableId
,
data
:
cachedCols
});
}
}
}
}
// 业务回调
if
(
typeof
onDragResized
===
'function'
)
{
onDragResized
(
newColumns
);
}
// table回调
if
(
typeof
onDragResizedCb
===
'function'
)
{
onDragResizedCb
(
newColumns
);
}
};
};
return
(
return
(
...
...
components/apolloTable/component/DragSorted.tsx
View file @
a6ce9192
...
@@ -187,9 +187,9 @@ const DragSorted = (props: any) => {
...
@@ -187,9 +187,9 @@ const DragSorted = (props: any) => {
if
(
typeof
onDragSorted
===
'function'
)
{
if
(
typeof
onDragSorted
===
'function'
)
{
onDragSorted
(
newColumns
);
onDragSorted
(
newColumns
);
}
}
//
if (typeof onDragSortedCb === 'function') {
if
(
typeof
onDragSortedCb
===
'function'
)
{
//
onDragSortedCb(newColumns);
onDragSortedCb
(
newColumns
);
//
}
}
},
[
onDragSortedCb
,
onDragSorted
,
columns
]);
},
[
onDragSortedCb
,
onDragSorted
,
columns
]);
// 监听鼠标按下
// 监听鼠标按下
const
onMouseDown
=
useCallback
(
const
onMouseDown
=
useCallback
(
...
...
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