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 21
21
height : 100% ;
22
22
}
23
23
24
- .sm-component-table-popup__table .sm-component-table-wrapper .sm-component-table-content {
25
- max-height : 400px ;
26
- padding : 10px ;
27
- }
28
-
29
24
.panel-wrapper {
30
25
background : # fff ;
31
26
box-shadow : -2px 0 8px rgb (0 0 0 / 15% );
50
45
< sm-web-map server-url ="https://iportal.supermap.io/iportal " map-id ="801571284 " @load ="mapLoad ">
51
46
</ sm-web-map >
52
47
< div class ="panel-wrapper ">
53
- < sm-attribute-panel :attributes ="attrbiutes " :columns ="tableColumns ">
48
+ < sm-attribute-panel :attributes ="attrbiutes " :columns ="tableColumns " :title =" panelTitle " >
54
49
</ sm-attribute-panel >
55
50
</ div >
56
51
</ div >
60
55
el : '#main' ,
61
56
data ( ) {
62
57
return {
63
- attrbiutes : [ ]
58
+ attrbiutes : [ ] ,
59
+ title : ''
64
60
} ;
65
61
} ,
66
62
mounted ( ) {
67
63
this . $message . info ( resources . msg_clickLayerToPopup ) ;
68
64
} ,
69
65
computed : {
66
+ panelTitle ( ) {
67
+ return this . title || resources . text_attributePanel
68
+ } ,
70
69
tableColumns ( ) {
71
70
return [ {
72
71
dataIndex : 'attribute'
89
88
var features = vm . map . queryRenderedFeatures ( bbox ) ;
90
89
if ( features . length > 0 ) {
91
90
var matchFature = features [ 0 ] ;
91
+ vm . title = matchFature . layer . id ;
92
92
vm . attrbiutes = Object . keys ( matchFature . properties ) . map ( function ( prop ) {
93
93
return {
94
94
attribute : prop ,
98
98
vm . addHighlightLayer ( matchFature ) ;
99
99
} else {
100
100
vm . attrbiutes = [ ] ;
101
+ vm . title = ''
101
102
vm . removeHighlight ( ) ;
102
103
}
103
104
} ) ;
You can’t perform that action at this time.
0 commit comments