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
94
95
96
97
98
99
100
101
102
103
104
| <template>
| <div>
| <ul class="menu_main">
| <li class="back_li">
| <div @click="back" class="back_list" style="font-size:12px">
| <i class="el-icon-back"></i>
| {{ title }}
| </div>
| </li>
| <li v-for="(item, index) in menuItems" :key="index" class="menu_li">
| <span
| ref="spans"
| class="li_def_span"
| v-bind:class="[item.isActive ? 'li_active_span' : '']"
| @click="$emit('jump', index)"
| >
| {{ item.label }}
| </span>
| </li>
| </ul>
| </div>
| </template>
| <script>
| export default {
| props: {
| /**
| * 菜单项
| * @example
| */
| menuItems: {
| type: Array,
| default: () => []
| },
| title: {
| type: String,
| default: () => "返回列表"
| }
| },
| methods: {
| back() {
| this.$emit("backList");
| }
| }
| };
| </script>
| <style lang="less" scoped>
| .menu_main {
| width: 100%;
| padding-inline-start: inherit;
| }
|
| .menu_li {
| text-align: left;
| padding-top: 34px;
| list-style-type: none;
| }
|
| .back_li {
| padding-top: 10px;
| text-align: center;
| list-style-type: none;
| }
|
| .li_def_span {
| height: 20px;
| font-size: 14px;
| font-weight: 400;
| color: rgba(34, 34, 34, 1);
| line-height: 20px;
| margin-left: 20px;
| cursor: pointer;
| }
|
| .li_active_span {
| font-size: 14px;
| color: #0081f0;
| }
|
| .back_list {
| min-width: 83px;
| max-width: 105px;
| height: 24px;
| line-height: 24px;
| background: rgba(245, 245, 245, 1);
| border-radius: 12px;
| margin-left: 20px;
| color: #222222;
| cursor: pointer;
| & span {
| position: relative;
| left: -18px;
| top: -1px;
| }
| }
|
| .el-icon-back {
| position: relative;
| left: 3px;
| top: 1px;
| margin-right: 0px;
| font-size: 14px;
| font-weight: bold;
| }
| </style>
|
|