| | |
| | | <template> |
| | | <div class="left-nav"> |
| | | <h1> |
| | | <img class="icon" :src="`${publicPath}images/shuohuang/railroad.png`" style="height: 40px;" /> |
| | | <span v-show="!isCollapse" style="padding-left: 6px;">朔黄铁路机辆分公司</span> |
| | | <img |
| | | class="icon" |
| | | :src="`${publicPath}images/shuohuang/railroad.png`" |
| | | style="height: 40px" |
| | | /> |
| | | <span v-show="!isCollapse" style="padding-left: 6px" |
| | | >朔黄铁路机辆分公司</span |
| | | > |
| | | </h1> |
| | | <el-menu |
| | | class="el-menu-vertical-demo" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | //import railroadImg from '/images/shuohuang/railroad.png'; |
| | | export default { |
| | | props: { |
| | | isCollapse: { |
| | | type: Boolean, |
| | | default: true |
| | | default: true, |
| | | }, |
| | | menuChange: { |
| | | type: Function |
| | | } |
| | | type: Function, |
| | | }, |
| | | }, |
| | | computed: { |
| | | isAdmin() { |
| | |
| | | data() { |
| | | return { |
| | | publicPath: process.env.BASE_URL, |
| | | activeIndex: 'guideIndex' |
| | | } |
| | | activeIndex: "guideIndex", |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // if (this.isAdmin) { |
| | |
| | | // this.activeIndex = sessionStorage.getItem('leftNavAct'); |
| | | // } |
| | | // } |
| | | this.activeIndex = this.isAdmin ? 'guideIndex' : 'searchForVideoAnalyze'; |
| | | this.activeIndex = this.isAdmin ? "guideIndex" : "searchForVideoAnalyze"; |
| | | |
| | | this.$emit('menuChange', this.activeIndex); |
| | | this.$emit("menuChange", this.activeIndex); |
| | | }, |
| | | methods: { |
| | | handleSelect(index, indePath) { |
| | | this.activeIndex = index; |
| | | sessionStorage.setItem('leftNavAct', this.activeIndex); |
| | | this.$emit('menuChange', index); |
| | | sessionStorage.setItem("leftNavAct", this.activeIndex); |
| | | this.$emit("menuChange", index); |
| | | }, |
| | | handleOpen() { |
| | | |
| | | }, |
| | | handleClose() { |
| | | |
| | | } |
| | | } |
| | | } |
| | | handleOpen() {}, |
| | | handleClose() {}, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |