农经大屏
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

70 wiersze
1.4 KiB

  1. import scroll from 'vue-seamless-scroll'
  2. export default {
  3. components: {
  4. scroll
  5. },
  6. data () {
  7. return {
  8. };
  9. },
  10. props: {
  11. width: {
  12. type: [String, Number],
  13. default: '100%'
  14. },
  15. height: {
  16. type: [String, Number],
  17. default: '100'
  18. },
  19. headers: {
  20. type: Array,
  21. default: function () {
  22. return ['表头1', '表头2', '表头3']
  23. }
  24. },
  25. data: {
  26. type: Array,
  27. default: function () {
  28. return [
  29. ['表头1', '表头2', '表头3'],
  30. ['表头1', '表头2', '表头3'],
  31. ['表头1', '表头2', '表头3'],
  32. ['表头1', '表头2', '表头3'],
  33. ['表头1', '表头2', '表头3'],
  34. ['表头1', '表头2', '表头3'],
  35. ['表头1', '表头2', '表头3'],
  36. ['表头11', '表头22', '表头33']
  37. ]
  38. }
  39. }
  40. },
  41. computed: {
  42. dataLength: function () {
  43. return this.dataList.length;
  44. },
  45. style: function () {
  46. return {
  47. height: this.height,
  48. width: this.width
  49. };
  50. },
  51. // 如果数据不足5条则不滚动
  52. swiperOption: function () {
  53. return {
  54. step: 0.4,
  55. limitMoveNum: 1,
  56. hoverStop: true,
  57. direction: 1,
  58. openWatch: true,
  59. singleHeight: 0,
  60. singleHeight: 0,
  61. waitTime: 1000
  62. }
  63. }
  64. },
  65. created () {
  66. },
  67. methods: {
  68. }
  69. };