5
5
<strong >You have 13 notifications</strong >
6
6
</div >
7
7
<b-button-group id =" notification-b-buttons" >
8
- <b-button variant =" default" @click =" changeNotificationsTab(1)" >Notifications</b-button >
9
- <b-button variant =" default" @click =" changeNotificationsTab(2)" >Messages</b-button >
10
- <b-button variant =" default" @click =" changeNotificationsTab(3)" >Progress</b-button >
8
+ <b-button variant =" default" @click =" changeNotificationsTab(1)"
9
+ >Notifications</b-button
10
+ >
11
+ <b-button variant =" default" @click =" changeNotificationsTab(2)"
12
+ >Messages</b-button
13
+ >
14
+ <b-button variant =" default" @click =" changeNotificationsTab(3)"
15
+ >Progress</b-button
16
+ >
11
17
</b-button-group >
12
18
</header >
13
19
<NewNotifictionsList v-if =" newNotifications" />
14
20
<NotifictionsList v-else-if =" notificationsTabSelected === 1" />
15
21
<Messages v-else-if =" notificationsTabSelected === 2" />
16
22
<Progress v-else-if =" notificationsTabSelected === 3" />
17
- <NotifictionsList v-else />
23
+ <NotifictionsList v-else />
18
24
<footer class =" cardFooter text-sm card-footer" >
19
25
<span class =" fs-mini" >Synced at: 21 Apr 2014 18:36</span >
20
26
<b-button
21
27
variant =" link"
22
28
@click =" loadNotifications"
23
- :class =" {disabled: isLoad, 'btnNotificationsReload btn-xs float-right py-0': true}"
29
+ :class =" {
30
+ disabled: isLoad,
31
+ 'btnNotificationsReload btn-xs float-right py-0': true,
32
+ }"
24
33
>
25
- <span v-if =" isLoad" ><i class =" la la-refresh la-spin" /> Loading...</span >
34
+ <span v-if =" isLoad"
35
+ ><i class =" la la-refresh la-spin" /> Loading...</span
36
+ >
26
37
<i v-else class =" la la-refresh" />
27
38
</b-button >
28
39
</footer >
29
40
</section >
30
41
</template >
31
42
32
43
<script >
33
- import Vue from ' vue' ;
44
+ import Vue from " vue" ;
34
45
35
- import NotifictionsList from ' ./NotificationsDemo/NotificationsList' ;
36
- import NewNotifictionsList from ' ./NotificationsDemo/NewNotificationsList' ;
37
- import Messages from ' ./NotificationsDemo/Messages' ;
38
- import Progress from ' ./NotificationsDemo/Progress' ;
46
+ import NotifictionsList from " ./NotificationsDemo/NotificationsList" ;
47
+ import NewNotifictionsList from " ./NotificationsDemo/NewNotificationsList" ;
48
+ import Messages from " ./NotificationsDemo/Messages" ;
49
+ import Progress from " ./NotificationsDemo/Progress" ;
39
50
40
51
export default {
41
- name: ' Notification' ,
52
+ name: " Notification" ,
42
53
components: {
43
- NotifictionsList, NewNotifictionsList, Messages, Progress,
54
+ NotifictionsList,
55
+ NewNotifictionsList,
56
+ Messages,
57
+ Progress,
44
58
},
45
59
data () {
46
60
return {
@@ -51,15 +65,16 @@ export default {
51
65
},
52
66
methods: {
53
67
changeNotificationsTab (tab ) {
54
- Vue .set (this , ' notificationsTabSelected' , tab);
55
- Vue .set (this , ' newNotifications' , null );
68
+ Vue .set (this , " notificationsTabSelected" , tab);
69
+ Vue .set (this , " newNotifications" , null );
56
70
},
57
71
loadNotifications () {
58
- Vue .set (this , ' isLoad' , true );
72
+ Vue .set (this , " isLoad" , true );
59
73
60
74
setTimeout (() => {
61
- Vue .set (this , ' newNotifications' , ' new notifications component' );
62
- Vue .set (this , ' isLoad' , false );
75
+ Vue .set (this , " newNotifications" , " new notifications component" );
76
+ Vue .set (this , " isLoad" , false );
77
+ this .changeNotificationsTab (1 );
63
78
}, 1500 );
64
79
},
65
80
},
0 commit comments