import {getEventParam} from "../../../../utils/utils"; Component({ properties: {}, data: { message: '', bottom: 0, top: 0, }, methods: { changeMessage(e) { this.setData({ message: getEventParam(e) }) }, reply(e) { this.triggerEvent("message", {msg: this.data.message}); }, clear() { this.setData({ message: "" }) }, onFocus(e) { const keyboradHeight = getEventParam(e, "height"); this.setData({ top: keyboradHeight }) }, onBlur() { this.setData({ top: 0 }) }, } });