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
c56977cc
Commit
c56977cc
authored
Nov 29, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
e35e42f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
index.js
src/util/index.js
+2
-3
EditInherited.jsx
src/view/Manage/Model/Component/EditInherited.jsx
+0
-4
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+2
-2
No files found.
src/util/index.js
View file @
c56977cc
...
...
@@ -528,10 +528,10 @@ function getOffsetTop(element, container) {
return
rect
.
top
;
}
export
function
getInternalCurrentAnchor
(
_linkIds
,
_offsetTop
=
0
,
_bounds
=
5
,
container
=
window
)
{
export
function
getInternalCurrentAnchor
(
_linkIds
,
_offsetTop
=
0
,
_bounds
=
5
,
container
)
{
const
linkSections
:
Section
[]
=
[];
_linkIds
.
forEach
((
id
)
=>
{
const
target
=
document
.
getElementById
(
id
);
const
target
=
container
?.
querySelector
(
`.
${
id
}
`
);
if
(
target
)
{
const
top
=
getOffsetTop
(
target
,
container
);
if
(
top
<
_offsetTop
+
_bounds
)
{
...
...
@@ -540,7 +540,6 @@ export function getInternalCurrentAnchor(_linkIds, _offsetTop = 0, _bounds = 5,
}
});
console
.
log
(
'linkSections'
,
linkSections
);
if
(
linkSections
.
length
)
{
const
maxSection
=
linkSections
.
reduce
((
prev
,
curr
)
=>
(
curr
.
top
>
prev
.
top
?
curr
:
prev
));
return
maxSection
.
id
;
...
...
src/view/Manage/Model/Component/EditInherited.jsx
View file @
c56977cc
...
...
@@ -150,9 +150,7 @@ const FC = (props) => {
}
key=
{
inheritanceHistoricalType
}
>
<
div
style=
{
{
height
:
'75vh'
,
overflowX
:
'hidden'
}
}
>
{
historicalModelerData
&&
<
ImportAction
form=
{
historicalForm
}
action=
'edit-inherite-modal'
roughModelerData=
{
historicalModelerData
}
onChange=
{
onHistoricalChange
}
/>
}
</
div
>
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
{
...
...
@@ -168,9 +166,7 @@ const FC = (props) => {
}
key=
{
inheritanceZipperType
}
>
<
div
style=
{
{
height
:
'75vh'
,
overflowX
:
'hidden'
}
}
>
{
zipperModelerData
&&
<
ImportAction
form=
{
zipperForm
}
action=
'edit-inherite-modal'
roughModelerData=
{
zipperModelerData
}
onChange=
{
onZipperChange
}
/>
}
</
div
>
</
Tabs
.
TabPane
>
</
Tabs
>
}
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
c56977cc
...
...
@@ -577,7 +577,7 @@ const ImportAction = React.forwardRef((props, ref) => {
<div style={{ position: 'sticky', top: 0 }}>
<Tabs activeKey={activeValue} centered onChange={(val) => {
setActiveValue(val);
var targetElement =
document.getElementById(val
); // 找到目标元素
var targetElement =
container?.querySelector(`
.
$
{
val
}
`
); // 找到目标元素
if (targetElement) {
animating.current = true;
targetElement.scrollIntoView();
...
...
@@ -588,7 +588,7 @@ const ImportAction = React.forwardRef((props, ref) => {
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
</Tabs>
</div>
<div ref={setContainer} style={{ height: 'calc(100vh - 44px - 64px - 82px)', overflow: 'auto', padding: '0 20px' }}>
<div ref={setContainer} style={{ height:
action==='edit-inherite-modal'?'60vh':
'calc(100vh - 44px - 64px - 82px)', overflow: 'auto', padding: '0 20px' }}>
<ImportActionHeader
form={form}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
...
...
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