navTop.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!--
  2. * @Author: lcs
  3. * @Date: 2021-04-12 16:50:20
  4. * @LastEditTime: 2021-05-18 14:51:56
  5. * @LastEditors: lcs
  6. * @FilePath: \lananxx-manage\src\components\common\navTop.vue
  7. * @Description:
  8. -->
  9. <template>
  10. <div class="nav-wrap">
  11. <div class="top-head">
  12. <div class="icon-wrap">
  13. <svg class="icon" aria-hidden="true" @click.stop="clickMenu">
  14. <use xlink:href="#iconcaidan" v-if="type == 'front'"></use>
  15. <use
  16. xlink:href="#iconchevronleft"
  17. v-if="type == 'back'"
  18. ></use>
  19. </svg>
  20. </div>
  21. <div>{{ title }}</div>
  22. <div></div>
  23. </div>
  24. <!-- 新增条目 -->
  25. <van-popup
  26. position="top"
  27. v-model="menuShow"
  28. >
  29. <div class="popup-wrap">
  30. <div class="top">
  31. <svg class="icon" aria-hidden="true" @click.stop="()=>{menuShow=false}">
  32. <use xlink:href="#iconb-spsz-scgg" />
  33. </svg>
  34. </div>
  35. <div class="single" @click.stop="JumpMenu('customerList')">
  36. 客户管理
  37. </div>
  38. <div class="single" @click.stop="JumpMenu('orderList')">
  39. 订单管理
  40. </div>
  41. <div class="single" @click.stop="JumpMenu('searchPhone')">
  42. 帮助租赁下单
  43. </div>
  44. <!-- @click.stop="JumpMenu('libraryManage')" -->
  45. <div class="single" @click.stop="JumpMenu('libraryManage')">
  46. 出入库表单
  47. </div>
  48. </div>
  49. </van-popup>
  50. </div>
  51. </template>
  52. <script>
  53. import { Popup } from 'vant';
  54. export default {
  55. components: { [Popup.name]: Popup },
  56. props: {
  57. title: {
  58. type: String,
  59. default: '蓝桉喜喜'
  60. },
  61. type: {
  62. type: String,
  63. default: 'front'
  64. }
  65. },
  66. data(){
  67. return{
  68. menuShow:false
  69. }
  70. },
  71. methods:{
  72. clickMenu(){
  73. if(this.type =='front'){
  74. this.menuShow = true
  75. }else{
  76. this.$router.go(-1)
  77. }
  78. },
  79. JumpMenu(name){
  80. this.$router.push({name})
  81. },
  82. }
  83. };
  84. </script>
  85. <style lang="stylus" rel="stylesheet/stylus" scoped>
  86. @import '~assets/mobile.styl';
  87. .nav-wrap {
  88. padding-bottom: vw(45);
  89. }
  90. .top-head {
  91. height: vw(45);
  92. width: 100vw;
  93. flex-x(center);
  94. box-sizing: border-box;
  95. background: grayF;
  96. border-bottom: vw(1) solid #efefef;
  97. z-index: 11;
  98. position: fixed;
  99. top: 0;
  100. }
  101. .icon-wrap {
  102. position: absolute;
  103. left: vw(15);
  104. .icon {
  105. width: vw(20);
  106. height: vw(20);
  107. }
  108. }
  109. .popup-wrap{
  110. width vw(355)
  111. padding vw(15) vw(27) vw(30) vw(27)
  112. box-sizing border-box
  113. .top{
  114. flex-x()
  115. padding-bottom vw(14)
  116. margin-bottom vw(20)
  117. word-vw(15,#030303)
  118. .icon{
  119. width vw(20)
  120. height vw(20)
  121. fill gray3
  122. }
  123. }
  124. .single{
  125. text-align center
  126. word-vw(18,gray3)
  127. font-weight 600
  128. line-height vw(50)
  129. margin-top vw(12)
  130. border-bottom vw(1) solid #efefef
  131. }
  132. }
  133. </style>