2016-10-26 11:45:00 +08:00
|
|
|
|
<style>
|
|
|
|
|
.tooltip_out{
|
2016-10-26 14:43:10 +08:00
|
|
|
|
padding: 150px;
|
2016-10-26 11:45:00 +08:00
|
|
|
|
}
|
|
|
|
|
body{
|
2016-10-26 12:04:40 +08:00
|
|
|
|
height: 1000px;
|
2016-10-26 11:45:00 +08:00
|
|
|
|
padding: 10px;
|
|
|
|
|
}
|
2016-10-27 11:45:21 +08:00
|
|
|
|
.api table{
|
|
|
|
|
font-family: Consolas,Menlo,Courier,monospace;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
border-spacing: 0;
|
|
|
|
|
empty-cells: show;
|
|
|
|
|
border: 1px solid #e9e9e9;
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-bottom: 24px;
|
|
|
|
|
}
|
|
|
|
|
.api table th{
|
|
|
|
|
background: #f7f7f7;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
color: #5c6b77;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
.api table td, .api table th{
|
|
|
|
|
border: 1px solid #e9e9e9;
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
2016-10-26 11:45:00 +08:00
|
|
|
|
</style>
|
2016-09-20 09:30:35 +08:00
|
|
|
|
<template>
|
2016-10-26 11:45:00 +08:00
|
|
|
|
<div class="tooltip_out">
|
2016-10-27 12:10:59 +08:00
|
|
|
|
<Poptip>
|
|
|
|
|
<a>click 激活</a>
|
|
|
|
|
<div slot="title"><i>自定义标题</i></div>
|
|
|
|
|
<div slot="content">
|
|
|
|
|
<a>关闭提示框</a>
|
|
|
|
|
</div>
|
|
|
|
|
</Poptip>
|
2016-10-27 11:45:21 +08:00
|
|
|
|
<Poptip placement="right" width="300">
|
2016-10-28 17:24:52 +08:00
|
|
|
|
<i-button type="ghost">click 激活</i-button>
|
2016-10-27 11:45:21 +08:00
|
|
|
|
<div class="api" slot="content">
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>属性</th>
|
|
|
|
|
<th>说明</th>
|
|
|
|
|
<th>类型</th>
|
|
|
|
|
<th>默认值</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>content</td>
|
|
|
|
|
<td>显示的内容</td>
|
|
|
|
|
<td>String | Number</td>
|
|
|
|
|
<td>空</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>placement</td>
|
|
|
|
|
<td>提示框出现的位置,可选值为<code>top</code><code>top-start</code><code>top-end</code><code>bottom</code><code>bottom-start</code><code>bottom-end</code><code>left</code><code>left-start</code><code>left-end</code><code>right</code><code>right-start</code><code>right-end</code></td>
|
|
|
|
|
<td>String</td>
|
|
|
|
|
<td>bottom</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>disabled</td>
|
|
|
|
|
<td>是否禁用提示框</td>
|
|
|
|
|
<td>Boolean</td>
|
|
|
|
|
<td>false</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>delay</td>
|
|
|
|
|
<td>延迟显示,单位毫秒</td>
|
|
|
|
|
<td>Number</td>
|
|
|
|
|
<td>0</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</Poptip>
|
2016-10-27 10:30:32 +08:00
|
|
|
|
<!--<Poptip title="标题" content="内容">-->
|
|
|
|
|
<!--<Button>click 触发</Button>-->
|
|
|
|
|
<!--</Poptip>-->
|
|
|
|
|
<!--<Poptip title="标题" content="内容" trigger="hover">-->
|
|
|
|
|
<!--<Button>hover 触发</Button>-->
|
|
|
|
|
<!--</Poptip>-->
|
2016-10-27 11:24:13 +08:00
|
|
|
|
<Poptip title="确定删除这条信息吗?" confirm content="内容" trigger="focus" @on-ok="ok" @on-cancel="cancel">
|
|
|
|
|
<a><strong>Delete</strong></a>
|
2016-10-27 10:30:32 +08:00
|
|
|
|
</Poptip>
|
2016-10-27 11:24:13 +08:00
|
|
|
|
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
|
|
|
|
<!--<input type="text">-->
|
|
|
|
|
<!--</Poptip>-->
|
2016-10-27 10:30:32 +08:00
|
|
|
|
<!--<Poptip title="标题" content="内容" trigger="focus">-->
|
|
|
|
|
<!--<Button>focus 触发</Button>-->
|
|
|
|
|
<!--</Poptip>-->
|
2016-10-27 11:24:13 +08:00
|
|
|
|
<!--<Tooltip content="这里是提示文字">-->
|
|
|
|
|
<!--当鼠标经过这段文字时,会显示一个气泡框-->
|
|
|
|
|
<!--</Tooltip>-->
|
|
|
|
|
<Poptip>
|
|
|
|
|
<a>click 激活</a>
|
|
|
|
|
<div slot="content">
|
|
|
|
|
<a>关闭提示框</a>
|
|
|
|
|
</div>
|
|
|
|
|
</Poptip>
|
2016-10-26 12:04:40 +08:00
|
|
|
|
</div>
|
2016-09-20 09:30:35 +08:00
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2016-11-09 18:23:17 +08:00
|
|
|
|
import { Tooltip, iButton, Row, iCol, Poptip, iSelect, iOption, Message } from 'iview';
|
2016-09-20 09:30:35 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
2016-11-09 18:23:17 +08:00
|
|
|
|
components: { Tooltip, iButton, Row, iCol, Poptip, iSelect, iOption, Message },
|
2016-09-20 09:30:35 +08:00
|
|
|
|
props: {
|
2016-10-28 17:24:52 +08:00
|
|
|
|
|
2016-09-20 09:30:35 +08:00
|
|
|
|
},
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
2016-10-26 10:03:16 +08:00
|
|
|
|
|
2016-09-20 09:30:35 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
2016-10-28 17:24:52 +08:00
|
|
|
|
|
2016-09-20 09:30:35 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
2016-10-27 10:30:32 +08:00
|
|
|
|
ok () {
|
|
|
|
|
Message.info('ok');
|
|
|
|
|
},
|
|
|
|
|
cancel () {
|
|
|
|
|
Message.info('cancel');
|
|
|
|
|
}
|
2016-09-20 09:30:35 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-28 17:24:52 +08:00
|
|
|
|
</script>
|