|
183 | 183 | v-for="option in options"
|
184 | 184 | :key="option"
|
185 | 185 | :label="option"
|
186 |
| - :type="[0,1,4,5].includes(key) ? 'radio' : 'checkbox'" |
187 | 186 | :value="option"
|
188 |
| - :custom="key > 3" |
| 187 | + :custom="key > 1" |
189 | 188 | :name="`Option 1${key}`"
|
190 |
| - :checked="[0,1,4,5].includes(key) ? |
191 |
| - `Option 1` : Math.random() > 0.6" |
| 189 | + :checked="Math.random() > 0.6" |
| 190 | + :class="key % 2 === 1 ? 'form-check-inline' : ''" |
| 191 | + /> |
| 192 | + </CCol> |
| 193 | + </div> |
| 194 | + </template> |
| 195 | + <template v-for="(name, key) in radioNames"> |
| 196 | + <div class="form-row form-group" :key="name"> |
| 197 | + <CCol sm="3"> |
| 198 | + {{name}} |
| 199 | + </CCol> |
| 200 | + <CCol sm="9" :class="key % 2 === 1 ? 'form-inline' : ''"> |
| 201 | + <CFormRadio |
| 202 | + v-for="(option, optKey) in options" |
| 203 | + :key="option" |
| 204 | + :label="option" |
| 205 | + type="radio" |
| 206 | + :value="option" |
| 207 | + :custom="key > 1" |
| 208 | + :name="`Option 1${key}`" |
| 209 | + checked="Option 1" |
192 | 210 | :class="key % 2 === 1 ? 'form-check-inline' : ''"
|
193 | 211 | />
|
194 | 212 | </CCol>
|
|
203 | 221 | horizontal
|
204 | 222 | multiple
|
205 | 223 | />
|
| 224 | + <CFormFile |
| 225 | + label="File custom input" |
| 226 | + horizontal |
| 227 | + custom |
| 228 | + /> |
| 229 | + <CFormFile |
| 230 | + label="Multiple file custom input" |
| 231 | + horizontal |
| 232 | + multiple |
| 233 | + custom |
| 234 | + /> |
206 | 235 | </CForm>
|
207 | 236 | </CCardBody>
|
208 | 237 | <CCardFooter>
|
|
778 | 807 | </template>
|
779 | 808 | </CFormInput>
|
780 | 809 | <CFormInput label="Two-buttons append">
|
781 |
| - <template v-slot:append> |
| 810 | + <template #append> |
782 | 811 | <CButton variant="primary">Search</CButton>
|
783 | 812 | <CButton variant="danger">Options</CButton>
|
784 | 813 | </template>
|
@@ -815,10 +844,10 @@ export default {
|
815 | 844 | horizontal: { label:'col-3', input:'col-9' },
|
816 | 845 | options: ['Option 1', 'Option 2', 'Option 3'],
|
817 | 846 | formCollapsed: true,
|
818 |
| - checkboxNames: ['Radios', 'Inline Radios', |
819 |
| - 'Checkboxes', 'Inline Checkboxes', |
820 |
| - 'Radios - custom', 'Inline Radios - custom', |
821 |
| - 'Checkboxes - custom', 'Inline Checkboxes - custom'] |
| 847 | + checkboxNames: ['Checkboxes', 'Inline Checkboxes', |
| 848 | + 'Checkboxes - custom', 'Inline Checkboxes - custom'], |
| 849 | + radioNames: ['Radios', 'Inline Radios', |
| 850 | + 'Radios - custom', 'Inline Radios - custom'] |
822 | 851 | }
|
823 | 852 | },
|
824 | 853 | updated () {
|
|
0 commit comments