Skip to content

Commit

Permalink
docs(dao-tooltip): add demo2
Browse files Browse the repository at this point in the history
  • Loading branch information
yunyu950908 committed Sep 9, 2018
1 parent 98fc51f commit c68fb30
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/view/demos/tooltip/demo-2.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div>
<dao-tooltip
content="Right Center 提示文字"
placement="right"
:delay="delay">
<button class="dao-btn ghost">右边 && 延迟 1000 ms</button>
</dao-tooltip>
</div>
</template>

<script>
export default {
data() {
return {
delay: 1000,
};
},
};
</script>
14 changes: 14 additions & 0 deletions examples/view/page/components/tooltip/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,28 @@
</demo-code>
</template>
</docs-section>
<docs-section>
<template slot="title">添加延时</template>
<template slot="content">
<demo-code>
<demo2 slot="demo"></demo2>
<code-reader slot="code" file="tooltip/demo-2.vue"></code-reader>
<md-reader slot="desc">
通过 `delay` 参数传入延时,控制多长时间显示提示文字。
</md-reader>
</demo-code>
</template>
</docs-section>
</div>
</template>
<script>
import Demo1 from '@demos/tooltip/demo-1';
import Demo2 from '@demos/tooltip/demo-2';
export default {
components: {
Demo1,
Demo2,
},
data() {
return {};
Expand Down

0 comments on commit c68fb30

Please sign in to comment.