props.ts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. export default {
  2. /** 键盘弹起时,是否自动上推页面 */
  3. adjustPosition :{
  4. type: Boolean,
  5. default: true
  6. },
  7. /** 文本内容位置,居左/居中/居右 */
  8. align : {
  9. type: String,
  10. default: 'left'
  11. },
  12. /** 强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) */
  13. alwaysEmbed:{
  14. type: Boolean,
  15. default: false
  16. },
  17. /** (即将废弃,请直接使用 focus )自动聚焦,拉起键盘 */
  18. autoFocus:{
  19. type: Boolean,
  20. default: false
  21. },
  22. /** 是否开启无边框模式 */
  23. bordered:{
  24. type: Boolean,
  25. default: true
  26. },
  27. /** 清空图标触发方式,仅在输入框有值时有效 */
  28. clearTrigger: {
  29. type: String,
  30. default: 'focus'
  31. },
  32. /** 是否可清空,默认不启动 */
  33. clearable:{
  34. type: Boolean,
  35. default: false
  36. },
  37. /** 点击键盘右下角按钮时是否保持键盘不收起 */
  38. confirmHold:{
  39. type: Boolean,
  40. default: false
  41. },
  42. /** 设置键盘右下角按钮的文字 */
  43. confirmType: {
  44. type: String,
  45. default: 'done'
  46. },
  47. /** 指定 focus 时的光标位置 */
  48. cursor: {
  49. type: Number,
  50. default: 0
  51. },
  52. /** 光标颜色 */
  53. cursorColor: {
  54. type: String,
  55. default: null
  56. },
  57. /** 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 */
  58. cursorSpacing: {
  59. type: Number,
  60. default: 0
  61. },
  62. /** 是否禁用输入框 */
  63. disabled:{
  64. type: Boolean,
  65. default: false
  66. },
  67. /** 获取焦点 */
  68. focus:{
  69. type: Boolean,
  70. default: false
  71. },
  72. /** 指定输入框展示值的格式 */
  73. // format: Function
  74. /** focus时,点击页面的时候不收起键盘 */
  75. holdKeyboard:{
  76. type: Boolean,
  77. default: false
  78. },
  79. /** 左侧文本 */
  80. label: {
  81. type: String,
  82. default: null
  83. },
  84. /** 标题输入框布局方式 */
  85. layout: {
  86. type: String,
  87. default: 'horizontal'
  88. },
  89. /** 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用 */
  90. maxcharacter: {
  91. type: Number,
  92. default: null
  93. },
  94. /** 用户最多可以输入的文本长度,一个中文等于一个计数长度。默认为 -1,不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用 */
  95. maxlength: {
  96. type: Number,
  97. default: -1
  98. },
  99. /** 占位符 */
  100. placeholder: {
  101. type: String,
  102. default: ''
  103. },
  104. /** 指定 placeholder 的样式 */
  105. placeholderStyle: {
  106. type: [String, Object],
  107. default: ''
  108. },
  109. /** 指定 placeholder 的样式类 */
  110. placeholderClass: {
  111. type: String,
  112. default: ''
  113. },
  114. /** 只读状态 */
  115. readonly:{
  116. type: Boolean,
  117. default: false
  118. },
  119. /** 安全键盘加密公钥的路径,只支持包内路径 */
  120. safePasswordCertPath: {
  121. type: String,
  122. default: ''
  123. },
  124. /** 安全键盘计算 hash 的算法表达式,如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))` */
  125. safePasswordCustomHash: {
  126. type: String,
  127. default: ''
  128. },
  129. /** 安全键盘输入密码长度 */
  130. safePasswordLength: {
  131. type: Number,
  132. default: null
  133. },
  134. /** 安全键盘加密盐值 */
  135. safePasswordNonce: {
  136. type: String,
  137. default: ''
  138. },
  139. /** 安全键盘计算 hash 盐值,若指定custom-hash 则无效 */
  140. safePasswordSalt: {
  141. type: String,
  142. default: ''
  143. },
  144. /** 安全键盘加密时间戳 */
  145. safePasswordTimeStamp: {
  146. type: Number,
  147. default: null
  148. },
  149. /** 光标结束位置,自动聚集时有效,需与 selection-start 搭配使用 */
  150. selectionEnd: {
  151. type: Number,
  152. default: -1
  153. },
  154. /** 光标起始位置,自动聚集时有效,需与 selection-end 搭配使用 */
  155. selectionStart: {
  156. type: Number,
  157. default: -1
  158. },
  159. status: {
  160. type: String,
  161. default: 'default'
  162. },
  163. /** 组件前置图标。值为字符串表示图标名称 */
  164. prefixIcon: {
  165. type: String,
  166. default: null
  167. },
  168. prefixIconSize: {
  169. type: String,
  170. default: null
  171. },
  172. prefixIconColor: {
  173. type: String,
  174. default: null
  175. },
  176. /** 后置图标前的后置内容 */
  177. suffix: {
  178. type: String,
  179. default: null
  180. },
  181. /** 后置文本内容。值为字符串则表示图标名称 */
  182. suffixIcon: {
  183. type: String,
  184. default: null
  185. },
  186. suffixIconSize: {
  187. type: String,
  188. default: null
  189. },
  190. suffixIconColor: {
  191. type: String,
  192. default: null
  193. },
  194. /** 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式 */
  195. tips: {
  196. type: String,
  197. default: null
  198. },
  199. type: {
  200. type: String,
  201. default: null
  202. },
  203. value: {
  204. type: [String, Number],
  205. default: null
  206. },
  207. modelValue: {
  208. type: [String, Number],
  209. default: null
  210. },
  211. lStyle: {
  212. type: String,
  213. default: null
  214. },
  215. labelStyle: {
  216. type: String,
  217. default: null
  218. },
  219. tipsStyle: {
  220. type: String,
  221. default: null
  222. },
  223. inputStyle: {
  224. type: String,
  225. default: null
  226. },
  227. borderColor: {
  228. type: String,
  229. default: null
  230. },
  231. /**
  232. * 是否使用经典边框样式
  233. */
  234. classic: {
  235. type: Boolean,
  236. default: false
  237. },
  238. focused: {
  239. type: Boolean,
  240. default: false
  241. },
  242. focusedBorderColor: {
  243. type: String,
  244. default: null,
  245. },
  246. clearIconSize: {
  247. type: String,
  248. default: null,
  249. }
  250. }