Skip to content

Commit 446b46b

Browse files
committed
Integrated new feature in demo
1 parent 3d5494c commit 446b46b

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

demo/App.vue

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
A Vue Component
2828
<span class="is-pulled-right">
2929
<!-- Place this tag where you want the button to render. -->
30-
<a class="github-button" href="https://github.com/PygmySlowLoris/vue-fab" data-icon="octicon-star" data-size="large" aria-label="Star PygmySlowLoris/vue-fab on GitHub">Star</a>
30+
<a class="github-button" href="https://github.com/PygmySlowLoris/vue-fab" data-icon="octicon-star" data-size="large"
31+
aria-label="Star PygmySlowLoris/vue-fab on GitHub">Star</a>
3132
</span>
3233
</h2>
3334
</div>
@@ -52,7 +53,7 @@
5253
</div>
5354
<div class="content">
5455
<div class="columns">
55-
<div class="column is-5" style="display: flex; justify-content: center">
56+
<div class="column is-4" style="display: flex; justify-content: center">
5657
<div class="field is-pulled-left">
5758
<label class="label">Color</label>
5859
<p class="control">
@@ -93,9 +94,20 @@
9394
</span>
9495
</p>
9596
</div>
97+
<div class="field has-text-left">
98+
<label class="label">Tooltip event</label>
99+
<p class="control is-expandend">
100+
<span class="select is-fullwidth">
101+
<select v-model="tooltipEvent">
102+
<option v-for="type in tooltipEvents">{{type}}</option>
103+
</select>
104+
</span>
105+
</p>
106+
</div>
96107
</div>
97108
</div>
98-
<label class="label" style="display: flex; align-items: center; padding-right: 1rem;">
109+
<label class="label"
110+
style="display: flex; align-items: center; padding-right: 1rem;">
99111
Main Icon & Tooltip
100112
</label>
101113
<div class="field is-horizontal">
@@ -112,7 +124,8 @@
112124
</div>
113125
</div>
114126
</div>
115-
<label class="label" style="display: flex; align-items: center; padding-right: 1rem;">
127+
<label class="label"
128+
style="display: flex; align-items: center; padding-right: 1rem;">
116129
First Icon & Tooltip
117130
</label>
118131
<div class="field is-horizontal">
@@ -129,7 +142,8 @@
129142
</div>
130143
</div>
131144
</div>
132-
<label class="label" style="display: flex; align-items: center; padding-right: 1rem;">
145+
<label class="label"
146+
style="display: flex; align-items: center; padding-right: 1rem;">
133147
Second Icon & Tooltip
134148
</label>
135149
<div class="field is-horizontal">
@@ -183,6 +197,7 @@
183197
:main-tooltip="mainTooltip"
184198
:actions="[{name: 'alertMe',icon: firstIcon, tooltip: firstTooltip, color:'#d11014'},{name: 'alertMe',icon: secondIcon, tooltip: secondTooltip}]"
185199
@alertMe="alert"
200+
:fixed-tooltip="fixedTooltip"
186201
></fab>
187202
</div>
188203
</template>
@@ -237,13 +252,18 @@
237252
'fixed',
238253
'absolute'
239254
],
255+
tooltipEvents: [
256+
'hover',
257+
'fixed'
258+
],
240259
sizes: [
241260
'small',
242261
'medium',
243262
'large'
244263
],
245264
position: 'bottom-right',
246265
positionType: 'fixed',
266+
tooltipEvent: 'hover',
247267
iconSizes: 'medium',
248268
colors: defaultProps,
249269
mainIcon: 'add',
@@ -254,6 +274,11 @@
254274
secondTooltip: 'add_alert'
255275
}
256276
},
277+
computed: {
278+
fixedTooltip() {
279+
return this.tooltipEvent === 'fixed';
280+
}
281+
},
257282
methods: {
258283
alert(){
259284
alert('You have clicked me :)');
@@ -287,7 +312,6 @@
287312
border-top: dashed 1px;
288313
}
289314
290-
291315
li {
292316
display: inline-block;
293317
margin: 0 10px;
@@ -329,7 +353,8 @@
329353
}
330354
331355
.vertical-separator {
332-
display: flex; justify-content: space-around;
356+
display: flex;
357+
justify-content: space-around;
333358
}
334359
335360
.vertical-separator .line {

0 commit comments

Comments
 (0)