SelectedMember.vue 1.0 KB

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