7d720953325ed0ae788dd244a22189b8168d38f9.svn-base 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <div class="search-content">
  3. <router-view />
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: "SearchLayout",
  9. data () {
  10. return {
  11. tabs: {
  12. items: [
  13. {
  14. key: '1',
  15. title: '文章'
  16. },
  17. {
  18. key: '2',
  19. title: '项目'
  20. },
  21. {
  22. key: '3',
  23. title: '应用'
  24. },
  25. ],
  26. active: () => {
  27. switch (this.$route.path) {
  28. case '/list/search/article':
  29. return '1'
  30. case '/list/search/project':
  31. return '2'
  32. case '/list/search/application':
  33. return '3'
  34. default:
  35. return '1'
  36. }
  37. },
  38. callback: (key) => {
  39. switch (key) {
  40. case '1':
  41. this.$router.push('/list/search/article')
  42. break
  43. case '2':
  44. this.$router.push('/list/search/project')
  45. break
  46. case '3':
  47. this.$router.push('/list/search/application')
  48. break
  49. default:
  50. this.$router.push('/workplace')
  51. }
  52. }
  53. },
  54. search: true
  55. }
  56. },
  57. computed: {
  58. },
  59. methods: {
  60. }
  61. }
  62. </script>
  63. <style lang="less" scoped>
  64. .search-head{
  65. background-color: #fff;
  66. margin: -25px -24px -24px;
  67. .search-input{
  68. text-align: center;
  69. margin-bottom: 16px;
  70. }
  71. }
  72. .search-content{
  73. margin-top: 48px;
  74. }
  75. </style>