search.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view class="title_search">
  3. <span class="iconfont">&#xe67d;</span>
  4. <form @submit="search" report-submit="true">
  5. <input type="text" :name="keyword" v-model="keyword" :placeholder="holder" confirm-type='search'/>
  6. </form>
  7. </view>
  8. </template>
  9. <script>
  10. // +----------------------------------------------------------------------
  11. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  12. // +----------------------------------------------------------------------
  13. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  14. // +----------------------------------------------------------------------
  15. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  16. // +----------------------------------------------------------------------
  17. // | Author: CRMEB Team <admin@crmeb.com>
  18. // +----------------------------------------------------------------------
  19. export default {
  20. props:{
  21. holder: {
  22. type: String,
  23. default: '请输入商品名称'
  24. }
  25. },
  26. data() {
  27. return {
  28. keyword: ''
  29. };
  30. },
  31. methods: {
  32. search(){
  33. this.$emit('getList', this.keyword);
  34. }
  35. }
  36. }
  37. </script>
  38. <style lang="scss" scoped>
  39. .title_search {
  40. background: #f5f5f5;
  41. border-radius: 30rpx;
  42. height: 60rpx;
  43. padding-left: 60rpx;
  44. position: relative;
  45. .iconfont {
  46. position: absolute;
  47. top: 50%;
  48. margin-top: -14rpx;
  49. left: 30rpx;
  50. font-size: 28rpx;
  51. }
  52. input {
  53. height: 60rpx;
  54. font-size: 26rpx;
  55. margin-left: 20rpx;
  56. }
  57. }
  58. </style>