props.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. import { defineProps } from '../../libs/util/props';
  2. import theme from '../../libs/config/theme.js';
  3. export default defineProps('cell', {
  4. // 标题
  5. title: {
  6. type: [String, Number],
  7. default: ''
  8. },
  9. // 标题下方的描述信息
  10. label: {
  11. type: [String, Number],
  12. default: ''
  13. },
  14. // 右侧的内容
  15. value: {
  16. type: [String, Number],
  17. default: ''
  18. },
  19. // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址)
  20. icon: {
  21. type: String,
  22. default: ''
  23. },
  24. // 是否禁用cell
  25. disabled: {
  26. type: Boolean,
  27. default: false
  28. },
  29. // 是否显示下边框
  30. border: {
  31. type: Boolean,
  32. default: true
  33. },
  34. // 边框颜色
  35. borderColor: {
  36. type: String,
  37. default: theme.borderColor
  38. },
  39. // 内容是否垂直居中(主要是针对右侧的value部分)
  40. center: {
  41. type: Boolean,
  42. default: false
  43. },
  44. // 点击后跳转的URL地址
  45. url: {
  46. type: String,
  47. default: ''
  48. },
  49. // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作
  50. linkType: {
  51. type: String,
  52. default: 'navigateTo'
  53. },
  54. // 是否开启点击反馈(表现为点击时加上灰色背景)
  55. clickable: {
  56. type: Boolean,
  57. default: false
  58. },
  59. // 是否展示右侧箭头并开启点击反馈
  60. isLink: {
  61. type: Boolean,
  62. default: false
  63. },
  64. // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件)
  65. required: {
  66. type: Boolean,
  67. default: false
  68. },
  69. // 右侧的图标箭头
  70. rightIcon: {
  71. type: String,
  72. default: 'arrow-right'
  73. },
  74. // 右侧箭头的方向,可选值为:left,up,down
  75. arrowDirection: {
  76. type: String,
  77. default: ''
  78. },
  79. // 左侧图标样式
  80. iconStyle: {
  81. type: [Object, String],
  82. default: ''
  83. },
  84. // 右侧箭头图标的样式
  85. rightIconStyle: {
  86. type: [Object, String],
  87. default: ''
  88. },
  89. // 标题的样式
  90. titleStyle: {
  91. type: [Object, String],
  92. default: ''
  93. },
  94. // 单位元的大小,可选值为large
  95. size: {
  96. type: String,
  97. default: ''
  98. },
  99. // 点击cell是否阻止事件传播
  100. stop: {
  101. type: Boolean,
  102. default: true
  103. },
  104. // 标识符,cell被点击时返回
  105. name: {
  106. type: [Number, String],
  107. default: ''
  108. }
  109. })