ResultTitle.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="result-title text-muted">
  3. 搜索"<span class="text-inverse" >{{keyword}}</span>"
  4. <!--<span v-if="status != 1">暂无此型号</span>-->
  5. <span>,为您找到
  6. <span class="text-num" v-text="good_list.total"></span> 个<span v-if="status == 2">相关</span>信息
  7. </span>:
  8. </div>
  9. </template>
  10. <script>
  11. export default{
  12. props: ['keyword', 'page'],
  13. data () {
  14. return {
  15. status: 1
  16. }
  17. },
  18. computed: {
  19. good_lists () {
  20. return this.$store.state.searchData.searchList.lists
  21. },
  22. good_list () {
  23. // if (this.page === 1) {
  24. // if (this.good_lists.data.components && this.good_lists.data.components.length > 0) {
  25. // if (this.keyword.toUpperCase() === this.good_lists.data.components[0].code.toUpperCase()) {
  26. // this.status = 1
  27. // } else {
  28. // this.status = 2
  29. // }
  30. // } else {
  31. // this.status = 3
  32. // }
  33. // }
  34. return this.good_lists.data
  35. }
  36. }
  37. }
  38. </script>
  39. <style scoped>
  40. #searchResult .result-title {
  41. margin-top: 5px;
  42. padding: 10px 5px;
  43. min-height: 30px;
  44. line-height: 30px;
  45. font-size: 14px;
  46. }
  47. .text-inverse {
  48. color: #f40!important;
  49. word-break: break-all;
  50. }
  51. .text-num {
  52. font-style: normal;
  53. font-family: verdana;
  54. color: #0b7bef;
  55. }
  56. </style>