GroupMemberListHeader.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <custom-nav-bar @leftClick="leftClick" :title="getTitle">
  3. <!-- <view @click="rightClick" class="more_container" :style="{'visibility': !checkVisible && !isTransfer ? 'visible' : 'hidden' }" slot="more">
  4. <u-icon class="more_dot" name="more-dot-fill" size="23" color="#0C1C33" />
  5. <u-transition :show="moreMenuVisible">
  6. <view class="more_menu">
  7. <view @click="inviteMember" class="menu_item">
  8. <text>邀请群员</text>
  9. </view>
  10. <view v-if="!isNomal" @click="removeMember" class="menu_item">
  11. <text>移除群员</text>
  12. </view>
  13. </view>
  14. </u-transition>
  15. </view> -->
  16. </custom-nav-bar>
  17. </template>
  18. <script>
  19. import CustomNavBar from "../../../../components/CustomNavBar/index.vue";
  20. import { ContactChooseTypes } from "../../../../constant";
  21. export default {
  22. name: "",
  23. components: {
  24. CustomNavBar,
  25. },
  26. props: {
  27. checkVisible: {
  28. type: Boolean,
  29. default: false,
  30. },
  31. isNomal: {
  32. type: Boolean,
  33. default: false,
  34. },
  35. isTransfer: {
  36. type: Boolean,
  37. default: false,
  38. },
  39. isAt: {
  40. type: Boolean,
  41. default: false,
  42. },
  43. isSetAdmin: {
  44. type: Boolean,
  45. default: false,
  46. },
  47. isMute: {
  48. type: Boolean,
  49. default: false,
  50. },
  51. isCall: {
  52. type: Boolean,
  53. default: false,
  54. },
  55. groupID: String,
  56. },
  57. data() {
  58. return {
  59. moreMenuVisible: false,
  60. };
  61. },
  62. computed: {
  63. getTitle() {
  64. if (this.isCall) {
  65. return "邀请成员";
  66. }
  67. if (this.isAt) {
  68. return "选择提醒的人";
  69. }
  70. if (this.isSetAdmin) {
  71. return "设置管理员";
  72. }
  73. if (this.isMute) {
  74. return "禁言成员";
  75. }
  76. if (this.checkVisible) {
  77. return "移除群成员";
  78. }
  79. return "群成员";
  80. },
  81. },
  82. methods: {
  83. leftClick() {
  84. if (this.checkVisible) {
  85. this.$emit("update:checkVisible", false);
  86. }
  87. },
  88. rightClick() {
  89. this.moreMenuVisible = true;
  90. },
  91. checkMenu() {
  92. if (this.moreMenuVisible) {
  93. this.moreMenuVisible = false;
  94. }
  95. },
  96. inviteMember() {
  97. uni.navigateTo({
  98. url: `/pages_im/pages/common/contactChoose/index?type=${ContactChooseTypes.Invite}&groupID=${this.groupID}`,
  99. });
  100. },
  101. removeMember() {
  102. this.$emit("removeMember");
  103. },
  104. },
  105. };
  106. </script>
  107. <style lang="scss">
  108. .more_container {
  109. position: relative;
  110. .more_dot {
  111. padding: 24rpx;
  112. margin-right: 20rpx;
  113. }
  114. .more_menu {
  115. position: absolute;
  116. bottom: 0;
  117. left: 50%;
  118. transform: translate(-100%, 100%);
  119. box-shadow: 0px 0px 6px 2px rgba(0, 0, 0, 0.16);
  120. width: max-content;
  121. border-radius: 8rpx;
  122. background-color: #fff;
  123. .menu_item {
  124. padding: 20rpx 48rpx;
  125. font-size: 28rpx;
  126. color: $uni-text-color;
  127. // &:nth-child(1) {
  128. // border-bottom: 1px solid #F0F0F0;
  129. // }
  130. }
  131. }
  132. }
  133. </style>