mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
627 B
627 B
Placement
<n-dropdown @select="handleSelect" placement="bottom-start">
<template v-slot:activator>
<n-button>I want to go 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)
}
}
}