// commpents/textarea-cell/index.js Component({ /** * 组件的属性列表 */ properties: { upload_cell_name: { type: String, value: '示例标题', }, required: { type: Boolean, value: true, }, disabled: { type: Boolean, value: false, }, upload_cell_note: { type: String, value: '示例备注', }, static_host: { type: String, value: 'static_host', }, upload_cell_note_show:{ type: Boolean, value: true, }, deletable:{ type: Boolean, value: true, }, upload_cell_desc: { type: String, value: '示例描述', }, t_icon_name: { type: String, value: 'heart', }, t_icon_size: { type: String, value: '32rpx', }, has_error_content: { type: String, value: "", }, fileList:{ type: Array, value: [], }, max_count:{ type: Number, value: 1 }, is_multiple:{ type: Boolean, value: false, } }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { afterRead(event) { console.log("upload cell: ", event) const { file } = event.detail; this.triggerEvent('UploadFile', event.detail); }, delete(event) { console.log("delete cell : ", event) const { file } = event.detail; this.triggerEvent('DeleteFile', event.detail); }, onshowNote: function(e){ console.log(e); var myEventDetail = {} // detail对象,提供给事件监听函数 var myEventOption = {} // 触发事件的选项 this.triggerEvent('showNote', myEventDetail, myEventOption) } } })