12345678910111213141516171819202122232425262728293031323334353637 |
- <template>
- <div class="at-me" v-show="atList.length">
- <div class="at-me-item" v-if="atList.length >= 2 && totalVisible" @click="scrollToMsg">
- <div class="at-content">有{{atList.length}}个人提到了你</div>
- <i class="icon-clise" title="关闭" @click.stop="totalVisible = false"></i>
- </div>
- <div class="at-me-item" v-if="itemVisible" @click="scrollToMsg">
- <div class="at-content">{{atList[0].name}}提到了你</div>
- <i class="icon-clise" title="关闭" @click.stop="itemVisible = false"></i>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'atMe',
- props: {
- atList: [Array]
- },
- data () {
- return {
- totalVisible: true,
- itemVisible: true
- }
- },
- methods: {
- scrollToMsg () {
- this.emit('scrollToMsg', 0)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|