1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <template>
- <div class="bottom">
- <el-row class="tac">
- <el-col :span="12">
- <el-menu :default-active="path" background-color="#fff" text-color="#777" active-text-color="#fff" router>
- </el-menu>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- export default {
- props: {
- luyou: Number,
- nav: Array
- },
- data() {
- return {
- path: this.$route.path,
- };
- },
- methods: {
- clickItem: function (path) {
- this.$router.push(path);
- },
- },
- watch: {
- luyou: {
- handler(n, o) {
- this.path = this.$route.path;
- },
- deep: true, // 深度监听父组件传过来对象变化
- },
- },
- };
- </script>
- <style scoped>
- .bottom {
- position: absolute;
- left: 20px;
- margin-top: 20px;
- background-color: #fff;
- width: 180px;
- height: calc(100% - 100px);
- min-height: 500px;
- z-index: 999;
- display: inline-block;
- border-radius: 5px;
- overflow: hidden;
- }
- .item {
- margin: 5px 20%;
- float: left;
- }
- .item p {
- margin: 0;
- font-size: 15px;
- }
- .active {
- color: #108b70;
- }
- .bottom>>>.el-menu-item.is-active {
- background: #3d67bc !important;
- }
- .tac>>>.el-col-12 {
- width: 100%;
- }
- .tac>>>.el-menu {
- border-right: none;
- }
- .tac>>>.el-menu-item {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- </style>
|