reverse-back.vue 726 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="reverse-back-box" @click.stop="reverseBackBtn">
  3. <text class="iconfont" :style="{'color': iconColor}">&#xe8b5;</text>
  4. <slot name="extend"></slot>
  5. </view>
  6. </template>
  7. <script>
  8. import { reverseBack } from "@/utils/common.js"
  9. export default {
  10. name: 'reverse-back',
  11. props:{
  12. iconColor:{
  13. type:String,
  14. default:'#000'
  15. },
  16. path:{
  17. type:String,
  18. default:''
  19. }
  20. },
  21. data() {
  22. return {
  23. };
  24. },
  25. methods: {
  26. reverseBackBtn() {
  27. reverseBack(this.path)
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .reverse-back-box {
  34. min-width: 50rpx;
  35. height: 50rpx;
  36. display: flex;
  37. align-items: center;
  38. height: 100%;
  39. .iconfont{
  40. font-size: 40rpx;
  41. }
  42. }
  43. </style>