1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
| <template>
| <div class="nav-app">
| <div
| :class="{
| 'nav-item': currNav != item.name,
| 'nav-item active': currNav == item.name,
| }"
| v-for="(item, i) in navList"
| :key="i"
| :name="item.name"
| @click="selectNav(item.name)"
| >
| <Badge :dot="item.component == 'hot'">
| <XIcon :type="item.icon" size="24"></XIcon>
| </Badge>
| <div class="nav-title-wrap">
| <div class="nav-title">{{ item.title }}</div>
| </div>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: "apps",
| props: {
| navList: Array,
| currNav: String,
| },
| data() {
| return {};
| },
| methods: {
| selectNav(v) {
| this.$emit("on-click", v);
| },
| },
| watch: {},
| };
| </script>
|
| <style lang="less">
| .nav-app {
| padding: 3px 8px;
| min-height: 94px;
| width: 320px;
| display: flex;
| flex-wrap: wrap;
| .nav-item {
| width: 101.33px;
| height: 94px;
| display: flex;
| justify-content: center;
| align-items: center;
| flex-direction: column;
| cursor: pointer;
| border: 1px solid transparent;
| transition: all 0.2s ease-in-out;
| padding: 15px 0 9px;
| color: #515a6e;
| .nav-title-wrap {
| height: 34px;
| display: flex;
| align-items: center;
| justify-content: center;
| .nav-title {
| font-size: 13px;
| width: 90px;
| text-align: center;
| margin-top: 9px;
| overflow: hidden;
| text-overflow: ellipsis;
| white-space: nowrap;
| }
| }
| &:hover {
| color: #2d8cf0;
| border-color: #eff2f7;
| .nav-title-wrap {
| .nav-title {
| overflow: visible;
| text-overflow: unset;
| white-space: unset;
| }
| }
| }
| }
| .active {
| background: #f0faff;
| color: #2d8cf0;
| }
| }
| </style>
|
|