zoukankan      html  css  js  c++  java
  • elementUI内置过渡(折叠)

    elementUI内置过渡动画(折叠),使用<el-collapse-transition>标签包裹要折叠的元素即可

    例子:

    <template>
      <div>
        <div class="ctn">
          <!-- 使用el-collapse-transition标签包裹着需要折叠的元素 -->
          <el-collapse-transition>
            <div class="box" v-show="show">el-collapse-transition</div>
          </el-collapse-transition>
        </div>
        <el-button type="primary" @click="test()">折叠</el-button>
      </div>
    </template>
    <script>
    export default {
      name: "HelloWorld",
      data() {
        return {
          show: true
        };
      },
      methods: {
        test() {
          this.show = !this.show;
        }
      }
    };
    </script>
    <style lang="css" scoped>
    .ctn {
      width: 500px;
      height: 300px;
    }
    
    .box {
      display: inline-block;
      width: 200px;
      height: 200px;
      line-height: 200px;
      text-align: center;
      color: #fff;
      background-color: greenyellow;
      margin-right: 20px;
    }
    </style>
  • 相关阅读:
    虚拟机安装
    虚拟机简介
    stm32(新建工程)
    高校教室管理系统
    按键抬起有效
    数码管0~9显示
    流水灯程序设计
    P0.0口驱动一个LED闪烁
    Adobe 系列下载链接
    Microsoft 常用下载链接
  • 原文地址:https://www.cnblogs.com/luguankun/p/11615122.html
Copyright © 2011-2022 走看看