props.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 显示的内容,数组
  6. text: {
  7. type: [Array, String],
  8. default: () => defProps.noticeBar.text
  9. },
  10. // 通告滚动模式,row-横向滚动,column-竖向滚动
  11. direction: {
  12. type: String,
  13. default: () => defProps.noticeBar.direction
  14. },
  15. // direction = row时,是否使用步进形式滚动
  16. step: {
  17. type: Boolean,
  18. default: () => defProps.noticeBar.step
  19. },
  20. // 是否显示左侧的音量图标
  21. icon: {
  22. type: String,
  23. default: () => defProps.noticeBar.icon
  24. },
  25. // 通告模式,link-显示右箭头,closable-显示右侧关闭图标
  26. mode: {
  27. type: String,
  28. default: () => defProps.noticeBar.mode
  29. },
  30. // 文字颜色,各图标也会使用文字颜色
  31. color: {
  32. type: String,
  33. default: () => defProps.noticeBar.color
  34. },
  35. // 背景颜色
  36. bgColor: {
  37. type: String,
  38. default: () => defProps.noticeBar.bgColor
  39. },
  40. // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度
  41. speed: {
  42. type: [String, Number],
  43. default: () => defProps.noticeBar.speed
  44. },
  45. // 字体大小
  46. fontSize: {
  47. type: [String, Number],
  48. default: () => defProps.noticeBar.fontSize
  49. },
  50. // 滚动一个周期的时间长,单位ms
  51. duration: {
  52. type: [String, Number],
  53. default: () => defProps.noticeBar.duration
  54. },
  55. // 是否禁止用手滑动切换
  56. // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序
  57. disableTouch: {
  58. type: Boolean,
  59. default: () => defProps.noticeBar.disableTouch
  60. },
  61. // 跳转的页面路径
  62. url: {
  63. type: String,
  64. default: () => defProps.noticeBar.url
  65. },
  66. // 页面跳转的类型
  67. linkType: {
  68. type: String,
  69. default: () => defProps.noticeBar.linkType
  70. },
  71. justifyContent: {
  72. type: String,
  73. default: () => defProps.noticeBar.justifyContent
  74. },
  75. }
  76. })