This repository was archived by the owner on Apr 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathChoiceFieldGroup.vue
47 lines (44 loc) · 1.84 KB
/
ChoiceFieldGroup.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
<docs-content title='ChoiceFieldGroup'>
<div slot='Overview' v-html='overviewContent'></div>
<div slot='Variants'>
<docs-code-block title='Default ChoiceFieldGroup' :code='defaultCode'>
<ou-choice-field-group v-model='choiceField'>
<ou-label required slot='title'>Unselected</ou-label>
<ou-choice-field :value='1'>Option 1</ou-choice-field>
<ou-choice-field :value='2'>Option 2</ou-choice-field>
<ou-choice-field :value='3' disabled>Option 3</ou-choice-field>
<ou-choice-field :value='4'>Option 4</ou-choice-field>
</ou-choice-field-group>
</docs-code-block>
</div>
<div slot='Implementation'>
<docs-table type='props' :data='choiceFieldGroupProps' name='ChoiceFieldGroup' />
<docs-table type='props' :data='choiceFieldProps' name='ChoiceField' />
<docs-table type='slot' :data='choiceFieldGroupSlot' name='ChoiceFieldGroup' />
</div>
</docs-content>
</template>
<script>
import overviewContent from '../markdown/choice_field_group/overview.md';
import defaultCode from '../markdown/choice_field_group/defaultCode.md';
export default {
data() {
return {
overviewContent,
choiceField: 2,
defaultCode,
choiceFieldGroupProps: [
{ name: 'v-model', type: 'String, Number', required: 'false', description: 'bind value to the ChoiceFieldGroup' }
],
choiceFieldProps: [
{ name: 'value', type: 'String, Number', required: 'false', description: 'the value for the ChoiceField' },
{ name: 'disabled', type: 'Boolean', required: 'false', defaultValue: 'false', description: 'if the ChoiceField is disabled' }
],
choiceFieldGroupSlot: [
{ name: 'title', description: 'the title for the ChoiceFieldGroup' },
]
};
}
};
</script>