Commit b6904311 authored by Qiu Xiang's avatar Qiu Xiang

调整接口字段,使其更合理、一致

parent 22538e45
......@@ -64,7 +64,7 @@ internal class AMapMarkerManager : ViewGroupManager<AMapMarker>() {
marker.draggable = draggable
}
@ReactProp(name = "selected")
@ReactProp(name = "active")
fun setSelected(marker: AMapMarker, active: Boolean) {
marker.active = active
}
......@@ -74,7 +74,7 @@ internal class AMapMarkerManager : ViewGroupManager<AMapMarker>() {
marker.setIcon(icon)
}
@ReactProp(name = "showsInfoWindow")
@ReactProp(name = "infoWindowEnabled")
fun setEnabledInfoWindow(marker: AMapMarker, enabled: Boolean) {
marker.infoWindowEnabled = enabled
}
......
......@@ -34,7 +34,7 @@ class Marker extends Component {
]),
/**
* 透明度
* 透明度 [0, 1]
*/
opacity: PropTypes.number,
......@@ -54,14 +54,14 @@ class Marker extends Component {
zIndex: PropTypes.number,
/**
* 是否选中
* 是否选中,选中时将显示信息窗体,一个地图只能有一个正在选中的 marker
*/
selected: PropTypes.bool,
active: PropTypes.bool,
/**
* 是否显示信息窗体
* 是否启用信息窗体,该属性只能开始时设置一次
*/
showsInfoWindow: PropTypes.bool,
infoWindowEnabled: PropTypes.bool,
/**
* 点击事件
......
......@@ -38,7 +38,7 @@ export default class MarkerExample extends Component {
}}
/>
<Marker
selected
active
icon='red'
infoWindowWidth={100}
coordinate={{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment