File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ <template lang="pug">
2
+ v-layout( row wrap )
3
+ v-flex( xs6 offset-xs3 )
4
+
5
+ v-toolbar( dark color ="secondary" )
6
+ v-toolbar-title Чат
7
+
8
+ v-card( class ="pa-0" )
9
+ v-container( fluid class ="pa-3" )
10
+ v-layout( row wrap )
11
+ ul
12
+ li( v-for ="message in messages" )
13
+ span( class ="indigo--text username" ) {{message.name}}
14
+ span( class ="grey--text text--darken-2" ) {{message.text}}
15
+ span( class ="grey--text text--lighten-1 time" ) {{message.time}}
16
+ v-divider
17
+ v-card-actions( class ="pa-3" )
18
+ v-text-field( v-model ="message_field"
19
+ hide-details
20
+ placeholder ="Введите сообщение" )
21
+
22
+ </template >
23
+
24
+ <script >
25
+ export default {
26
+ name: ' Chat' ,
27
+ data () {
28
+ return {
29
+ message_field: null ,
30
+ messages: [
31
+ {
32
+ id: 1 ,
33
+ name: ' Mikhail' ,
34
+ text: ' Hello!' ,
35
+ time: 1239849824
36
+ },
37
+ {
38
+ id: 2 ,
39
+ name: ' Pavel' ,
40
+ text: ' Hi!' ,
41
+ time: 1239849874
42
+ },
43
+ {
44
+ id: 3 ,
45
+ name: ' Pavel' ,
46
+ text: ' How are you?' ,
47
+ time: 1239849899
48
+ }
49
+ ]
50
+ }
51
+ }
52
+
53
+ }
54
+ </script >
55
+
56
+ <style scoped>
57
+ li {
58
+ list-style-type : none ;
59
+ }
60
+ span {
61
+ font-size : 1.2em ;
62
+ }
63
+ .username {
64
+ font-weight : 700 ;
65
+ padding : 0 10px ;
66
+ }
67
+ .time {
68
+ display : block ;
69
+ font-size : 0.8em ;
70
+ }
71
+ </style >
You can’t perform that action at this time.
0 commit comments