Checkbox WIP

This commit is contained in:
Xotic750 2018-01-18 20:32:20 +01:00
parent 5a3fe3ec62
commit 98252a9e15
2 changed files with 15 additions and 1 deletions

View file

@ -1,10 +1,14 @@
<template>
<label :class="wrapClasses">
<label
:class="wrapClasses"
@keydown.space.prevent="$el.click()"
tabindex="0">
<span :class="checkboxClasses">
<span :class="innerClasses"></span>
<input
v-if="group"
type="checkbox"
tabindex="-1"
:class="inputClasses"
:disabled="disabled"
:value="label"
@ -14,6 +18,7 @@
<input
v-if="!group"
type="checkbox"
tabindex="-1"
:class="inputClasses"
:disabled="disabled"
:checked="currentValue"
@ -115,6 +120,7 @@
},
methods: {
change (event) {
console.log(event);
if (this.disabled) {
return false;
}

View file

@ -236,6 +236,14 @@
font-size: @font-size-small;
display: inline-block;
margin-right: 8px;
outline: 0;
&:focus,
&:active {
& .@{checkbox-prefix-cls}-inner {
box-shadow: 0 0 0 2px fade(@primary-color, 20%);
}
}
&-disabled{
cursor: @cursor-disabled;
}