fixed #433
This commit is contained in:
parent
ca13135480
commit
acb79ba30e
8 changed files with 97 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :class="classes">
|
||||
<label :class="[prefixCls + '-label']" :style="labelStyles" v-if="label || $slots.label"><slot name="label">{{ label }}</slot></label>
|
||||
<label :class="[prefixCls + '-label']" :for="labelFor" :style="labelStyles" v-if="label || $slots.label"><slot name="label">{{ label }}</slot></label>
|
||||
<div :class="[prefixCls + '-content']" :style="contentStyles">
|
||||
<slot></slot>
|
||||
<transition name="fade">
|
||||
|
@ -10,8 +10,6 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// https://github.com/ElemeFE/element/blob/dev/packages/form/src/form-item.vue
|
||||
|
||||
import AsyncValidator from 'async-validator';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
|
||||
|
@ -70,6 +68,9 @@
|
|||
showMessage: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
labelFor: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue