element icon indicating copy to clipboard operation
element copied to clipboard

How to combine tab components with Tooltip components for mouse movements Tab Tips

Open dweep119 opened this issue 8 years ago • 5 comments

Element UI version

1.4.1

OS/Browsers version

Ubuntu 16.04 / Google Chrome Version 60.0.3112.90 (Official Build) (64-bit)

Vue version

2.5.13

Reproduction Link

https://jsfiddle.net/xngx7hh8/

Steps to reproduce

In given Reproduction link, when mouse hover on tab it change the text color and shows the clear icon. Now you just need to add Tooltip option on mouse hover. I want to use Tab component and Tooltip component together. If client hover the tabpane label it shows the tooltip like, Sublime and Atom Editor do.

What is Expected?

I want to use Tab component and Tooltip component together. If client hover the tabpane label it shows the tooltip like, Sublime and Atom Editor.

What is actually happening?

Right now I am not able to use Tooltip component in Tab component.

dweep119 avatar Jan 18 '18 07:01 dweep119

Hi, your JSFiddle page is blank because it seems you forgot to click the Save button. Please save your fiddle and then edit this issue with the new link.

element-bot avatar Jan 18 '18 07:01 element-bot

@element-bot .... Fiddle seems to be working for me.. issue1

neogn95 avatar Jan 18 '18 16:01 neogn95

@dweep119 It seems that elements which are dynamically generated based on data cannot be nested within another component like <el-tooltip>. Looking for a solution myself

neogn95 avatar Jan 18 '18 17:01 neogn95

Tabs provide scoped slot label, Just put el-tooltip in the slot. A demo here: https://jsfiddle.net/xngx7hh8/2/

furybean avatar Jan 19 '18 02:01 furybean

Yeah It works for me. Thanks @furybean.

dweep119 avatar Jan 19 '18 04:01 dweep119