| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <div class="left">
- <ul>
- <li :class="{active:ind===item.id}" v-for="(item, index) in tabList" :key="index" @click="skip(item.id)">
- <i class="el-icon-edit"></i>
- {{ item.name }}
- </li>
- </ul>
- </div>
- </template>
- <script>
- export default {
- components: {},
- props: {
- ind: {
- type: Number,
- default: 0
- }
- },
- data () {
- return {
- tabList: [
- { name: '用户管理', id: 2 },
- { name: '系统日志', id: 1 }
- ]
- }
- },
- methods: {
- skip (index) {
- this.$router.push(`/layout/system${index}`).catch(() => {})
- }
- }
- }
- </script>
- <style lang='less' scoped>
- .left {
- width: 220px;
- min-width: 130px;
- height: 868px;
- background-color: #fff;
- box-shadow: 1px 1px 10px 1px;
- ul {
- li {
- cursor: pointer;
- color: black;
- font-size: 16px;
- height: 60px;
- display: flex;
- align-items: center;
- i {
- margin: 0 18px;
- }
- }
- li:hover{
- background:#e6f7ff ;
- }
- .active {
- background:#e6f7ff ;
- }
- }
- }</style>
|