张敏 a0dcec4dc5 [refactor] Field & Stepper 自定义组件改造 (#168)
* [refactor] Field & Stepper 自定义组件改造

* Field & Stepper remove componentId
2018-03-28 15:10:35 +08:00

45 lines
818 B
JavaScript

Component({
properties: {
title: String,
name: String,
type: {
type: String,
value: 'input'
},
name: String,
value: String,
disabled: Boolean,
inputType: {
type: String,
value: 'text'
},
placeholder: String,
focus: Boolean,
mode: {
type: String,
value: 'normal'
},
right: Boolean,
error: Boolean
},
methods: {
handleZanFieldChange(event) {
console.info('[zan:field:change]', event);
this.triggerEvent('change', event);
},
handleZanFieldFocus(event) {
console.info('[zan:field:focus]', event);
this.triggerEvent('focus', event);
},
handleZanFieldBlur(event) {
console.info('[zan:field:blur]', event);
this.triggerEvent('blur', event);
}
}
})