猎豆优选小程序

tophang.vue 530B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view class="topHang" @click="goTop">
  3. <u-icon name="arrow-upward" color="#909399" size="40"></u-icon>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name:"tophang",
  9. data() {
  10. return {
  11. };
  12. },
  13. methods:{
  14. goTop(){
  15. this.$emit('goTop')
  16. }
  17. }
  18. }
  19. </script>
  20. <style scoped lang="scss">
  21. .topHang{
  22. position: fixed;
  23. right: 60rpx;
  24. bottom: 200rpx;
  25. width: 80rpx;
  26. height: 80rpx;
  27. background-color: #e1e1e1;
  28. border-radius: 50%;
  29. display: flex;
  30. align-items: center;
  31. justify-content: center;
  32. }
  33. </style>