提取 vc-tooltip
parent
d38b1bc595
commit
d86384a923
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { cloneElement } from '../_util/vnode'
|
import { cloneElement } from '../_util/vnode'
|
||||||
import RcTooltip from './src/Tooltip'
|
import VcTooltip from '../vc-tooltip'
|
||||||
import getPlacements from './placements'
|
import getPlacements from './placements'
|
||||||
import PropTypes from '../_util/vue-types'
|
import PropTypes from '../_util/vue-types'
|
||||||
import { hasProp, getComponentFromProp, getClass, getStyle, isValidElement } from '../_util/props-util'
|
import { hasProp, getComponentFromProp, getClass, getStyle, isValidElement } from '../_util/props-util'
|
||||||
|
@ -175,12 +175,12 @@ export default {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<RcTooltip {...tooltipProps}>
|
<VcTooltip {...tooltipProps}>
|
||||||
<template slot='overlay'>
|
<template slot='overlay'>
|
||||||
{getComponentFromProp(this, 'title')}
|
{getComponentFromProp(this, 'title')}
|
||||||
</template>
|
</template>
|
||||||
{sVisible ? cloneElement(child, { class: childCls }) : child}
|
{sVisible ? cloneElement(child, { class: childCls }) : child}
|
||||||
</RcTooltip>
|
</VcTooltip>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import PropTypes from '../../_util/vue-types'
|
import PropTypes from '../_util/vue-types'
|
||||||
import Trigger from '../../trigger'
|
import Trigger from '../trigger'
|
||||||
import { placements } from './placements'
|
import { placements } from './placements'
|
||||||
import { hasProp, getComponentFromProp } from '../../_util/props-util'
|
import { hasProp, getComponentFromProp } from '../_util/props-util'
|
||||||
function noop () {}
|
function noop () {}
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
Loading…
Reference in New Issue