Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
95557036
authored
2025-06-26 15:20:46 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化关系网样式
1 parent
069cee88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
src/components/RelationNetwork/index.vue
src/components/RelationNetwork/index.vue
View file @
9555703
...
...
@@ -4,7 +4,7 @@
<div
class=
"title"
>
{{
detailInfoLabel
}}
</div>
<div
class=
"row"
v-for=
"item in Object.keys(detailInfo)"
>
<span>
{{
item
+
':'
}}
</span>
<span>
{{
detailInfo
[
item
]
}}
</span>
<span>
{{
detailInfo
[
item
]
==
null
?
'-'
:
detailInfo
[
item
]
}}
</span>
</div>
</div>
</div>
...
...
@@ -37,6 +37,10 @@ const emits = defineEmits([
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
const
maxChineseCount
=
ref
(
14
);
const
maxEnglishCount
=
ref
(
26
);
const
detailLoading
=
ref
(
false
);
const
detailInfo
:
any
=
ref
({});
...
...
@@ -116,9 +120,9 @@ const detectLanguage = (text) => {
const
handleLabelLength
=
(
label
:
string
)
=>
{
if
(
detectLanguage
(
label
)
==
'English'
)
{
return
label
?.
length
>
30
?
label
.
slice
(
0
,
30
)
+
'...'
:
label
;
return
label
?.
length
>
maxEnglishCount
.
value
?
label
.
slice
(
0
,
maxEnglishCount
.
value
)
+
'...'
:
label
;
}
return
label
?.
length
>
16
?
label
.
slice
(
0
,
16
)
+
'...'
:
label
;
return
label
?.
length
>
maxChineseCount
.
value
?
label
.
slice
(
0
,
maxChineseCount
.
value
)
+
'...'
:
label
;
};
insertCss
(
`
...
...
@@ -161,9 +165,9 @@ const initGraph = () => {
const
name
=
item
.
_cfg
.
model
?.
label
;
if
(
currentAnchor
==
'text-shape'
)
{
if
(
detectLanguage
(
name
)
==
'English'
)
{
return
name
?.
length
>
30
;
return
name
?.
length
>
maxEnglishCount
.
value
;
}
return
name
?.
length
>
16
;
return
name
?.
length
>
maxChineseCount
.
value
;
}
return
false
;
},
...
...
@@ -300,8 +304,9 @@ const initGraph = () => {
labelCfg
:
{
offset
:
10
,
style
:
{
fontSize
:
1
6
,
fontSize
:
1
3
,
fill
:
'#212121'
,
fontWeight
:
500
},
position
:
!
node
.
isField
?
'left'
:
'right'
,
//只有字段是最后一层级,不需要展开
},
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment