index.vue 591 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <view class="search-bar-wrap" @click="$emit('click')">
  3. <uni-icons type="search" size="14" color="#999"></uni-icons>
  4. <text class="search-placeholder">{{ placeholder }}</text>
  5. </view>
  6. </template>
  7. <script setup>
  8. defineProps({
  9. placeholder: { type: String, default: '搜索服务内容' }
  10. })
  11. defineEmits(['click'])
  12. </script>
  13. <style lang="scss" scoped>
  14. .search-bar-wrap {
  15. display: flex;
  16. align-items: center;
  17. background: rgba(255, 255, 255, 0.85);
  18. border-radius: 40rpx;
  19. padding: 16rpx 24rpx;
  20. gap: 12rpx;
  21. }
  22. .search-placeholder {
  23. font-size: 26rpx;
  24. color: #999;
  25. }
  26. </style>