fix: 修改关系图的问题

This commit is contained in:
奔跑的面条 2023-09-03 17:42:11 +08:00
parent e090e669c4
commit dad89b1c52
2 changed files with 9 additions and 9 deletions

View File

@ -15,8 +15,8 @@ export const GraphLayout = [
// 标签开关 // 标签开关
export const LabelSwitch = [ export const LabelSwitch = [
{ label: '开启', value: true }, { label: '开启', value: 1 },
{ label: '关闭', value: false } { label: '关闭', value: 0 }
] ]
// 标签位置 // 标签位置
@ -30,8 +30,8 @@ export const LabelPosition = [
// 图-迭代动画 // 图-迭代动画
export const LayoutAnimation = [ export const LayoutAnimation = [
{ label: '开启', value: true }, { label: '开启', value: 1 },
{ label: '关闭', value: false } { label: '关闭', value: 0 }
] ]
export const option = { export const option = {
@ -55,7 +55,7 @@ export const option = {
links: dataJson.links, links: dataJson.links,
categories: dataJson.categories, categories: dataJson.categories,
label: { label: {
show: true, show: 1,
position: 'right', position: 'right',
formatter: '{b}' formatter: '{b}'
}, },
@ -70,7 +70,7 @@ export const option = {
repulsion: 100, repulsion: 100,
gravity: 0.1, gravity: 0.1,
edgeLength: 30, edgeLength: 30,
layoutAnimation: true, layoutAnimation: 1,
friction: 0.6 friction: 0.6
} }
} }

View File

@ -45,8 +45,8 @@
</n-input-number> </n-input-number>
</SettingItem> </SettingItem>
</SettingItemBox> </SettingItemBox>
<SettingItemBox name="力引导" v-show="graphConfig.layout == 'force'"> <SettingItemBox name="力引导" v-if="optionData.series[0].force && graphConfig.layout == 'force'">
<SettingItem name="斥力因子"> <SettingItem name="斥力因子" v-if="optionData.series[0].force.repulsion">
<n-input-number <n-input-number
v-model:value="optionData.series[0].force.repulsion" v-model:value="optionData.series[0].force.repulsion"
:min="0" :min="0"
@ -56,7 +56,7 @@
> >
</n-input-number> </n-input-number>
</SettingItem> </SettingItem>
<SettingItem name="引力因子"> <SettingItem name="引力因子" v-if="optionData.series[0].force.gravity">
<n-input-number <n-input-number
v-model:value="optionData.series[0].force.gravity" v-model:value="optionData.series[0].force.gravity"
:min="0" :min="0"