en-search.vue 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="">
  3. <view class="row search center sys-background-fff r-100 m-20 p-l16">
  4. <uni-icons type="search" size="18" color="#999"></uni-icons>
  5. <input class="flex p-l20" type="text" :placeholder="placeholder"
  6. placeholder-style="font-size:28rpx;color:#999" v-model="value" />
  7. <view class="search-text size-28" @click.stop="setSearch">搜索</view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. placeholder: {
  15. type: String,
  16. default: ''
  17. },
  18. bgColor: {
  19. type: String,
  20. default: '#ffffff'
  21. },
  22. back: {
  23. type: Boolean,
  24. default: false
  25. },
  26. },
  27. data() {
  28. return {
  29. value: ''
  30. }
  31. },
  32. methods: {
  33. setSearch(){
  34. this.$emit('setSearch',this.value)
  35. },
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .search {
  41. line-height: 50rpx;
  42. }
  43. .search-text {
  44. color: #fff;
  45. padding: 0 40rpx;
  46. margin: 10rpx;
  47. background-color: #0FB160;
  48. border-radius: 100rpx;
  49. }
  50. </style>