springBox.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. //这里是搜索框的输入框 不需要的可以删掉
  3. <view>
  4. <view class="arrivalSearch">
  5. <view class="arrivalSmallsearch">
  6. <view class="arrivalSearchInput">
  7. <input type="text" :placeholder="dateinit">
  8. </view>
  9. //这里是输入框旁边的图标(这里的图标是一张图片)
  10. <image src="../../static/img/nav.png" mode="aspectFill" @click.stop="ShowHidden = !ShowHidden"> </image>
  11. </view>
  12. </view>
  13. //这里是弹出来的下拉筛选框
  14. <view class="arrivalNavigation">
  15. <view class="d4"></view>
  16. <view class="sideNavigation">
  17. <nav>
  18. <li>到货查询</li>
  19. <view class="liBottomBorder"></view>
  20. <li>门店查询</li>
  21. <view class="liBottomBorder"></view>
  22. <li>货号查询</li>
  23. <view class="liBottomBorder"></view>
  24. <li>降价查询</li>
  25. </nav>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. ShowHidden: false,
  35. dateinit: '请输入货号',
  36. };
  37. },
  38. methods: {
  39. // 点击页面事件 隐藏需要隐藏的区域
  40. HiddenClick() {
  41. this.ShowHidden = false
  42. },
  43. },
  44. mounted() {
  45. // document.addEventListener('click', this.HiddenClick)
  46. },
  47. }
  48. </script>
  49. <style lang="less">
  50. .arrivalSearch {
  51. width: 100%;
  52. height: 100rpx;
  53. background-color: #fff;
  54. box-shadow: 0 0 10rpx #eee;
  55. .arrivalSmallsearch {
  56. width: 96%;
  57. display: flex;
  58. .arrivalSearchInput {
  59. height: 70rpx;
  60. background-color: #F0F1F6;
  61. border-radius: 40rpx;
  62. font-size: 25rpx;
  63. margin-left: 10rpx;
  64. margin-top: 10rpx;
  65. width: 608rpx;
  66. }
  67. input {
  68. width: 80%;
  69. margin-left: 40rpx;
  70. margin-top: 10rpx;
  71. }
  72. image {
  73. width: 40rpx;
  74. height: 40rpx;
  75. margin-left: 20rpx;
  76. margin-top: 20rpx;
  77. }
  78. }
  79. }
  80. //从这里开始是弹出框的样式 不需要搜索框的 前面样式都不用加
  81. .arrivalNavigation {
  82. width: 250rpx;
  83. position: absolute;
  84. right: 20rpx;
  85. z-index: 99;
  86. .sideNavigation {
  87. width: 248rpx;
  88. background-color: #202020;
  89. color: #eee;
  90. border-radius: 10rpx;
  91. li {
  92. height: 85rpx;
  93. text-align: center;
  94. line-height: 85rpx;
  95. font-size: 25rpx;
  96. }
  97. .liBottomBorder {
  98. border: 0.1rpx solid #373737;
  99. }
  100. }
  101. .d4 {
  102. // position: absolute;
  103. // left: 140rpx;
  104. width: 0;
  105. height: 0;
  106. margin-left: 150rpx;
  107. margin-top: -20rpx;
  108. border-width: 20rpx;
  109. border-style: solid;
  110. border-color: transparent #333 transparent transparent;
  111. transform: rotate(90deg);
  112. /*顺时针旋转90°*/
  113. }
  114. }
  115. </style>