特易招,招聘小程序
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.

127 lines
2.2 KiB

2 months ago
  1. <template>
  2. <!-- <view class="navbar"
  3. :style="{backgroundColor : bgColor}"> -->
  4. <view class="title"
  5. :style="{backgroundColor : bgColor,color}">
  6. <view class="left">
  7. <uv-icon name="arrow-left"
  8. v-if="leftClick"
  9. @click="$emit('leftClick')"
  10. :color="color" size="46rpx"></uv-icon>
  11. </view>
  12. <view>{{ title }}</view>
  13. <view class="icon">
  14. <uv-icon name="search"
  15. v-if="isSearch"
  16. :color="color" size="58rpx"></uv-icon>
  17. <uv-icon name="plus-circle" :color="color"
  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="color"
  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 : '#F9FEFE'
  61. },
  62. color : {
  63. default : '#333'
  64. }
  65. },
  66. created() {
  67. },
  68. beforeDestroy() {
  69. },
  70. data() {
  71. return {
  72. };
  73. },
  74. methods : {
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. // .navbar{
  80. // width: 100%;
  81. // height: 120rpx;
  82. // padding-top: var(--status-bar-height);
  83. // }
  84. .title{
  85. position: sticky;
  86. top: 0;
  87. left: 0;
  88. padding-top: calc(var(--status-bar-height) + 20rpx);
  89. width: 100%;
  90. height: 100rpx;
  91. background-color: #F9FEFE;
  92. display: flex;
  93. justify-content: center;
  94. font-size: 32rpx;
  95. align-items: center;
  96. z-index: 99999;
  97. .left{
  98. position: absolute;
  99. left: 40rpx;
  100. display: flex;
  101. justify-content: flex-start;
  102. }
  103. .icon{
  104. position: absolute;
  105. right: 40rpx;
  106. display: flex;
  107. justify-content: flex-end;
  108. }
  109. }
  110. @keyframes fade-in {
  111. 0% {
  112. opacity: 0;
  113. }
  114. 100% {
  115. opacity: 1;
  116. }
  117. }
  118. </style>