div(class="field-item" v-if="data.label === 'Я ищу'")
input(type="radio" id="woman" v-model="data.value")
label(for="woman" class="label" :class="[data.value === 'Девушку' ? 'active' : false]") Девушку
<template lang="pug">
v-navigation-drawer(
right
:class="rightDrawer ? 'navigation-drawer--close' : false"
v-model="rightDrawer"
:permanent="permanent"
clipped
)
div {{ rightDrawer }}
</template>
<script>
import { eventBus } from '@/main'
export default {
data () {
return {
rightDrawer: true,
permanent: true
}
},
watch: {
rightDrawer: function (val) {
console.log(this.rightDrawer, val)
eventBus.$emit('SearchSwitch', val)
}
},
created () {
eventBus.$on('SearchSwitch', (drawer) => {
this.rightDrawer = drawer
})
}
}
</script>
<style lang="stylus">
</style>
export const HTTP = Vue.prototype.$http = axios
export const HTTP = axios.create({
baseURL: 'http://demo.fgdf.com/'
// })
document.addEventListener('click', function (e) {
var target = e.target;
while (target != document) {
if (target === dropdownList || target.parentNode === dropdownList || target.parentNode.parentNode === dropdownList) {
return;
}
if (target === dropdownBtn) {
toggle();
return;
}
if (target !== dropdownList) {
remove();
return;
}
target = target.parentNode;
}
});
<form class="filling-account" id="create-account" action="<?=Url::to(['site/filling'])?>" enctype="multipart/form-data" method="post">
<input type="hidden" name="_csrf" value="<?=Yii::$app->request->getCsrfToken()?>" />
<span class="filling-account__welcome">Добро пожаловать в Dating website!</span>
<div class="filling-account__form-field"><span>1. Загрузите фото</span>
<div class="filling-account__add-picture" id="dropbox">
<video class="video-stream" id="video">Video stream not available.</video>
<div class="make-photo__wrap">
<button class="take-photo" id="make-button">Сделать снимок</button>
</div>
<div class="take-photo__wrap">
<div class="take-photo" id="startbutton">Еще раз</div>
<div class="take-photo" id="applytbutton">Установить</div>
</div>
<canvas class="draw-photo" id="canvas"></canvas>
<div class="output"><img id="photo"></div>
<div class="output-input"><img id="photo"></div>
<div class="upload-wrap">
<p>Добавьте фото и получите 80% больше просмотров!</p>
<div class="btn-wrap">
<label class="add-something" for="uploadImage">
<svg class="icon icon-photo-camera">
<use xlink:href="/images/sprite.svg#photo-camera"></use>
</svg><span>Загрузить</span>
<input class="non-display" type="file" id="uploadImage" name="uploadImage">
</label>
<label class="add-something" id="use-webcam">
<svg class="icon icon-webcam">
<use xlink:href="/images/sprite.svg#webcam"></use>
</svg><span>Использовать<br/> вебкамеру</span>
</label>
</div>
<p>Или перетащите фото сюда</p>
</div>
</div>
</div>
<div class="filling-account__form-field"><span>2. Введите ваше имя</span>
<input type="text" placeholder="Alexander" name="name">
</div>
<div class="filling-account__form-field"><span>3. Выберите цель знакомства?</span>
<ul class="create-account__field-list">
<?php
$purp = ProfPurpose::find()->all();
foreach ($purp as $item):
?>
<li class="create-account__field-item">
<input class="checkbox" type="checkbox" id="<?=$item['id']?>" name="purpose" value="<?=$item['id']?>">
<label for="<?=$item['id']?>"><?=$item['title']?></label>
</li>
<?php endforeach;?>
</ul>
</div>
<div class="filling-account__form-field align-center">
<button class="submit" type="submit">Сохранить</button>
</div>
</form>
function savephoto() {
var utf8 = atob(picture),
// picture = canvas.toDataURL('image/png')..split(',')[1];
array = [];
for(var i = 0; i < utf8.length; i++)
array.push(utf8.charCodeAt(i));
var myBlob = new Blob([new Uint8Array(array)], {type: 'image/png'});
var file = new File([myBlob], 'user-photo')
console.log(file);
return(file);
}
а можете подсказать почему вот это возвращает boolean а не значение при клике?
я так понимаю чек или не чек