Vue点击按钮控制左侧菜单显示隐藏-elementUI

<template>
<div class="home-container">
<el-menu :collapse="isCollapse">
...
</el-menu>
</div>
<div>
<span  @click="isCollapse = !isCollapse"></span>
</div>
</template>

<script>
export default {
data () {
 return {
   isCollapse: false
 }
}
</script>



 

    原文作者:TATOQOQ
    原文地址: https://blog.csdn.net/TATOQOQ/article/details/107839618
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞