textarea.js 388 B

12345678910111213141516171819202122232425262728
  1. Page({
  2. data: {
  3. height: 20,
  4. focus: false,
  5. },
  6. bindButtonTap() {
  7. this.onFocus();
  8. },
  9. onFocus() {
  10. this.setData({
  11. focus: true,
  12. });
  13. },
  14. onBlur() {
  15. this.setData({
  16. focus: false,
  17. });
  18. },
  19. bindTextAreaBlur(e) {
  20. console.log(e.detail.value);
  21. },
  22. bindFormSubmit(e) {
  23. my.alert({
  24. content: e.detail.value.textarea,
  25. });
  26. },
  27. });