纸通宝SAAS仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

41 lines
686 B

Component({
/**
* 组件样式隔离
*/
options: {
addGlobalClass: true,
multipleSlots: true // 支持多个slot
},
properties: {
value: {
type: String,
value: null
},
placeholder: {
type: String,
value: ''
}
},
/**
* 组件的初始数据
*/
data: {
editing: false
},
/**
* 组件的方法列表
*/
methods: {
onEdit: function(e) {
this.setData({ editing: true })
},
onBlur: function(e) {
this.setData({ editing: false })
},
bindInput: function(e) {
this.setData({ value: e.detail.value })
this.triggerEvent('change', this.data.value)
}
}
})