综合办公系统
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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. export default {
  2. props: {
  3. // 主题颜色
  4. type: {
  5. type: String,
  6. default: ''
  7. },
  8. // 是否显示
  9. show: {
  10. type: Boolean,
  11. default: true
  12. },
  13. // 显示的值
  14. text: {
  15. type: [String, Number],
  16. default: ''
  17. },
  18. // 前置图标
  19. prefixIcon: {
  20. type: String,
  21. default: ''
  22. },
  23. // 后置图标
  24. suffixIcon: {
  25. type: String,
  26. default: ''
  27. },
  28. // 文本处理的匹配模式
  29. // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接
  30. mode: {
  31. type: String,
  32. default: ''
  33. },
  34. // mode=link下,配置的链接
  35. href: {
  36. type: String,
  37. default: ''
  38. },
  39. // 格式化规则
  40. format: {
  41. type: [String, Function],
  42. default: ''
  43. },
  44. // mode=phone时,点击文本是否拨打电话
  45. call: {
  46. type: Boolean,
  47. default: true
  48. },
  49. // 小程序的打开方式
  50. openType: {
  51. type: String,
  52. default: ''
  53. },
  54. // 是否粗体,默认normal
  55. bold: {
  56. type: Boolean,
  57. default: false
  58. },
  59. // 是否块状
  60. block: {
  61. type: Boolean,
  62. default: false
  63. },
  64. // 文本显示的行数,如果设置,超出此行数,将会显示省略号
  65. lines: {
  66. type: [String, Number],
  67. default: ''
  68. },
  69. // 文本颜色
  70. color: {
  71. type: String,
  72. default: '#303133'
  73. },
  74. // 字体大小
  75. size: {
  76. type: [String, Number],
  77. default: 15
  78. },
  79. // 图标的样式
  80. iconStyle: {
  81. type: [Object, String],
  82. default: () => ({
  83. fontSize: '15px'
  84. })
  85. },
  86. // 文字装饰,下划线,中划线等,可选值 none|underline|line-through
  87. decoration: {
  88. type: String,
  89. default: 'none'
  90. },
  91. // 外边距,对象、字符串,数值形式均可
  92. margin: {
  93. type: [Object, String, Number],
  94. default: 0
  95. },
  96. // 文本行高
  97. lineHeight: {
  98. type: [String, Number],
  99. default: ''
  100. },
  101. // 文本对齐方式,可选值left|center|right
  102. align: {
  103. type: String,
  104. default: 'left'
  105. },
  106. // 文字换行,可选值break-word|normal|anywhere
  107. wordWrap: {
  108. type: String,
  109. default: 'normal'
  110. },
  111. ...uni.$uv?.props?.text
  112. }
  113. }