综合办公系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

props.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. export default {
  2. props: {
  3. value: {
  4. type: [String, Number],
  5. default: ''
  6. },
  7. modelValue: {
  8. type: [String, Number],
  9. default: ''
  10. },
  11. // 搜索框形状,round-圆形,square-方形
  12. shape: {
  13. type: String,
  14. default: 'round'
  15. },
  16. // 搜索框背景色,默认值#f2f2f2
  17. bgColor: {
  18. type: String,
  19. default: '#f2f2f2'
  20. },
  21. // 占位提示文字
  22. placeholder: {
  23. type: String,
  24. default: '请输入关键字'
  25. },
  26. // 是否启用清除控件
  27. clearabled: {
  28. type: Boolean,
  29. default: true
  30. },
  31. // 是否自动聚焦
  32. focus: {
  33. type: Boolean,
  34. default: false
  35. },
  36. // 是否在搜索框右侧显示取消按钮
  37. showAction: {
  38. type: Boolean,
  39. default: true
  40. },
  41. // 右边控件的样式
  42. actionStyle: {
  43. type: Object,
  44. default: () => ({})
  45. },
  46. // 取消按钮文字
  47. actionText: {
  48. type: String,
  49. default: '搜索'
  50. },
  51. // 输入框内容对齐方式,可选值为 left|center|right
  52. inputAlign: {
  53. type: String,
  54. default: 'left'
  55. },
  56. // input输入框的样式,可以定义文字颜色,大小等,对象形式
  57. inputStyle: {
  58. type: Object,
  59. default: () => ({})
  60. },
  61. // 是否禁用输入框
  62. disabled: {
  63. type: Boolean,
  64. default: false
  65. },
  66. // 边框颜色
  67. borderColor: {
  68. type: String,
  69. default: 'transparent'
  70. },
  71. // 搜索图标的颜色,默认同输入框字体颜色
  72. searchIconColor: {
  73. type: String,
  74. default: '#909399'
  75. },
  76. // 输入框字体颜色
  77. color: {
  78. type: String,
  79. default: '#606266'
  80. },
  81. // placeholder的颜色
  82. placeholderColor: {
  83. type: String,
  84. default: '#909399'
  85. },
  86. // 左边输入框的图标,可以为uvui图标名称或图片路径
  87. searchIcon: {
  88. type: String,
  89. default: 'search'
  90. },
  91. searchIconSize: {
  92. type: [Number, String],
  93. default: 22
  94. },
  95. // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px"、"30px 20px"等写法
  96. margin: {
  97. type: String,
  98. default: '0'
  99. },
  100. // 开启showAction时,是否在input获取焦点时才显示
  101. animation: {
  102. type: Boolean,
  103. default: false
  104. },
  105. // 输入框最大能输入的长度,-1为不限制长度(来自uniapp文档)
  106. maxlength: {
  107. type: [String, Number],
  108. default: -1
  109. },
  110. // 搜索框高度,单位px
  111. height: {
  112. type: [String, Number],
  113. default: 32
  114. },
  115. // 搜索框左侧文本
  116. label: {
  117. type: [String, Number, null],
  118. default: null
  119. },
  120. // 搜索框扩展样式
  121. boxStyle: {
  122. type: [String, Object],
  123. default: () => ({})
  124. },
  125. ...uni.$uv?.props?.search
  126. }
  127. }