搜索条的排版设计

image.png

  1. <template>
  2. <view class="search-container">
  3. <image src="../../static/img/logo-small.jpg" class="logo"></image>
  4. <view class="search-bar">
  5. <icon type="search" size="16" class="search-icon"></icon>
  6. <input type="text" placeholder="请输入关键字" class="search"
  7. confirm-type="search" v-model="keyword" @confirm="handleSearch"/>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. keyword:null
  16. }
  17. },
  18. methods: {
  19. handleSearch:function(){
  20. console.log(this.keyword);
  21. }
  22. }
  23. }
  24. </script>
  25. <style lang="less">
  26. @import url("index.less");
  27. </style>