Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

65 řádky
2.2 KiB

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