naive-ui/demo/documentation/components/tooltip/enUS/trigger.md
2020-01-30 17:38:14 +08:00

854 B

Trigger

<n-tooltip placement="bottom" trigger="hover">
  <template v-slot:activator>
    <n-button>
      Hover
    </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>
      Click
    </n-button>
  </template>
  <span>
    I wish they all could be California girls
  </span>
</n-tooltip>
<n-tooltip :show="showPopover" placement="bottom" trigger="manual">
  <template v-slot:activator>
    <n-button @click="showPopover = !showPopover">
      Manual
    </n-button>
  </template>
  <span>
    I wish they all could be California girls
  </span>
</n-tooltip>
export default {
  data() {
    return {
      showPopover: false
    };
  }
};
.n-button {
  margin: 0 12px 8px 0;
}