File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 2121 height : 100% ;
2222 }
2323
24- .sm-component-table-popup__table .sm-component-table-wrapper .sm-component-table-content {
25- max-height : 400px ;
26- padding : 10px ;
27- }
28-
2924 .panel-wrapper {
3025 background : # fff ;
3126 box-shadow : -2px 0 8px rgb (0 0 0 / 15% );
5045 < sm-web-map server-url ="https://iportal.supermap.io/iportal " map-id ="801571284 " @load ="mapLoad ">
5146 </ sm-web-map >
5247 < div class ="panel-wrapper ">
53- < sm-attribute-panel :attributes ="attrbiutes " :columns ="tableColumns ">
48+ < sm-attribute-panel :attributes ="attrbiutes " :columns ="tableColumns " :title =" panelTitle " >
5449 </ sm-attribute-panel >
5550 </ div >
5651 </ div >
6055 el : '#main' ,
6156 data ( ) {
6257 return {
63- attrbiutes : [ ]
58+ attrbiutes : [ ] ,
59+ title : ''
6460 } ;
6561 } ,
6662 mounted ( ) {
6763 this . $message . info ( resources . msg_clickLayerToPopup ) ;
6864 } ,
6965 computed : {
66+ panelTitle ( ) {
67+ return this . title || resources . text_attributePanel
68+ } ,
7069 tableColumns ( ) {
7170 return [ {
7271 dataIndex : 'attribute'
8988 var features = vm . map . queryRenderedFeatures ( bbox ) ;
9089 if ( features . length > 0 ) {
9190 var matchFature = features [ 0 ] ;
91+ vm . title = matchFature . layer . id ;
9292 vm . attrbiutes = Object . keys ( matchFature . properties ) . map ( function ( prop ) {
9393 return {
9494 attribute : prop ,
9898 vm . addHighlightLayer ( matchFature ) ;
9999 } else {
100100 vm . attrbiutes = [ ] ;
101+ vm . title = ''
101102 vm . removeHighlight ( ) ;
102103 }
103104 } ) ;
You can’t perform that action at this time.
0 commit comments