Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
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
zhaochengxiang
szse
Commits
f8ba0c1f
Commit
f8ba0c1f
authored
Jul 07, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段排序不能滚动问题
parent
04d1dfff
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
49 deletions
+31
-49
index.less
src/index.less
+9
-0
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+12
-3
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+4
-20
ImportActionIndex.less
src/view/Manage/Model/Component/ImportActionIndex.less
+1
-2
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+4
-23
ImportActionTable.less
src/view/Manage/Model/Component/ImportActionTable.less
+1
-1
No files found.
src/index.less
View file @
f8ba0c1f
...
@@ -104,3 +104,11 @@ div[id^='__qiankun_microapp_wrapper_'] {
...
@@ -104,3 +104,11 @@ div[id^='__qiankun_microapp_wrapper_'] {
.yy-typography, .yy-typography p {
.yy-typography, .yy-typography p {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}
}
tr.drop-over-downward td {
border-bottom: 2px dashed #1890ff;
}
tr.drop-over-upward td {
border-top: 2px dashed #1890ff;
}
\ No newline at end of file
src/view/Manage/Model/Component/ImportAction.jsx
View file @
f8ba0c1f
...
@@ -253,8 +253,7 @@ const ImportAction = (props) => {
...
@@ -253,8 +253,7 @@ const ImportAction = (props) => {
return
newEasyDataModelerIndices
.
filter
(
item
=>
(
item
.
indexedEasyDataModelAttributes
||
[]).
length
>
0
);
return
newEasyDataModelerIndices
.
filter
(
item
=>
(
item
.
indexedEasyDataModelAttributes
||
[]).
length
>
0
);
}
}
return
(
const
container
=
(<>
<
Spin
spinning=
{
loading
}
>
{
{
<
div
className=
'd-flex mb-5'
style=
{
{
alignItems
:
'center'
}
}
>
<
div
className=
'd-flex mb-5'
style=
{
{
alignItems
:
'center'
}
}
>
<
span
style=
{
{
marginLeft
:
'auto'
}
}
>
规范:
</
span
>
<
span
style=
{
{
marginLeft
:
'auto'
}
}
>
规范:
</
span
>
...
@@ -298,7 +297,17 @@ const ImportAction = (props) => {
...
@@ -298,7 +297,17 @@ const ImportAction = (props) => {
editable=
{
action
!==
'detail'
}
editable=
{
action
!==
'detail'
}
terms=
{
terms
}
terms=
{
terms
}
/>
/>
</
Spin
>
</>);
return
(
<>
{
//container包裹在Spin中,会有谷歌浏览器字段排序拖动不能滚动鼠标的问题,所以加载完成后,直接展示container
loading
?
<
Spin
spinning=
{
loading
}
>
{
container
}
</
Spin
>
:
container
}
</>
);
);
};
};
...
...
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
f8ba0c1f
...
@@ -603,36 +603,18 @@ const ImportActionIndex = (props) => {
...
@@ -603,36 +603,18 @@ const ImportActionIndex = (props) => {
return
hasValidateReports
?
includeValidateColumn
:
columns
;
return
hasValidateReports
?
includeValidateColumn
:
columns
;
}
}
let
pendingUpdateFn
=
undefined
;
let
requestedFrame
=
undefined
;
const
drawFrame
=
()
=>
{
const
newData
=
update
(
data
,
pendingUpdateFn
);
onChange
&&
onChange
(
newData
);
pendingUpdateFn
=
undefined
;
requestedFrame
=
undefined
;
};
const
scheduleUpdate
=
(
updateFn
)
=>
{
pendingUpdateFn
=
updateFn
;
if
(
!
requestedFrame
)
{
requestedFrame
=
requestAnimationFrame
(
drawFrame
);
}
}
const
moveRow
=
useCallback
(
const
moveRow
=
useCallback
(
(
dragIndex
,
hoverIndex
)
=>
{
(
dragIndex
,
hoverIndex
)
=>
{
const
dragRow
=
data
[
dragIndex
];
const
dragRow
=
data
[
dragIndex
];
scheduleUpdate
(
{
const
newData
=
update
(
data
,
{
$splice
:
[
$splice
:
[
[
dragIndex
,
1
],
[
dragIndex
,
1
],
[
hoverIndex
,
0
,
dragRow
],
[
hoverIndex
,
0
,
dragRow
],
],
],
});
});
onChange
&&
onChange
(
newData
);
},
},
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
[
data
],
[
data
],
...
@@ -671,6 +653,7 @@ const ImportActionIndex = (props) => {
...
@@ -671,6 +653,7 @@ const ImportActionIndex = (props) => {
editable
&&
<
Button
className=
'ml-3'
type=
"primary"
onClick=
{
onAddClick
}
disabled=
{
editingKey
!==
null
||
keyword
!==
''
}
>
新增索引
</
Button
>
editable
&&
<
Button
className=
'ml-3'
type=
"primary"
onClick=
{
onAddClick
}
disabled=
{
editingKey
!==
null
||
keyword
!==
''
}
>
新增索引
</
Button
>
}
}
</
div
>
</
div
>
<
div
className=
'content'
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Table
<
Table
...
@@ -700,6 +683,7 @@ const ImportActionIndex = (props) => {
...
@@ -700,6 +683,7 @@ const ImportActionIndex = (props) => {
</
Form
>
</
Form
>
</
DndProvider
>
</
DndProvider
>
</
div
>
</
div
>
</
div
>
);
);
};
};
...
...
src/view/Manage/Model/Component/ImportActionIndex.less
View file @
f8ba0c1f
.model-import-action-index {
.model-import-action-index {
.content {
.yy-table {
max-height: 200px !important;
max-height: 200px !important;
overflow: auto !important;
overflow: auto !important;
}
}
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
f8ba0c1f
...
@@ -691,39 +691,18 @@ const ImportActionTable = (props) => {
...
@@ -691,39 +691,18 @@ const ImportActionTable = (props) => {
return
hasValidateReports
?
includeValidateColumn
:
columns
;
return
hasValidateReports
?
includeValidateColumn
:
columns
;
}
}
//增加拖拽自动滚动功能
//https://codesandbox.io/s/react-dnd-example-12-s3nnf?file=/src/Container.jsx:393-425
let
pendingUpdateFn
=
undefined
;
let
requestedFrame
=
undefined
;
const
drawFrame
=
()
=>
{
const
newData
=
update
(
data
,
pendingUpdateFn
);
onChangeRef
.
current
&&
onChangeRef
.
current
(
newData
);
pendingUpdateFn
=
undefined
;
requestedFrame
=
undefined
;
};
const
scheduleUpdate
=
(
updateFn
)
=>
{
pendingUpdateFn
=
updateFn
;
if
(
!
requestedFrame
)
{
requestedFrame
=
requestAnimationFrame
(
drawFrame
);
}
}
const
moveRow
=
useCallback
(
const
moveRow
=
useCallback
(
(
dragIndex
,
hoverIndex
)
=>
{
(
dragIndex
,
hoverIndex
)
=>
{
const
dragRow
=
data
[
dragIndex
];
const
dragRow
=
data
[
dragIndex
];
scheduleUpdate
(
{
const
newData
=
update
(
data
,
{
$splice
:
[
$splice
:
[
[
dragIndex
,
1
],
[
dragIndex
,
1
],
[
hoverIndex
,
0
,
dragRow
],
[
hoverIndex
,
0
,
dragRow
],
],
],
});
});
//
onChangeRef.current && onChangeRef.current(newData);
onChangeRef
.
current
&&
onChangeRef
.
current
(
newData
);
},
},
//eslint-disable-next-line react-hooks/exhaustive-deps
//eslint-disable-next-line react-hooks/exhaustive-deps
[
data
],
[
data
],
...
@@ -762,6 +741,7 @@ const ImportActionTable = (props) => {
...
@@ -762,6 +741,7 @@ const ImportActionTable = (props) => {
editable
&&
<
Button
className=
'ml-3'
type=
"primary"
onClick=
{
onAddClick
}
disabled=
{
editingKey
!==
''
||
keyword
!==
''
}
>
新增字段
</
Button
>
editable
&&
<
Button
className=
'ml-3'
type=
"primary"
onClick=
{
onAddClick
}
disabled=
{
editingKey
!==
''
||
keyword
!==
''
}
>
新增字段
</
Button
>
}
}
</
div
>
</
div
>
<
div
className=
'content'
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Table
<
Table
...
@@ -845,6 +825,7 @@ const ImportActionTable = (props) => {
...
@@ -845,6 +825,7 @@ const ImportActionTable = (props) => {
</
Form
>
</
Form
>
</
DndProvider
>
</
DndProvider
>
</
div
>
</
div
>
</
div
>
);
);
};
};
...
...
src/view/Manage/Model/Component/ImportActionTable.less
View file @
f8ba0c1f
.model-import-action-table {
.model-import-action-table {
.
yy-table
{
.
content
{
max-height: 400px !important;
max-height: 400px !important;
overflow: auto !important;
overflow: auto !important;
}
}
...
...
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