header.vue 829 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template name="Header">
  2. <view class="header">
  3. <image
  4. src="../../static/images/backicon.png"
  5. class="back"
  6. @tap="goback"
  7. ></image>
  8. <view class="title">{{ title }}</view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'setting',
  14. props: {
  15. title: {
  16. type: String,
  17. default: '',
  18. },
  19. },
  20. data() {
  21. return {};
  22. },
  23. methods: {
  24. // 返回上一页
  25. goback() {
  26. this.$mRouter.back();
  27. },
  28. },
  29. };
  30. </script>
  31. <style lang="scss" scopde>
  32. .header {
  33. width: 100%;
  34. background-color: #ffffff;
  35. display: flex;
  36. padding: 23upx 33upx;
  37. position: fixed;
  38. .back {
  39. width: 24upx;
  40. height: 43upx;
  41. }
  42. .title {
  43. flex: 1;
  44. font-size: 34upx;
  45. font-weight: 700;
  46. color: $titleColor;
  47. text-align: center;
  48. letter-spacing: 3upx;
  49. }
  50. }
  51. </style>