Remove click listener if disabled

This commit is contained in:
Jiiks 2018-01-22 22:07:19 +02:00
parent b90fda127d
commit 38776569ed
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@
/*Methods*/
function settingOnClick() {
console.log("setting on click");
}
const methods = { settingOnClick };

View File

@ -1,7 +1,7 @@
<div class="bd-setting-switch" :class="{'bd-disabled': disabled}">
<div class="bd-title">
<h3>{{setting.title || setting.text}}</h3>
<label class="bd-switch-wrapper" @click="onClick">
<label class="bd-switch-wrapper" @click="!disabled ? onClick() : null">
<input type="checkbox" class="bd-switch-checkbox"/>
<div class="bd-switch" :class="{'bd-checked': setting.checked}"/>
</label>