group-item.vue 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="group-item" @click="showGroupInfo()">
  3. <head-image :name="group.showGroupName" :url="group.headImageThumb" size="small"></head-image>
  4. <view class="group-name">
  5. <view>{{ group.showGroupName }}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. name: "group-item",
  12. data() {
  13. return {}
  14. },
  15. methods: {
  16. showGroupInfo() {
  17. uni.navigateTo({
  18. url: "/pages/group/group-info?id=" + this.group.id
  19. })
  20. },
  21. },
  22. props: {
  23. group: {
  24. type: Object
  25. }
  26. }
  27. }
  28. </script>
  29. <style scope lang="scss">
  30. .group-item {
  31. height: 90rpx;
  32. display: flex;
  33. margin-bottom: 2rpx;
  34. position: relative;
  35. padding: 18rpx 20rpx;
  36. align-items: center;
  37. background-color: white;
  38. white-space: nowrap;
  39. &:hover {
  40. background-color: $im-bg-active;
  41. }
  42. &.active {
  43. background-color: $im-bg-active;
  44. }
  45. .group-name {
  46. font-size: $im-font-size;
  47. padding-left: 20rpx;
  48. text-align: left;
  49. white-space: nowrap;
  50. overflow: hidden;
  51. }
  52. }
  53. </style>