-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
48 lines (48 loc) · 1.31 KB
/
index.js
File metadata and controls
48 lines (48 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import Vue from 'vue';
import VeeValidate from 'vee-validate';
Vue.use(VeeValidate); // good to go.
var app = new Vue({
el: '#app',
data: {
isVisible: false,
isVisibleDoctor: false,
activeForma: 'you',
activeButtonStyles: {
you: true,
adress: false,
passport: false,
},
changeActiveButton: {
'border-bottom':'none',
'height': '75px',
},
selectedOptions: []
},
methods: {
switchForma(formName) {
this.activeForma = formName
},
selectStyle(buttonKey) {
for (let key in this.activeButtonStyles) {
this.activeButtonStyles[key] = false
}
this.activeButtonStyles[buttonKey] = true
},
validateForm(scope) {
this.$validator.validateAll(scope).then((result) => {
if (result) {
// eslint-disable-next-line
alert('Форма успешно заполнена и все важные поля заполнены!!');
}
});
}
},
computed: {
selectedLabels() {
return this.selectedOptions.join(', ')
}
},
mounted() {
Validator.localize('ru', ru);
}
});