File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed
GraphRag.Net.Web/Pages/Graph Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
3
3
<PropertyGroup >
4
- <Version >0.1.31 </Version >
4
+ <Version >0.1.32 </Version >
5
5
<SKVersion >1.17.1</SKVersion >
6
6
</PropertyGroup >
7
7
</Project >
Original file line number Diff line number Diff line change 3
3
4
4
<div id =" app" >
5
5
<div style =" height :calc (100vh - 30px );width :100% ;border :#eeeeee solid 1px ;" >
6
- <relation-graph ref =" seeksRelationGraph" :options =" graphOptions" />
6
+ <relation-graph
7
+ ref =" seeksRelationGraph"
8
+ :options =" graphOptions"
9
+ :on-node-click =" onNodeClick" />
7
10
</div >
8
11
</div >
9
12
58
61
// 处理错误
59
62
console .error (' 请求出错:' , error);
60
63
});
64
+ },
65
+ onNodeClick (nodeObject , $event ) {
66
+ alert (nodeObject .data .desc );
61
67
}
62
68
}
63
69
})
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ public class NodesViewModel
12
12
public string text { get ; set ; }
13
13
public string color { get ; set ; } = "#43a2f1" ;
14
14
15
+ public NodesDataModel data { get ; set ; } = new NodesDataModel ( ) ;
16
+ }
17
+
18
+ public class NodesDataModel
19
+ {
15
20
public string desc { get ; set ; }
16
21
}
17
22
Original file line number Diff line number Diff line change @@ -56,7 +56,10 @@ public GraphViewModel GetAllGraphs(string index)
56
56
{
57
57
id = n . Id ,
58
58
text = n . Name ,
59
- desc = n . Desc
59
+ data = new NodesDataModel ( )
60
+ {
61
+ desc = n . Desc . ConvertToString ( )
62
+ }
60
63
} ;
61
64
//处理相同的Type用相同的颜色
62
65
if ( TypeColor . ContainsKey ( n . Type ) )
You can’t perform that action at this time.
0 commit comments