Skip to content

Commit

Permalink
docs(ContextMenu): 更新demo示例
Browse files Browse the repository at this point in the history
  • Loading branch information
yue1123 committed Dec 2, 2023
1 parent 092df03 commit e5edb2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/examples/context-menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BMap v-bind="$attrs" :center="center">
<BContextMenu :menuItems="list" />
<BMarker icon="simple_red" :position="{ lat: 39.915185, lng: 116.403901 }">
<BContextMenu :menuItems="overlayList" :width="300" />
<BContextMenu :menuItems="overlayList" :width="200" />
</BMarker>
</BMap>
</template>
Expand Down Expand Up @@ -37,7 +37,9 @@
const overlayList = ref<(ContextMenuItem | ContextMenuSeparator)[]>([
{
text: '覆盖物上下文菜单',
callback: function ({ map }: { map: BMapGL.Map }) {}
callback: function ({ map }: { map: BMapGL.Map }) {
alert('点击了覆盖物上下文菜单')
}
}
])
</script>

0 comments on commit e5edb2f

Please sign in to comment.