naive-ui/demo/documentation/components/popover/enUS/trigger.md

45 lines
896 B
Markdown
Raw Normal View History

# Trigger
```html
<n-popover placement="bottom" trigger="hover" style="margin-right: 12px;">
<template v-slot:activator>
2020-01-30 17:38:14 +08:00
<n-button>Hover</n-button>
</template>
<span>
I wish they all could be California girls
</span>
</n-popover>
2020-01-22 16:29:34 +08:00
<n-popover :show="showPopover" placement="bottom" trigger="manual">
<template v-slot:activator>
<n-button @click="showPopover = !showPopover">
2020-01-30 17:38:14 +08:00
Manual
</n-button>
</template>
<span>
I wish they all could be California girls
</span>
</n-popover>
<n-popover placement="bottom" trigger="click" style="margin-right: 12px;">
<template v-slot:activator>
<n-button>
2020-01-30 17:38:14 +08:00
Click
</n-button>
</template>
<span>
I wish they all could be California girls
</span>
</n-popover>
```
```js
export default {
data() {
return {
showPopover: false
2020-01-22 16:29:34 +08:00
}
}
2020-01-22 16:29:34 +08:00
}
```
```css
.n-button {
margin: 0 12px 8px 0;
}
```