navigationBar.vue 844 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <view class="navigationBarBox">
  3. <view class="navigationBar">
  4. <image v-if="isBack" src="../../static/images/back_icon.png" @tap="tapHandle"></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name:"navigationBar",
  11. props: {
  12. isBack: {
  13. type: Boolean,
  14. default: false
  15. }
  16. },
  17. data() {
  18. return {
  19. };
  20. },
  21. methods: {
  22. tapHandle(){
  23. this.$emit('toBack');
  24. }
  25. }
  26. }
  27. </script>
  28. <style lang="scss">
  29. .navigationBarBox {
  30. background: #fff;
  31. border-radius: 0px 0px 0px 0px;
  32. opacity: 1;
  33. text-align: center;
  34. height: $navigation-height;
  35. position: relative;
  36. >.navigationBar {
  37. bottom: 15px;
  38. position: absolute;
  39. width: 100%;
  40. >image {
  41. position: absolute;
  42. width: 10px;
  43. height: 18px;
  44. left: 10px;
  45. top: 0px;
  46. bottom: 0px;
  47. margin: auto;
  48. }
  49. >text {
  50. }
  51. }
  52. }
  53. </style>