提取 vc-tooltip

pull/165/head
wangxueliang 2018-03-14 14:28:54 +08:00
parent d38b1bc595
commit d86384a923
6 changed files with 8 additions and 8 deletions

View File

@ -127,4 +127,4 @@ export default {
)
},
}
</script>
</script>

View File

@ -201,4 +201,4 @@ export default {
)
},
}
</script>
</script>

View File

@ -1,6 +1,6 @@
<script>
import { cloneElement } from '../_util/vnode'
import RcTooltip from './src/Tooltip'
import VcTooltip from '../vc-tooltip'
import getPlacements from './placements'
import PropTypes from '../_util/vue-types'
import { hasProp, getComponentFromProp, getClass, getStyle, isValidElement } from '../_util/props-util'
@ -175,12 +175,12 @@ export default {
},
}
return (
<RcTooltip {...tooltipProps}>
<VcTooltip {...tooltipProps}>
<template slot='overlay'>
{getComponentFromProp(this, 'title')}
</template>
{sVisible ? cloneElement(child, { class: childCls }) : child}
</RcTooltip>
</VcTooltip>
)
},
}

View File

@ -1,8 +1,8 @@
<script>
import PropTypes from '../../_util/vue-types'
import Trigger from '../../trigger'
import PropTypes from '../_util/vue-types'
import Trigger from '../trigger'
import { placements } from './placements'
import { hasProp, getComponentFromProp } from '../../_util/props-util'
import { hasProp, getComponentFromProp } from '../_util/props-util'
function noop () {}
export default {
props: {