Skip to content

Commit 8670933

Browse files
VdustRSamuell1
authored andcommitted
feat(MdRadio): object support (#1771)
fix #1753
1 parent 04a4751 commit 8670933

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/app/pages/Components/Radio/Radio.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
props: [
3838
{
3939
name: 'value',
40-
type: 'String|Number|Boolean',
40+
type: 'String|Number|Boolean|Object',
4141
description: 'The value of the radio',
4242
defaults: 'on'
4343
},
4444
{
4545
name: 'v-model',
46-
type: 'String|Number|Boolean',
46+
type: 'String|Number|Boolean|Object',
4747
description: 'The model variable to bind the selection value. If no value is assigned, then it will use the same behaviour of a regular input[type="radio"].',
4848
defaults: 'null'
4949
},

docs/app/pages/Components/Radio/examples/RegularRadio.vue

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<div>
33
<md-radio v-model="radio" :value="false">Boolean</md-radio>
44
<md-radio v-model="radio" value="my-radio">String</md-radio>
5+
<md-radio v-model="radio" :value="objA">Object A</md-radio>
6+
<md-radio v-model="radio" :value="objB">Object B</md-radio>
57
<md-radio v-model="radio">No Value</md-radio>
68
<md-radio v-model="radio" disabled>Disabled</md-radio>
79

@@ -13,6 +15,8 @@
1315
export default {
1416
name: 'RegularRadio',
1517
data: () => ({
18+
objA: { name: 'a' },
19+
objB: { name: 'b' },
1620
radio: false
1721
})
1822
}

src/components/MdRadio/MdRadio.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
MdRipple
2424
},
2525
props: {
26-
model: [String, Number, Boolean],
26+
model: [String, Number, Boolean, Object],
2727
value: {
28-
type: [String, Number, Boolean],
28+
type: [String, Number, Boolean, Object],
2929
default: 'on'
3030
},
3131
id: {

0 commit comments

Comments
 (0)