props.js 3.3 KB

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