|
|
|
@ -447,16 +447,16 @@ export default { |
|
|
|
for (let i = 0; i < res.nodes.length; i++) { |
|
|
|
const node = res.nodes[i]; |
|
|
|
|
|
|
|
// 跳过关键词节点且 text 不匹配的情况 |
|
|
|
if (node.type === "keyword" && node.text !== this.getpoinName) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
// // 跳过关键词节点且 text 不匹配的情况 |
|
|
|
// if (node.type === "keyword" && node.text !== this.getpoinName) { |
|
|
|
// continue; |
|
|
|
// } |
|
|
|
|
|
|
|
// 获取该节点的总 num 值 |
|
|
|
const totalNum = totalNumMap[node.id]; |
|
|
|
|
|
|
|
// 根据 totalNum 计算尺寸(可调参数) |
|
|
|
const baseSize = 120; // 最小尺寸 |
|
|
|
const baseSize = 150; // 最小尺寸 |
|
|
|
const sizePerNum = 40; // 每单位 num 增加的尺寸 |
|
|
|
const maxSize = 300; // 最大尺寸限制 |
|
|
|
|
|
|
|
@ -471,7 +471,7 @@ export default { |
|
|
|
height: height, |
|
|
|
color: this.getColor(node.type), |
|
|
|
fontColor: '#fff', |
|
|
|
styleClass:"nodeClass" |
|
|
|
styleClass:node.type=="keyword"?"nodeClassL1":"nodeClass" |
|
|
|
}; |
|
|
|
|
|
|
|
nodes.push(t_data); |
|
|
|
@ -524,7 +524,10 @@ export default { |
|
|
|
|
|
|
|
<style> |
|
|
|
.nodeClass{ |
|
|
|
font-size: 30px; |
|
|
|
font-size: 26px; |
|
|
|
} |
|
|
|
.nodeClassL1{ |
|
|
|
font-size: 33px; |
|
|
|
} |
|
|
|
/*****页面主要布局样式定义******/ |
|
|
|
.graph-nav { |
|
|
|
|