my-search.vue 887 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="my-search-content" :style="{'background-color' : bgcolor}" @click="efn">
  3. <view class="my-search-box" :style="{'border-radius':radius}">
  4. <uni-icons type="search" size="17"></uni-icons>
  5. <text class="place">搜索</text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. props:{
  12. bgcolor:{
  13. type:String,
  14. default:'#c00000'
  15. },
  16. radius:{
  17. type:Number,
  18. default:18
  19. }
  20. },
  21. name:"my-search",
  22. data() {
  23. return {
  24. };
  25. },
  26. methods:{
  27. efn(){
  28. this.$emit('mgs')
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss">
  34. .my-search-content{
  35. height: 100rpx;
  36. display: flex;
  37. align-items: center;
  38. padding: 0 10px 0 10px;
  39. .my-search-box{
  40. width: 100%;
  41. height: 78rpx;
  42. background-color:#ffffff;
  43. display: flex;
  44. align-items: center;
  45. justify-content: center;
  46. .place{
  47. font-size: 30rpx;
  48. }
  49. }
  50. }
  51. </style>