铝交易,微信公众号
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.

124 lines
2.1 KiB

4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <!-- <view class="navbar"
  3. :style="{backgroundColor : bgColor}"> -->
  4. <view class="title"
  5. :style="{backgroundColor : bgColor}">
  6. <view class="left">
  7. <uv-icon name="arrow-left"
  8. v-if="leftClick"
  9. @click="$emit('leftClick')"
  10. color="#FFF" size="46rpx"></uv-icon>
  11. </view>
  12. <view style="color:#FFF">{{ title }}</view>
  13. <view class="icon">
  14. <uv-icon name="search"
  15. v-if="isSearch"
  16. color="#FFF" size="58rpx"></uv-icon>
  17. <uv-icon name="plus-circle" color="#333"
  18. v-if="isPlus"
  19. @click="plusCircleShow = true"
  20. size="46rpx" style="margin-left: 30rpx;"></uv-icon>
  21. <view v-if="moreClick" style="margin-left: 30rpx;">
  22. <uv-icon name="more-dot-fill" color="#333"
  23. v-if="!moreText"
  24. @click="moreClick()"
  25. size="46rpx"></uv-icon>
  26. <view v-else @click="moreClick"
  27. style="font-weight: 400;font-size: 30rpx;">
  28. {{ moreText }}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- </view> -->
  34. </template>
  35. <script>
  36. export default {
  37. name:"navbar",
  38. props : {
  39. title : {
  40. type : String,
  41. default : ''
  42. },
  43. leftClick : {
  44. type : Boolean,
  45. },
  46. moreClick : {
  47. type : Function,
  48. },
  49. isSearch : {
  50. type : Boolean,
  51. default : false,
  52. },
  53. isPlus : {
  54. type : Boolean,
  55. default : false,
  56. },
  57. moreText : {
  58. },
  59. bgColor : {
  60. default : '#1f1c39'
  61. }
  62. },
  63. created() {
  64. },
  65. beforeDestroy() {
  66. },
  67. data() {
  68. return {
  69. };
  70. },
  71. methods : {
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. // .navbar{
  77. // width: 100%;
  78. // height: 120rpx;
  79. // padding-top: var(--status-bar-height);
  80. // }
  81. .title{
  82. position: sticky;
  83. top: 0;
  84. left: 0;
  85. padding-top: calc(var(--status-bar-height) + 20rpx);
  86. width: 100%;
  87. height: 100rpx;
  88. background-color: #fff;
  89. display: flex;
  90. justify-content: center;
  91. font-size: 32rpx;
  92. align-items: center;
  93. z-index: 99999;
  94. .left{
  95. position: absolute;
  96. left: 40rpx;
  97. display: flex;
  98. justify-content: flex-start;
  99. }
  100. .icon{
  101. position: absolute;
  102. right: 40rpx;
  103. display: flex;
  104. justify-content: flex-end;
  105. }
  106. }
  107. @keyframes fade-in {
  108. 0% {
  109. opacity: 0;
  110. }
  111. 100% {
  112. opacity: 1;
  113. }
  114. }
  115. </style>