back.vue 696 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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: var(--status-bar-height);
  29. margin-top: var(--status-bar-height);
  30. left: 20rpx;
  31. z-index: 99999;
  32. transition: top .25s;
  33. width: 60rpx;
  34. height: 60rpx;
  35. border-radius: 50%;
  36. background-color: rgba(0,0,0,.2);
  37. display: flex;
  38. justify-content: center;
  39. align-items: center;
  40. }
  41. </style>