props.js 1.3 KB

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