赞
踩
// HTML片段 <section class="drawer" :style="{'width': isShowDrawer? '600px' : '0px'}"> <!-- 关闭按钮 --> <div class="closeBtn" @click="isShowDrawer = !isShowDrawer"> <i class="el-icon-close"></i> </div> </section> // JS片段 isShowDrawer: false, // 定义关闭按钮 // CSS片段 .drawerShow { position: absolute; z-index: 2; right: 0; top: 0; height: calc(100vh - 70px); border-radius: 4px 0px 0px 4px; background-color: #fff; box-shadow: 0px 2px 4px 0px #14161b; // 主要靠下面两行实现效果 overflow: hidden; // 很重要!!!! transition: 0.3s ease; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。