
#  Tooltip 文字提示
---
### 基础用法

<div class="demo-block">
 <y-tooltip content="我是提示内容我是一段文字,我是一段文字" trigger="hover">
  <p>鼠标划过，我是一段文字</p>
</y-tooltip>
</div>


::: demo

``` html
<template>
  <y-tooltip  content="我是提示内容我是一段文字,我是一段文字" trigger="hover">
  <p>鼠标划过，我是一段文字</p>
</y-tooltip>
</template>

```
:::


### 不同的位置用法
* ```placement```属性可以有12种不同的提示位置显示
* ```top-left```,```top```,```top-right```,上左，上中，上右
* ```right-top```,```right```,```right-bottom```,右上，右中，右下
* ```bottom-left```,```bottom```,```bottom-right```,下左，下中，下右
* ```left-top```,```left```,```left-bottom```,左上，左中，左下


<div class="demo-block">

<div style="width:450px;">
  <div style="text-align:center;margin-bottom:20px;">
    <y-tooltip  content="我是提示内容" placement="top-left">
        <y-button type="assist">上左</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="top" style="margin:0 15px">
        <y-button type="assist">上中</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="top-right">
        <y-button type="assist">上右</y-button>
    </y-tooltip>
  </div>

  <div style="width:74px; float:right">
    <y-tooltip  content="我是提示内容" placement="right-top">
        <y-button type="assist">右上</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="right" style="margin:15px 0">
        <y-button type="assist">右中</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="right-bottom">
        <y-button type="assist">右下</y-button>
    </y-tooltip>
  </div>
  <div  style="width:74px; float:left">
    <y-tooltip  content="我是提示内容" placement="left-top">
        <y-button type="assist">左上</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="left" style="margin:15px 0">
        <y-button type="assist">左中</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="left-bottom">
        <y-button type="assist">左下</y-button>
    </y-tooltip>
  </div>
  <div style="clear:both;text-align:center;padding-top:20px">
    <y-tooltip  content="我是提示内容" placement="bottom-left">
        <y-button type="assist">下左</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="bottom" style="margin:0 15px">
        <y-button type="assist">下中</y-button>
    </y-tooltip>
    <y-tooltip  content="我是提示内容" placement="bottom-right">
        <y-button type="assist">下右</y-button>
    </y-tooltip>
  </div>
</div>

</div>


::: demo

``` html
<template>
  <y-tooltip  content="我是提示内容我是一段文字,我是一段文字" trigger="hover">
  <p>鼠标划过，我是一段文字</p>
</y-tooltip>
</template>

```
:::

###  属性说明
| 属性      | 说明     | 类型      | 可选值        | 默认值   |
|---------- |--------  |---------- |-------------  |-------- |
|trigger|触发方式|String|hover（悬停）click（点击）|hover|
|placement|位置|String|top，top-left，top-right，bottom，bottom-left，bottom-right，left，left-top，left-bottom，right，right-top，right-bottom|top|
|content|提示的内容|String|--|h--|

