You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
837 B

8 months ago
  1. <template>
  2. <view class="navbar">
  3. <div class="leftClick"
  4. v-if="leftClick"
  5. @click="leftClick">
  6. <uni-icons color="#fff" type="left" size="20rpx"></uni-icons>
  7. </div>
  8. <div>{{ title }}</div>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name:"m-navbar",
  14. props : ['leftClick', 'title'],
  15. data() {
  16. return {
  17. };
  18. },
  19. methods : {
  20. }
  21. }
  22. </script>
  23. <style scoped lang="scss">
  24. .navbar{
  25. position: sticky;
  26. top: 0;
  27. width: 100%;
  28. height: 90rpx;
  29. background: linear-gradient(to right, #4899a6, #6fc6ad);
  30. display: flex;
  31. justify-content: center;
  32. align-items: center;
  33. color: #fff;
  34. font-size: 26rpx;
  35. z-index: 9999;
  36. .leftClick{
  37. position: absolute;
  38. left: 0px;
  39. top: 0;
  40. width: 80rpx;
  41. height: 100%;
  42. display: flex;
  43. justify-content: center;
  44. align-items: center;
  45. }
  46. }
  47. .navbar-b{
  48. height: 90rpx;
  49. }
  50. </style>