69 lines
1.2 KiB
JavaScript
69 lines
1.2 KiB
JavaScript
// commpents/textarea-cell/index.js
|
||
Component({
|
||
/**
|
||
* 组件的属性列表
|
||
*/
|
||
properties: {
|
||
textarea_cell_name: {
|
||
type: String,
|
||
value: '标题',
|
||
},
|
||
required: {
|
||
type: Boolean,
|
||
value: true,
|
||
},
|
||
disabled: {
|
||
type: Boolean,
|
||
value: false,
|
||
},
|
||
textarea_cell_note: {
|
||
type: String,
|
||
value: '查看示例',
|
||
},
|
||
textarea_cell_content_placeholder: {
|
||
type: String,
|
||
value: '请输入文字',
|
||
},
|
||
t_icon_name: {
|
||
type: String,
|
||
value: 'heart',
|
||
},
|
||
t_icon_size: {
|
||
type: String,
|
||
value: '32rpx',
|
||
},
|
||
textarea_val: {
|
||
type: String,
|
||
value: '',
|
||
},
|
||
has_error_content: {
|
||
type: String,
|
||
value: "",
|
||
},
|
||
},
|
||
|
||
/**
|
||
* 组件的初始数据
|
||
*/
|
||
data: {
|
||
|
||
},
|
||
|
||
/**
|
||
* 组件的方法列表
|
||
*/
|
||
methods: {
|
||
onshowNote: function(e){
|
||
console.log(e);
|
||
var myEventDetail = {} // detail对象,提供给事件监听函数
|
||
var myEventOption = {} // 触发事件的选项
|
||
this.triggerEvent('showNote', myEventDetail, myEventOption)
|
||
},
|
||
|
||
bindTextAreaBlur(e){
|
||
console.log("textarea val: ", e.detail.value);
|
||
this.triggerEvent('TextAreaBlur', e.detail)
|
||
}
|
||
}
|
||
})
|