fenlei.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div id="fenlei">
  3. <el-col class="swfl">
  4. <el-image style="width:22px;height:22px;margin:0 5px -5px 0;" :src="src"></el-image>
  5. <span>政策分类</span>
  6. </el-col>
  7. <el-col>
  8. <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">
  9. <el-menu-item index="1" v-for="(item, index) in liebiaoList" :key="index" @click="clickUrl(item.id)">
  10. <span slot="title">{{ item.name }}</span>
  11. </el-menu-item>
  12. </el-menu>
  13. </el-col>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'fenlei',
  19. props: {
  20. liebiaoList: null,
  21. },
  22. components: {},
  23. data: () => ({
  24. src: require('@/assets/swfl.png'),
  25. }),
  26. created() {},
  27. computed: {},
  28. methods: {
  29. clickUrl(id) {
  30. this.$emit('clickLists', { id });
  31. },
  32. handleOpen(key, keyPath) {
  33. console.log(key, keyPath);
  34. },
  35. handleClose(key, keyPath) {
  36. console.log(key, keyPath);
  37. },
  38. },
  39. };
  40. </script>
  41. <style lang="less" scoped>
  42. .swfl {
  43. height: 60px;
  44. width: 240px;
  45. line-height: 60px;
  46. background-color: #22529a;
  47. text-align: center;
  48. }
  49. .swfl span {
  50. font-size: 22px;
  51. color: #ffffff;
  52. }
  53. /deep/.el-menu-item {
  54. height: 60px;
  55. text-align: center;
  56. line-height: 60px;
  57. border-bottom: 1px dashed;
  58. font-size: 22px;
  59. }
  60. /deep/.el-menu-item:last-child {
  61. border-bottom: none;
  62. }
  63. </style>