详情小程序
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.

48 lines
818 B

  1. <template>
  2. <view class="content">
  3. <view class="image-item" v-for="item in 5" :key="item">
  4. <image src="https://picsum.photos/200"></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data(){
  11. return {
  12. }
  13. },
  14. onLoad(){
  15. // TODO 优化当头像数量超过盒子大小时最后一个元素显示+剩余多少张
  16. // 参考:http://www.bootstrapmb.com/item/2739
  17. },
  18. methods: {
  19. }
  20. }
  21. </script>
  22. <style lang="scss" scoped="scoped">
  23. .content{
  24. display: flex;
  25. flex-wrap: nowrap;
  26. width: 100%;
  27. height: 60rpx;
  28. margin-top: 20rpx;
  29. .image-item{
  30. width: 60rpx;
  31. height: 60rpx;
  32. border-radius: 50%;
  33. border: 2rpx solid #FFFFFF;
  34. overflow: hidden;
  35. &:nth-child(n+2){
  36. margin-left: -16rpx;
  37. }
  38. image{
  39. width: 100%;
  40. height: 100%;
  41. }
  42. }
  43. }
  44. </style>