Poptip & Tooltip add transfer prop

Using transfer prop, the dom will be transfered to body.
This commit is contained in:
梁灏 2017-07-18 17:46:41 +08:00
parent 1b737fdc83
commit fcf3cace8e
7 changed files with 68 additions and 65 deletions

View file

@ -1,6 +1,6 @@
<template>
<div>
<Poptip trigger="hover" title="提示标题" content="提示内容">
<Poptip trigger="hover" transfer title="提示标题" content="提示内容">
<Button>hover 激活</Button>
</Poptip>
<Poptip title="提示标题" content="提示内容">

View file

@ -8,6 +8,7 @@
:data="data3"></Table>
</template>
<script>
import test from '../components/test.vue';
export default {
data () {
return {
@ -59,20 +60,7 @@
fixed: 'right',
width: 120,
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'text',
size: 'small'
}
}, '查看'),
h('Button', {
props: {
type: 'text',
size: 'small'
}
}, '编辑')
]);
return h(test);
}
}
],

View file

@ -1,7 +1,12 @@
<template>
<Tooltip placement="top" content="Tooltip 文字提示" :delay="1000">
<Button @click="disabled = true">延时1秒显示</Button>
</Tooltip>
<div>
<Tooltip placement="top" transfer content="Tooltip 文字提示" :delay="1000">
<Button @click="disabled = true">延时1秒显示</Button>
</Tooltip>
<Tooltip placement="top" transfer content="Tooltip 文字提示">
<Button @click="disabled = true">延时1秒显示</Button>
</Tooltip>
</div>
</template>
<script>
export default {