Form add show-message support
Form add show-message support
This commit is contained in:
parent
071506fc66
commit
6986d05501
4 changed files with 10 additions and 2 deletions
BIN
assets/iview.png
BIN
assets/iview.png
Binary file not shown.
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 164 KiB |
|
@ -3,7 +3,7 @@
|
||||||
<label :class="[prefixCls + '-label']" :style="labelStyles" v-if="label">{{ label }}</label>
|
<label :class="[prefixCls + '-label']" :style="labelStyles" v-if="label">{{ label }}</label>
|
||||||
<div :class="[prefixCls + '-content']" :style="contentStyles">
|
<div :class="[prefixCls + '-content']" :style="contentStyles">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<div transition="fade" :class="[prefixCls + '-error-tip']" v-if="validateState === 'error'">{{ validateMessage }}</div>
|
<div transition="fade" :class="[prefixCls + '-error-tip']" v-if="validateState === 'error' && showMessage && form.showMessage">{{ validateMessage }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -61,6 +61,10 @@
|
||||||
},
|
},
|
||||||
validateStatus: {
|
validateStatus: {
|
||||||
type: Boolean
|
type: Boolean
|
||||||
|
},
|
||||||
|
showMessage: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
inline: {
|
inline: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
showMessage: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<Icon type="ios-person-outline" slot="prepend"></Icon>
|
<Icon type="ios-person-outline" slot="prepend"></Icon>
|
||||||
</i-input>
|
</i-input>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item prop="password">
|
<Form-item prop="password" :show-message="false">
|
||||||
<i-input type="password" :value.sync="formInline.password" placeholder="Password">
|
<i-input type="password" :value.sync="formInline.password" placeholder="Password">
|
||||||
<Icon type="ios-locked-outline" slot="prepend"></Icon>
|
<Icon type="ios-locked-outline" slot="prepend"></Icon>
|
||||||
</i-input>
|
</i-input>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue