Skip to content

Commit 61f8ec1

Browse files
author
raj kamal
committed
added <slot> tag in appropriate palces to html data to pass easily
1 parent 438c0f7 commit 61f8ec1

File tree

6 files changed

+21
-9
lines changed

6 files changed

+21
-9
lines changed

src/Aside.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
<div class="aside-content">
1212
<div class="aside-header">
1313
<button type="button" class="close" @click='close'><span>&times;</span></button>
14-
<h4 class="aside-title">{{header}}</h4>
14+
<h4 class="aside-title">
15+
<slot name="header">
16+
{{ header }}
17+
</slot>
18+
</h4>
1519
</div>
1620
<div class="aside-body">
1721
<slot></slot>

src/Modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<slot name="modal-header">
1313
<div class="modal-header">
1414
<button type="button" class="close" @click="close"><span>&times;</span></button>
15-
<h4 class="modal-title" >{{title}}</h4>
15+
<h4 class="modal-title" > <slot name="title"{{title}}></slot></h4>
1616
</div>
1717
</slot>
1818
<slot name="modal-body">

src/Panel.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<h4 class="panel-title">
55
<a class="accordion-toggle"
66
@click="toggleIsOpen()">
7-
{{ header }}
7+
<slot name="header">
8+
{{ header }}
9+
</slot>
810
</a>
911
</h4>
1012
</div>

src/Popover.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
v-show="show"
1515
:transition="effect">
1616
<div class="arrow"></div>
17-
<h3 class="popover-title" v-show="title">{{title}}</h3>
17+
<h3 class="popover-title" v-show="title"> <slot name="title">{{title}} </slot> </h3>
1818
<div class="popover-content">
19-
{{{content}}}
19+
<slot name="content"> {{{content}}} </slot>
2020
</div>
2121
</div>
2222
</template>

src/Tabset.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
@click.prevent="handleTabListClick($index, r)"
1212
:disabled="r.disabled"
1313
>
14-
<a href="#">{{{r.header}}}</a>
14+
<a href="#">
15+
<slot name="header">
16+
{{{r.header}}}
17+
</slot>
18+
</a>
1519
</li>
1620
</ul>
1721

1822
<!-- Tab panes -->
19-
<div class="tab-content" v-el:tabContent>
23+
<div class="tab-content" v-el:tab-content>
2024
<slot></slot>
2125
</div>
2226
</div>

src/Tooltip.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
role="tooltip">
1717
<div class="tooltip-arrow"></div>
1818
<div class="tooltip-inner">
19-
{{{content}}}
20-
</div>
19+
<slot name="content">
20+
{{{content}}}
21+
</slot>
22+
</div>
2123
</div>
2224
</template>
2325

0 commit comments

Comments
 (0)