Skip to content

Commit 47de817

Browse files
committed
Fixed b-button-radio issues
1 parent 6a70fba commit 47de817

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

components/button-radio.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="btn-group" data-toggle="buttons">
3-
<label :class="{btn:true,btnVariant,btnSize,disabled:item.disabled,active:selection == item.value}"
3+
<label :class="['btn', btnVariant, btnSize, {disabled:item.disabled, active:selection == item.value}]"
44
v-for="item in list">
55
<input
66
type="radio"
@@ -19,6 +19,7 @@
1919
data() {
2020
return {
2121
selection: '',
22+
model: {}
2223
}
2324
},
2425
computed: {
@@ -33,9 +34,6 @@
3334
},
3435
},
3536
props: {
36-
model: {
37-
required: true
38-
},
3937
list: {
4038
type: Array,
4139
default: [],
@@ -59,7 +57,7 @@
5957
handler() {
6058
// set the model based on selection
6159
if (this.returnObject) {
62-
this.list.forEach(function (item) {
60+
this.list.forEach( (item) => {
6361
if (item.value === this.selection)
6462
this.model = item
6563
})

0 commit comments

Comments
 (0)