div.sign-up__form-field
label(class="sign-up__label" @click="ref.gender.open()") {{ gender }}
app-modal(ref="gender")
choose-gender(v-model="gender")
authUser: {
id: null,
name: '',
age: null,
avatar: '',
photos: [],
country: '',
city: '',
iSearch: {
label: 'Я ищу',
value: ''
},
goalDating: {
label: 'Цели знакомства',
value: []
},
familyStatus: {
label: 'Семейное положение',
value: ''
},
sexOrientation: {
label: 'Сексуальная ориентация',
value: ''
},
bodyTape: {
label: 'Телосложение',
value: ''
},
colorHair: {
label: 'Цвет волос',
value: ''
},
growth: {
label: 'Рост',
value: null
},
colorEyes: {
label: 'Цвет глаз',
value: ''
},
income: {
label: 'Доход',
value: ''
},
language: {
label: 'Языки',
value: ''
}
}
ul(class="user-data__list" v-if="authUser")
li(class="user-data__item" v-for="data in authUser")
<template lang="pug">
v-navigation-drawer(
v-if="$route.path.indexOf('search') + 1"
right
v-model="drawerRight"
:permanent="permanent"
clipped
:class="rightDrawer ? 'navigation-drawer--close' : false"
)
div {{ drawerRight }}
</template>
<script>
import { eventBus } from '@/main'
export default {
data () {
return {
drawerRight: false,
permanent: true
}
},
watch: {
drawerRight: function (val) {
console.log(this.drawerRight)
eventBus.$emit('SearchSwitch-1', val)
}
},
created () {
eventBus.$on('SearchSwitch', (drawer) => {
console.log(drawer)
this.drawerRight = drawer
})
}
}
<template lang="pug">
v-toolbar(fixed class="toolbar")
v-toolbar-side-icon(@click.stop="openDrower")
v-toolbar-title
v-spacer
v-btn(icon v-if="$route.path.indexOf('search') + 1" @click.stop="openSearch")
span.icon-settings
</template>
<script>
import { eventBus } from '@/main'
export default {
data () {
return {
drawerRight: false
}
},
methods: {
openDrower () {
eventBus.$emit('DrowerSwitch', this.drawer = !this.drawer)
},
navigateToEditProfile () {
this.$router.push({name: 'MyProfileEdit'})
},
showAction () {
alert('Hi!')
},
openSearch () {
eventBus.$emit('SearchSwitch', this.drawerRight = !this.drawerRight)
}
},
created () {
eventBus.$on('DrowerSwitch', (val) => {
this.drawer = val
})
eventBus.$on('SearchSwitch-1', (val) => {
this.rightDrawer = val
})
}
}
</script>
div(class="field-item" v-for="item in goalsdating")
input(type="checkbox" id="item.id" true-value="item.title" false-value="" v-model="data.value[0]")
label(for="item.id" class="label" :class="[data.value[0] === 'item.title' ? 'cheked' : false]") {{ item.title }}