File tree Expand file tree Collapse file tree 1 file changed +89
-0
lines changed
Expand file tree Collapse file tree 1 file changed +89
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <form id =" login-form" >
3+ <v-btn color =" normal" text dark @click =" dialog = true" >Login</v-btn >
4+ <v-layout row justify-center >
5+ <v-dialog
6+ v-model =" dialog"
7+ dark
8+ no-click-animation
9+
10+ max-width =" 600px"
11+ >
12+ <v-card >
13+ <v-form ref =" form" >
14+ <v-card-title >
15+ <span class =" headline" colour =" white" >Login</span >
16+ </v-card-title >
17+
18+ <v-card-text >
19+ <v-container grid-list-md >
20+ <v-layout wrap >
21+ <v-flex xs12 >
22+ <v-text-field
23+ v-model =" zid"
24+ :rules =" inputRules"
25+ label =" zID"
26+ required
27+ ></v-text-field >
28+ </v-flex >
29+
30+ <v-flex xs12 >
31+ <v-text-field
32+ :type =" show ? 'text' : 'password'"
33+ v-model =" password"
34+ @click:append =" show = !show"
35+ :rules =" inputRules"
36+ label =" zPass"
37+ required
38+ ></v-text-field >
39+ </v-flex >
40+ </v-layout >
41+ </v-container >
42+ </v-card-text >
43+
44+ <v-card-actions >
45+ <v-spacer ></v-spacer >
46+ <v-btn
47+ color =" blue darken-1"
48+ style =" min-width :100px ;min-height :50px ;"
49+ text
50+ @click =" dialog = false"
51+ >Close</v-btn
52+ >
53+ <v-btn
54+ color =" blue darken-1"
55+ style =" min-width :100px ;min-height :50px ;"
56+ text
57+ @click =" login"
58+ >Submit</v-btn
59+ >
60+ </v-card-actions >
61+ </v-form >
62+ </v-card >
63+ </v-dialog >
64+ </v-layout >
65+ </form >
66+ </template >
67+
68+ <script >
69+
70+ export default {
71+ data () {
72+ return {
73+ zid: ' ' ,
74+ password: ' ' ,
75+ dialog: false ,
76+ show: false ,
77+ inputRules: [
78+ v => v .trim () !== ' ' || ' You cannot leave this field empty' ,
79+ ],
80+ success: false ,
81+ };
82+ },
83+ methods: {
84+ login () {
85+ console .log (` Hi ${ this .zid } !` );
86+ },
87+ },
88+ };
89+ </script >
You can’t perform that action at this time.
0 commit comments