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.
 
 
 

116 regels
3.4 KiB

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