mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
726 B
726 B
Trigger
<n-popover trigger="hover">
<template v-slot:trigger>
<n-button>Hover</n-button>
</template>
<span> I wish they all could be California girls </span>
</n-popover>
<n-popover trigger="click">
<template v-slot:trigger>
<n-button> Click </n-button>
</template>
<span> I wish they all could be California girls </span>
</n-popover>
<n-popover :show="showPopover">
<template v-slot:trigger>
<n-button @click="showPopover = !showPopover"> Manual </n-button>
</template>
<span> I wish they all could be California girls </span>
</n-popover>
export default {
data() {
return {
showPopover: false
}
}
}
.n-button {
margin: 0 12px 8px 0;
}