選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

80 行
2.6 KiB

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