123456789101112131415161718192021222324252627282930313233343536 |
- 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
- })
- },
- }
- });
|