|
|
@ -96,14 +96,6 @@ Component({ |
|
|
value:'#333333' |
|
|
value:'#333333' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 组件的初始数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
data: { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 组件的方法列表 |
|
|
* 组件的方法列表 |
|
|
*/ |
|
|
*/ |
|
|
@ -111,42 +103,28 @@ Component({ |
|
|
// 输入变化
|
|
|
// 输入变化
|
|
|
getInput(e){ |
|
|
getInput(e){ |
|
|
this.data.value = e.detail.value |
|
|
this.data.value = e.detail.value |
|
|
this.setData({ |
|
|
|
|
|
value:e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.setData({ value:e.detail.value }) |
|
|
this.triggerEvent("input", { value: e.detail.value }) |
|
|
this.triggerEvent("input", { value: e.detail.value }) |
|
|
}, |
|
|
}, |
|
|
// 聚焦输入框变化
|
|
|
// 聚焦输入框变化
|
|
|
getFocus(e){ |
|
|
getFocus(e){ |
|
|
this.data.value = e.detail.value |
|
|
this.data.value = e.detail.value |
|
|
this.setData({ |
|
|
|
|
|
value:e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
this.triggerEvent("focus", { |
|
|
|
|
|
value: e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.setData({ value:e.detail.value }) |
|
|
|
|
|
this.triggerEvent("focus", { value: e.detail.value }) |
|
|
}, |
|
|
}, |
|
|
// 失焦
|
|
|
// 失焦
|
|
|
getBlur(e){ |
|
|
getBlur(e){ |
|
|
this.data.value = e.detail.value |
|
|
|
|
|
this.setData({ value:e.detail.value }) |
|
|
|
|
|
this.triggerEvent("blur", { value: e.detail.value },{}) |
|
|
this.triggerEvent("blur", { value: e.detail.value },{}) |
|
|
}, |
|
|
}, |
|
|
// 聚焦输入框变化
|
|
|
// 聚焦输入框变化
|
|
|
getConfirm(e){ |
|
|
getConfirm(e){ |
|
|
this.data.value = e.detail.value |
|
|
this.data.value = e.detail.value |
|
|
this.setData({ |
|
|
|
|
|
value:e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
this.triggerEvent("confirm", { |
|
|
|
|
|
value: e.detail.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.setData({ value:e.detail.value }) |
|
|
|
|
|
this.triggerEvent("confirm", { value: e.detail.value }) |
|
|
}, |
|
|
}, |
|
|
// 额外按钮
|
|
|
// 额外按钮
|
|
|
extreaBtn(){ |
|
|
extreaBtn(){ |
|
|
this.triggerEvent("extrea", { |
|
|
|
|
|
value: this.data.value |
|
|
|
|
|
},{}) |
|
|
|
|
|
|
|
|
this.triggerEvent("extrea", { value: this.data.value },{}) |
|
|
}, |
|
|
}, |
|
|
// 关闭
|
|
|
// 关闭
|
|
|
close(){ |
|
|
close(){ |
|
|
|