props.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. exports.textareaProps = exports.inputProps = exports.commonProps = void 0;
  4. exports.commonProps = {
  5. value: {
  6. type: String,
  7. observer: function (value) {
  8. if (value !== this.value) {
  9. this.setData({ innerValue: value });
  10. this.value = value;
  11. }
  12. },
  13. },
  14. placeholder: String,
  15. placeholderStyle: String,
  16. placeholderClass: String,
  17. disabled: Boolean,
  18. maxlength: {
  19. type: Number,
  20. value: -1,
  21. },
  22. cursorSpacing: {
  23. type: Number,
  24. value: 50,
  25. },
  26. autoFocus: Boolean,
  27. focus: Boolean,
  28. cursor: {
  29. type: Number,
  30. value: -1,
  31. },
  32. selectionStart: {
  33. type: Number,
  34. value: -1,
  35. },
  36. selectionEnd: {
  37. type: Number,
  38. value: -1,
  39. },
  40. adjustPosition: {
  41. type: Boolean,
  42. value: true,
  43. },
  44. holdKeyboard: Boolean,
  45. };
  46. exports.inputProps = {
  47. type: {
  48. type: String,
  49. value: 'text',
  50. },
  51. password: Boolean,
  52. confirmType: String,
  53. confirmHold: Boolean,
  54. };
  55. exports.textareaProps = {
  56. autoHeight: Boolean,
  57. fixed: Boolean,
  58. showConfirmBar: {
  59. type: Boolean,
  60. value: true,
  61. },
  62. disableDefaultPadding: {
  63. type: Boolean,
  64. value: true,
  65. },
  66. };