You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.4 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <vue-seamless-scroll :data="listData" :class-option="classOption" :style="{ height : listData.length > 6 ? '400rpx' :`${listData.length * 60}rpx`}" class="warp">
  3. <ul class="item">
  4. <li v-for="(item, index) in listData" :key="index">
  5. <view class="content">
  6. <span class="title" v-text="item.auccont"></span>
  7. <span class="date" v-text="item.money"></span>
  8. </view>
  9. </li>
  10. </ul>
  11. </vue-seamless-scroll>
  12. </template>
  13. <script>
  14. import vueSeamlessScroll from 'vue-seamless-scroll'
  15. export default {
  16. name: 'Example01Basic',
  17. components: {
  18. vueSeamlessScroll
  19. },
  20. props : ['listData'],
  21. data() {
  22. return {
  23. classOption: {
  24. step: .4,
  25. limitMoveNum: 1,
  26. hoverStop: false
  27. }
  28. }
  29. },
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .warp {
  34. width: 80%;
  35. margin: 0 auto;
  36. overflow: hidden;
  37. ul {
  38. list-style: none;
  39. padding: 0;
  40. margin: 0 auto;
  41. li,
  42. a {
  43. display: flex;
  44. align-items: center;
  45. height: 60rpx;
  46. justify-content: space-between;
  47. font-size: 15px;
  48. border-radius: 15rpx;
  49. overflow: hidden;
  50. .content {
  51. display: flex;
  52. height: 50rpx;
  53. width: 100%;
  54. background: rgba(255, 255, 255, .5);
  55. box-sizing: border-box;
  56. padding: 0rpx 20%;
  57. span{
  58. width: 50%;
  59. overflow: hidden;
  60. text-overflow: ellipsis;
  61. white-space: nowrap;
  62. }
  63. }
  64. }
  65. }
  66. }
  67. </style>