mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
514 B
514 B
Placement
<n-dropdown placement="bottom-start">
<template v-slot:activator>
<div>menu</div>
</template>
<n-dropdown-item
v-for="item in items"
:key="item"
@click="handleClick(item)"
>
{{ item }}
</n-dropdown-item>
</n-dropdown>
export default {
data () {
return {
items: ['item1longlonglong', 'item2longlonglong', 'item3longlonglong', 'item4longlonglong']
}
},
methods: {
handleClick (item) {
this.$NMessage.info(item)
}
}
}