Skip to content

Commit

Permalink
chore(demo): use asyncContent with params
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 28, 2019
1 parent 707c439 commit 4abf7a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs-src/PageHome.vue
Expand Up @@ -81,7 +81,7 @@
<button
class="tooltip-target"
v-tooltip="{
content: asyncContent,
content: () => asyncContent('foo', 'bar'),
loadingContent: '<i>Loading...</i>',
}"
>Hover me</button>
Expand Down Expand Up @@ -643,10 +643,10 @@ export default {
}
},
asyncContent () {
asyncContent (...params) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(`Hi, I'm some content from a server! :)`)
resolve(`Hi, I'm some content from a server! :)<br>Params: ${params}`)
}, 2000)
})
},
Expand Down

0 comments on commit 4abf7a1

Please sign in to comment.