[Improvement] Field: add left-icon prop (#1092)

This commit is contained in:
neverland
2018-05-17 18:03:41 +08:00
committed by GitHub
parent e73e950662
commit 178b188439
5 changed files with 123 additions and 6 deletions
+4 -5
View File
@@ -1,5 +1,6 @@
<template>
<cell
:icon="leftIcon"
:title="label"
:center="center"
:border="border"
@@ -64,7 +65,9 @@ export default create({
label: String,
error: Boolean,
center: Boolean,
leftIcon: String,
required: Boolean,
onIconClick: Function,
autosize: [Boolean, Object],
errorMessage: String,
type: {
@@ -74,10 +77,6 @@ export default create({
border: {
type: Boolean,
default: true
},
onIconClick: {
type: Function,
default: () => {}
}
},
@@ -112,7 +111,7 @@ export default create({
onClickIcon() {
this.$emit('click-icon');
this.onIconClick();
this.onIconClick && this.onIconClick();
},
onKeypress(event) {