SelectedMember.vue 999 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view class="selected_item">
  3. <view class="left_info">
  4. <my-avatar
  5. :src="source.faceURL"
  6. :desc="source.nickname || source.showName"
  7. :isGroup="Boolean(source.groupID)"
  8. size="42"
  9. />
  10. <text>{{ source.nickname || source.groupName || source.showName }}</text>
  11. </view>
  12. <view>
  13. <u-button @click="action" plain text="移除" type="primary" />
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import MyAvatar from "../MyAvatar/index.vue";
  19. export default {
  20. name: "",
  21. components: {
  22. MyAvatar,
  23. },
  24. props: {
  25. source: Object,
  26. },
  27. data() {
  28. return {};
  29. },
  30. methods: {
  31. action() {
  32. this.$emit("removeItem");
  33. },
  34. },
  35. mounted() {
  36. console.log(this.source);
  37. },
  38. };
  39. </script>
  40. <style lang="scss" scoped>
  41. .selected_item {
  42. @include btwBox();
  43. padding: 20rpx 0;
  44. .left_info {
  45. @include vCenterBox();
  46. .u-avatar {
  47. margin-right: 24rpx;
  48. }
  49. }
  50. .u-button {
  51. height: 48rpx;
  52. }
  53. }
  54. </style>