12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <div id="fenlei">
- <el-col class="swfl" :span="24">
- <el-image style="width:22px;height:22px;margin:0 5px -5px 0;" :src="src"></el-image>
- <span>个人中心</span>
- </el-col>
- <el-col>
- <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">
- <el-menu-item index="1" v-for="(item, index) in liebiaoList" :key="index">
- <template v-if="item.name.includes('消息')">
- <span slot="title" @click="clickUrl(item.name)" :style="`color:${haveMsg ? 'red' : ''}`">
- {{ item.name }}
- </span>
- </template>
- <template v-else>
- <span slot="title" @click="clickUrl(item.name)">{{ item.name }}</span>
- </template>
- </el-menu-item>
- </el-menu>
- </el-col>
- </div>
- </template>
- <script>
- export default {
- name: 'fenlei',
- props: {
- liebiaoList: null,
- },
- components: {},
- data: () => ({
- src: require('@/assets/swfl.png'),
- haveMsg: false,
- }),
- created() {},
- computed: {},
- methods: {
- clickUrl(id) {
- this.$emit('onsave', { id });
- },
- handleOpen(key, keyPath) {
- console.log(key, keyPath);
- },
- handleClose(key, keyPath) {
- console.log(key, keyPath);
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .swfl {
- height: 60px;
- line-height: 60px;
- background-color: #22529a;
- text-align: center;
- }
- .swfl span {
- font-size: 22px;
- color: #ffffff;
- }
- /deep/.el-menu-item {
- height: 60px;
- text-align: center;
- line-height: 60px;
- border-bottom: 1px dashed;
- font-size: 22px;
- }
- /deep/.el-menu-item:last-child {
- border-bottom: none;
- }
- </style>
|