fixed #433
This commit is contained in:
parent
ca13135480
commit
acb79ba30e
8 changed files with 97 additions and 11 deletions
|
@ -15,6 +15,7 @@
|
|||
:transfer="transfer">
|
||||
<slot name="input">
|
||||
<i-input
|
||||
:element-id="elementId"
|
||||
ref="input"
|
||||
slot="input"
|
||||
v-model="currentValue"
|
||||
|
@ -85,6 +86,9 @@
|
|||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<input type="hidden" :name="name" :value="currentValue">
|
||||
<slot>
|
||||
<i-input
|
||||
:element-id="elementId"
|
||||
ref="input"
|
||||
:readonly="!filterable"
|
||||
:disabled="disabled"
|
||||
|
@ -131,6 +132,9 @@
|
|||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<div ref="reference" :class="[prefixCls + '-rel']">
|
||||
<slot>
|
||||
<i-input
|
||||
:element-id="elementId"
|
||||
:class="[prefixCls + '-editor']"
|
||||
:readonly="!editable || readonly"
|
||||
:disabled="disabled"
|
||||
|
@ -202,6 +203,9 @@
|
|||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -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 () {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
</div>
|
||||
<div :class="inputWrapClasses">
|
||||
<input
|
||||
:id="elementId"
|
||||
:class="inputClasses"
|
||||
:disabled="disabled"
|
||||
autocomplete="off"
|
||||
|
@ -101,6 +102,9 @@
|
|||
},
|
||||
precision: {
|
||||
type: Number
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<i class="ivu-icon ivu-icon-load-c ivu-load-loop" :class="[prefixCls + '-icon', prefixCls + '-icon-validate']" v-if="!icon"></i>
|
||||
</transition>
|
||||
<input
|
||||
:id="elementId"
|
||||
:autocomplete="autocomplete"
|
||||
ref="input"
|
||||
:type="type"
|
||||
|
@ -30,8 +31,9 @@
|
|||
<div :class="[prefixCls + '-group-append']" v-if="append" v-show="slotReady"><slot name="append"></slot></div>
|
||||
</template>
|
||||
<textarea
|
||||
:autocomplete="autocomplete"
|
||||
v-else
|
||||
:id="elementId"
|
||||
:autocomplete="autocomplete"
|
||||
ref="textarea"
|
||||
:class="textareaClasses"
|
||||
:style="textareaStyles"
|
||||
|
@ -119,6 +121,9 @@
|
|||
return oneOf(value, ['on', 'off']);
|
||||
},
|
||||
default: 'off'
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<span :class="[prefixCls + '-placeholder']" v-show="showPlaceholder && !filterable">{{ localePlaceholder }}</span>
|
||||
<span :class="[prefixCls + '-selected-value']" v-show="!showPlaceholder && !multiple && !filterable">{{ selectedSingle }}</span>
|
||||
<input
|
||||
:id="elementId"
|
||||
type="text"
|
||||
v-if="filterable"
|
||||
v-model="query"
|
||||
|
@ -135,6 +136,9 @@
|
|||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
elementId: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue