dialog-selectProduction.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <dialog-base class="dialog-body" ref="baseDialog" title="搜索产品">
  3. <view class="box-bg uni-row">
  4. <view class="input-view uni-row">
  5. <uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
  6. <input class="nav-bar-input" type="text" v-model="keywords" placeholder="请输入产品描述" />
  7. </view>
  8. <view class="search" @click="handleSearch">
  9. 搜索
  10. </view>
  11. </view>
  12. </dialog-base>
  13. </template>
  14. <script setup>
  15. import {
  16. ref,
  17. getCurrentInstance
  18. } from 'vue'
  19. import {
  20. store
  21. } from '../../store';
  22. const baseDialog = ref(null)
  23. function open() {
  24. baseDialog.value.open();
  25. }
  26. function close() {
  27. baseDialog.value.close()
  28. }
  29. defineExpose({
  30. open
  31. })
  32. </script>
  33. <style lang="scss">
  34. $nav-height: 60rpx;
  35. .dialog-body {
  36. // height: 60%;
  37. // margin: auto auto;
  38. overflow: auto;
  39. }
  40. .box-bg {
  41. width: 94%;
  42. background-color: #F5F5F5;
  43. padding: 5rpx 16rpx;
  44. justify-content: space-around;
  45. align-items: center;
  46. margin: 24rpx auto 0;
  47. .input-view {
  48. width: 100%;
  49. flex: 4;
  50. background-color: #f8f8f8;
  51. height: $nav-height;
  52. border: 1rpx solid #999;
  53. border-radius: 15rpx;
  54. padding: 0 15rpx;
  55. flex-wrap: nowrap;
  56. margin: 0 10rpx 0;
  57. line-height: $nav-height;
  58. .input-uni-icon {
  59. line-height: $nav-height;
  60. }
  61. .nav-bar-input {
  62. width: 80%;
  63. height: $nav-height;
  64. line-height: $nav-height;
  65. padding: 0 5rpx;
  66. background-color: #f8f8f8;
  67. }
  68. }
  69. .search {
  70. width: 20%;
  71. text-align: center;
  72. color: #808080;
  73. }
  74. }
  75. </style>