mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
667 B
667 B
Placement
<n-dropdown @select="handleSelect" placement="bottom-start" :focusable="false">
<template v-slot:activator>
<n-button>Money Force Us to Work Rather Than Sleep</n-button>
</template>
<n-dropdown-item
v-for="hotel in hotels"
:key="hotel"
:name="hotel.toLowerCase()"
>
{{ hotel }}
</n-dropdown-item>
</n-dropdown>
export default {
data () {
return {
hotels: [
'Marina Bay Sands, Singapore', 'Brown’s Hotel, London', 'Atlantis Bahamas, Nassau', 'The Beverly Hills Hotel, Los Angeles'
]
}
},
methods: {
handleSelect (name) {
this.$NMessage.info(name)
}
}
}