back.vue 667 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view>
  3. <view class="back" @click="back()">
  4. <text class="cuIcon-back" style="color: #FFFFFF;"></text>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name:"back",
  11. data() {
  12. return {
  13. };
  14. },
  15. methods:{
  16. back(){
  17. uni.navigateBack({
  18. delta:1
  19. })
  20. },
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. .back{
  26. position: fixed;
  27. width: 100%;
  28. top: calc(var(--status-bar-height) + 16rpx);
  29. left: 20rpx;
  30. z-index: 99999;
  31. transition: top .25s;
  32. width: 60rpx;
  33. height: 60rpx;
  34. border-radius: 50%;
  35. background-color: rgba(0,0,0,.2);
  36. display: flex;
  37. justify-content: center;
  38. align-items: center;
  39. }
  40. </style>