type.d.ts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. export interface TdInputProps {
  2. adjustPosition?: {
  3. type: BooleanConstructor;
  4. value?: boolean;
  5. };
  6. align?: {
  7. type: StringConstructor;
  8. value?: 'left' | 'center' | 'right';
  9. };
  10. allowInputOverMax?: {
  11. type: BooleanConstructor;
  12. value?: boolean;
  13. };
  14. alwaysEmbed?: {
  15. type: BooleanConstructor;
  16. value?: boolean;
  17. };
  18. autoFocus?: {
  19. type: BooleanConstructor;
  20. value?: boolean;
  21. };
  22. borderless?: {
  23. type: BooleanConstructor;
  24. value?: boolean;
  25. };
  26. clearTrigger?: {
  27. type: StringConstructor;
  28. value?: 'always' | 'focus';
  29. };
  30. clearable?: {
  31. type: null;
  32. value?: boolean | object;
  33. };
  34. confirmHold?: {
  35. type: BooleanConstructor;
  36. value?: boolean;
  37. };
  38. confirmType?: {
  39. type: StringConstructor;
  40. value?: 'send' | 'search' | 'next' | 'go' | 'done';
  41. };
  42. cursor: {
  43. type: NumberConstructor;
  44. value?: number;
  45. required?: boolean;
  46. };
  47. cursorColor?: {
  48. type: StringConstructor;
  49. value?: string;
  50. };
  51. cursorSpacing?: {
  52. type: NumberConstructor;
  53. value?: number;
  54. };
  55. disabled?: {
  56. type: BooleanConstructor;
  57. value?: boolean;
  58. };
  59. focus?: {
  60. type: BooleanConstructor;
  61. value?: boolean;
  62. };
  63. format?: {
  64. type: undefined;
  65. value?: InputFormatType;
  66. };
  67. holdKeyboard?: {
  68. type: BooleanConstructor;
  69. value?: boolean;
  70. };
  71. label?: {
  72. type: StringConstructor;
  73. value?: string;
  74. };
  75. layout?: {
  76. type: StringConstructor;
  77. value?: 'vertical' | 'horizontal';
  78. };
  79. maxcharacter?: {
  80. type: NumberConstructor;
  81. value?: number;
  82. };
  83. maxlength?: {
  84. type: NumberConstructor;
  85. value?: number;
  86. };
  87. placeholder?: {
  88. type: StringConstructor;
  89. value?: string;
  90. };
  91. placeholderClass?: {
  92. type: StringConstructor;
  93. value?: string;
  94. };
  95. placeholderStyle: {
  96. type: StringConstructor;
  97. value?: string;
  98. required?: boolean;
  99. };
  100. prefixIcon?: {
  101. type: null;
  102. value?: string | object;
  103. };
  104. readonly?: {
  105. type: BooleanConstructor;
  106. value?: boolean;
  107. };
  108. safePasswordCertPath?: {
  109. type: StringConstructor;
  110. value?: string;
  111. };
  112. safePasswordCustomHash?: {
  113. type: StringConstructor;
  114. value?: string;
  115. };
  116. safePasswordLength?: {
  117. type: NumberConstructor;
  118. value?: number;
  119. };
  120. safePasswordNonce?: {
  121. type: StringConstructor;
  122. value?: string;
  123. };
  124. safePasswordSalt?: {
  125. type: StringConstructor;
  126. value?: string;
  127. };
  128. safePasswordTimeStamp?: {
  129. type: NumberConstructor;
  130. value?: number;
  131. };
  132. selectionEnd?: {
  133. type: NumberConstructor;
  134. value?: number;
  135. };
  136. selectionStart?: {
  137. type: NumberConstructor;
  138. value?: number;
  139. };
  140. status?: {
  141. type: StringConstructor;
  142. value?: 'default' | 'success' | 'warning' | 'error';
  143. };
  144. suffix?: {
  145. type: StringConstructor;
  146. value?: string;
  147. };
  148. suffixIcon?: {
  149. type: null;
  150. value?: string | object;
  151. };
  152. tips?: {
  153. type: StringConstructor;
  154. value?: string;
  155. };
  156. type?: {
  157. type: StringConstructor;
  158. value?: 'text' | 'number' | 'idcard' | 'digit' | 'safe-password' | 'password' | 'nickname';
  159. };
  160. value?: {
  161. type: null;
  162. value?: InputValue;
  163. };
  164. }
  165. export declare type InputFormatType = (value: InputValue) => string;
  166. export declare type InputValue = string | number;