走马灯

例子

走马灯 - 图1

  1. <avue-carousel :option="option"></avue-carousel>
  2. <script>
  3. export default {
  4. data() {
  5. return {
  6. option:{
  7. height:300,
  8. data:[
  9. {
  10. title: '这是跑马灯的标题1',
  11. href:"https://avue.top",
  12. src:'http://pic.soutu123.com/back_pic/18/07/06/514e96eedb99a663e02ab32614713243.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  13. },
  14. {
  15. title: '这是跑马灯的标题2',
  16. href:"https://avue.top",
  17. src:'http://pic.soutu123.com/back_pic/18/09/18/0ca02eb9c35f095481196354a1f455c8.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  18. },
  19. {
  20. title: '这是跑马灯的标题3',
  21. href:"https://avue.top",
  22. src:'http://pic.soutu123.com/back_pic/18/10/19/9ce53f1e0215b15e996b856e098d4c88.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  23. }
  24. ]
  25. },
  26. };
  27. }
  28. }
  29. </script>

旋转展示

走马灯 - 图2

  1. <avue-carousel :option="option1"></avue-carousel>
  2. <script>
  3. export default {
  4. data() {
  5. return {
  6. option1:{
  7. type:'card',
  8. height:250,
  9. autoplay:true,
  10. interval:3000,
  11. data:[
  12. {
  13. title: '这是跑马灯的标题1',
  14. href:"https://avue.top",
  15. src:'http://pic.soutu123.com/back_pic/18/07/06/514e96eedb99a663e02ab32614713243.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  16. },
  17. {
  18. title: '这是跑马灯的标题2',
  19. href:"https://avue.top",
  20. src:'http://pic.soutu123.com/back_pic/18/09/18/0ca02eb9c35f095481196354a1f455c8.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  21. },
  22. {
  23. title: '这是跑马灯的标题3',
  24. href:"https://avue.top",
  25. src:'http://pic.soutu123.com/back_pic/18/10/19/9ce53f1e0215b15e996b856e098d4c88.jpg!/fw/700/quality/90/unsharp/true/compress/true'
  26. }
  27. ]
  28. },
  29. };
  30. }
  31. }
  32. </script>
参数说明类型可选值默认值
height高度String / Number-300
autoplay是否自动轮播Booleantrue / falsetrue
interval自动轮播的时间String / Number-3000
title标题String--
href点击跳转的链接String--
src图片地址String--
type类型Stringcard / boxbox