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