Akryum / Akryum/floating-vue

Can't trigger on click, getting [object Object] for content

未關閉
#185 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
cannot-reproduce
主要語言
TypeScript
星號
3.5k
分支
341
平均合併
14 分鐘
30 天內合併 PR
8

描述

Hi, hope someone can help me please. I can get the hover working, but I can't get this to work using multiple options with an object to enable trigger: 'click'

I am trying to combine v-tooltip with v-clipboard:copy - which could make for a great integration of packages btw. When the user clicks a button, the text on :copy is copied to the keyboard, and the user should get a tooltip.

In my app.js file,

```
import VueClipboard from 'vue-clipboard2';
Vue.use(VueClipboard); // this works.

import VTooltip from 'v-tooltip'
Vue.directive('v-tooltip', VTooltip); // default hover works for me but breaks down when I pass an object into v-tooltip instead of =" 'Text' "
```

// component
```
Copy URL

```

I am also importing all of the styling in the .vue file where I am implementing this action.

With this approach I get the following error

![screen shot 2019-02-05 at 16 08 49](https://user-images.githubusercontent.com/25985241/52286703-941c6980-2960-11e9-9f41-15462e020db4.png)

1. Click does not work
2. Text still shows on hover
3. [object Object] is shown instead of the value of content: 'Copied'

What am I doing wrong? How can an object be passed and triggered on click?

Many thanks.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。