Blame view

ant-design-vue-jeecg/src/views/examples/list/search/SearchLayout.vue 1.46 KB
肖超群 authored
1
2
<template>
  <div class="search-content">
肖超群 authored
3
    <router-view/>
肖超群 authored
4
5
6
7
  </div>
</template>

<script>
肖超群 authored
8
9
10
11
12
13
14
15
16
export default {
  name: "SearchLayout",
  data() {
    return {
      tabs: {
        items: [
          {
            key: '1',
            title: '文章'
肖超群 authored
17
          },
肖超群 authored
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
          {
            key: '2',
            title: '项目'
          },
          {
            key: '3',
            title: '应用'
          },
        ],
        active: () => {
          switch (this.$route.path) {
            case '/list/search/article':
              return '1'
            case '/list/search/project':
              return '2'
            case '/list/search/application':
              return '3'
            default:
              return '1'
肖超群 authored
37
38
          }
        },
肖超群 authored
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
        callback: (key) => {
          switch (key) {
            case '1':
              this.$router.push('/list/search/article')
              break
            case '2':
              this.$router.push('/list/search/project')
              break
            case '3':
              this.$router.push('/list/search/application')
              break
            default:
              this.$router.push('/workplace')
          }
        }
      },
      search: true
肖超群 authored
56
    }
肖超群 authored
57
58
59
60
  },
  computed: {},
  methods: {}
}
肖超群 authored
61
62
63
</script>

<style lang="less" scoped>
肖超群 authored
64
65
66
67
68
69
70
.search-head {
  background-color: #fff;
  margin: -25px -24px -24px;

  .search-input {
    text-align: center;
    margin-bottom: 16px;
肖超群 authored
71
  }
肖超群 authored
72
73
74
75
76
}

.search-content {
  margin-top: 48px;
}
肖超群 authored
77
</style>