组件

<template>
<div class="hide-page-com">
<ul class="tab-tilte">
<li
v-for="(title,index) in tabTitle"
:key="index"
@click="getclcik(index)"
class="menu-li"
:class="{active:cur==index}"
>{{title}}</li>
<div class="right-part">
<i @click="handlerThe" class="icon-folding iconfont"></i>
</div>
</ul>
<el-collapse-transition>
<div v-if="show3" class="cont-cont">
<p v-for="item in 5" class="item-list-cont">1211111111111111111111111111111111</p>
</div>
</el-collapse-transition>
</div>
</template> <script>
export default {
data() {
return {
tabTitle: ['标题一', '标题二', '标题三', '标题四'],
cur: 0, //默认选中第一个tab
show3: true
}
},
methods: {
getclcik(value) {
this.cur = value;
}, handlerThe() {
this.show3 = !this.show3;
}
}
}
</script> <style lang="scss" scoped>
.hide-page-com {
background: #ffffff;
border-radius: 10px;
}
.tab-tilte {
display: flex;
height: 56px;
align-items: center;
padding-left: 24px;
} .menu-li {
padding: 10px 0;
text-align: center;
cursor: pointer;
margin-right: 28px;
} /* 点击对应的标题添加对应的背景颜色 */
.active {
color: #09f;
border-bottom: 2px solid #09f;
} .tab-content div {
line-height: 100px;
text-align: center;
} .right-part {
flex: 1;//右边区域自动适应
text-align: right;
padding-right: 20px;
} .cont-cont {
padding-left: 24px;
padding-right: 36px;
display: flex;
flex-direction: column;
justify-content: space-between; .item-list-cont {
height: 36px;
line-height: 36px;
}
}
// 两个模块各占50%(重点)
// 如果想让两个模块中间有间距 直接最后一个模块 margin-left: 20px;(了解)
</style>
使用页面
<template>
<div class="index-page">
<div class="flex-block">
<div class="half">
<com-box></com-box>
</div> <div class="half lefthale">
<com-box></com-box>
</div>
</div>
</div>
</template> <script>
export default {
data() {
return { }
}, components: {
'com-box': () => import('./com')
}
}
</script> <style lang="scss" scoped>
.index-page {
height: 100%;
background: #ccc;
.flex-block {
display: flex;
}
.half {
width: 50%;
}
.lefthale {
margin-left: 20px;
}
}
</style>
动画使用了elementUi中的。
collapse 展开折叠
使用 el-collapse-transition 组件实现折叠展开效果。 我疑惑的是为啥组件中没有互相影响。
我点击左边的 应该会影响右边的组件啊
但是却没有 不晓得为啥子

vue结合elementUI折叠展开效果动画的更多相关文章

  1. EasyUI tree 优化--点击文字折叠展开效果

    $(function () { $('#tree_menu').tree({ onSelect: function (node) { if (node.state == "closed&qu ...

  2. 右上角鼠标滑过展开收缩动画效果js代码的演示页面

    http://files.cnblogs.com/files/tanlingdangan/top_right.rar.gz 右上角鼠标滑过展开收缩动画效果js代码的演示页面http://www.51x ...

  3. Vue+SSM+Element-Ui实现前后端分离(1)

    前言:最近学习vue,就突发奇想,小菜鸟的我是时候锻炼锻炼自己.闲话不说,整起 <-_-> 整体规划:先搭建前端,接下来后端,最后整合. 一.创建vue项目 1.安装nodejs( 傻瓜式 ...

  4. CSS - toggle collapse 类似bootstrap的展开效果

    问题:toggle collapse 类似bootstrap的展开效果(展开一个关闭另一个) Demo:http://jsfiddle.net/JSDavi/L47vscw4/ 方案:使用transi ...

  5. jq与原生js实现收起展开效果

    jq与原生js实现收起展开效果 (jq需自己加载) <!DOCTYPE html> <html> <head> <meta charset="UTF ...

  6. Swift - UITableView展开缩放动画

    Swift - UITableView展开缩放动画 效果 源码 https://github.com/YouXianMing/Swift-Animations // // HeaderViewTapA ...

  7. UITableView的headerView展开缩放动画

    UITableView的headerView展开缩放动画 效果 源码 https://github.com/YouXianMing/Animations // // HeaderViewTapAnim ...

  8. max-height实现任意高度元素的展开收缩动画

    http://dobinspark.com.cn/ 前言: 在说到实现元素的展开收缩,通常的想法是通过控制display的元素属性和none之间的切换,虽然说功能可以实现,但是这种展开是没有任何动画的 ...

  9. vue之element-ui文件上传

    vue之element-ui文件上传 文件上传需求 ​ 对于文件上传,实际项目中我们的需求一般分两种: 对于单个的文件上传,比如拖动上传个图片之类的,或者是文件. 和表单一起实现上传(这种情况一般都是 ...

  10. Vue的elementUI实现自定义主题

    使用vue开发项目,用到elementUI,根据官网的写法,我们可以自定义主题来适应我们的项目要求,下面来介绍一下两种方法实现的具体步骤,(可以参考官方文档自定义主题官方文档),先说项目中没有使用sc ...

随机推荐

  1. CISO 需考虑的五项 Kubernetes 安全措施

    随着企业对软件开发的安全意识提高,开发和运维环节中各个团队也开始将安全嵌入他们正在使用或处理的平台或应用程序架构中.不同于各团队把对安全的关注放在自己所处理的环节,首席信息安全官(CISO)需要把握和 ...

  2. Linux 创建新用户

    添加用户组[root@VipSoft ~]#groupadd admin 添加用户[root@VipSoft ~]#useradd jimmy -m -d /home/jimmy -g admin 修 ...

  3. C# golang 开10000个无限循环的性能

    知乎上有人提了个问题,可惜作者已把账号注销了. 复制一下他的问题,仅讨论技术用,侵删. 问题 作者:知乎用户fLP2gX 链接:https://www.zhihu.com/question/63484 ...

  4. 骨牌摆放问题 POJ 2411(状态压缩DP)

    题目: 给你\(n*m(1<=n,m<=11)\)的方格矩阵,要求用1*2的多米诺骨牌去填充,问有多少种填充方法. 比如下图是对于如下2x6的方格矩阵,可能的填充方案之一. 该如何使用动态 ...

  5. 通义千问预体验,如何让 AI 模型应用“奔跑”在函数计算上?

    立即体验基于函数计算部署通义千问预体验: https://developer.aliyun.com/topic/aigc_fc AIGC 浪潮已来,从文字生成到图片生成,AIGC 的创造力让人惊叹,更 ...

  6. 淘宝flexible.js源码分析

    下面三种情况都会刷新页面,都会触发load事件. 1.a标签的超链接. 2.F5或者刷新按钮(强制刷新) 3.前进后退按钮 但是火狐中,有个特点,有个"往返缓存",这个缓存中不仅保 ...

  7. Nacos源码 (2) 核心模块

    整体架构 服务管理:实现服务CRUD,域名CRUD,服务健康状态检查,服务权重管理等功能 配置管理:实现配置管CRUD,版本管理,灰度管理,监听管理,推送轨迹,聚合数据等功能 元数据管理:提供元数据C ...

  8. 问题--缺少 cryptography 包

    1.问题 raise RuntimeError( RuntimeError: 'cryptography' package is required for sha256_password or cac ...

  9. Linux 中常用的基础命令

    by emanjusaka from https://www.emanjusaka.top/2024/01/linux-base-command 彼岸花开可奈何 本文欢迎分享与聚合,全文转载请留下原文 ...

  10. 【LINT】cpplint 分析笔记

    cpplint 分析笔记 · [前提得看下google规范] @2022-1-13 20:44:48 error message formate: [filename] [linenum] [mess ...