当前位置: 首页 > news >正文

网站建设规划方书模板深圳正规网站建设公司

网站建设规划方书模板,深圳正规网站建设公司,云南效果好的网站优化,福建建设银行招聘网站记录下el-card 组合 el-descriptions 实现动态展示信息 文章结构 实现效果1. el-descriptions 组件使用1.1 结合v-for实现列表渲染1.2 解析 2. 自定义 el-descriptions 样式2.1 修改背景色、字体颜色2.2 调整字体大小2.3 解析 3. el-card 结合 el-descriptions 作为信息展示3.…

记录下el-card 组合 el-descriptions 实现动态展示信息

文章结构

      • 实现效果
      • 1. `el-descriptions` 组件使用
        • 1.1 结合v-for实现列表渲染
        • 1.2 解析
      • 2. 自定义 `el-descriptions` 样式
        • 2.1 修改背景色、字体颜色
        • 2.2 调整字体大小
        • 2.3 解析
      • 3. `el-card` 结合 `el-descriptions` 作为信息展示
        • 3.1 代码
        • 3.2 解析
      • 4. `el-card` 标题分割线优化
        • 4.1 涉及style
        • 4.2 解析

实现效果

在这里插入图片描述

1. el-descriptions 组件使用

1.1 结合v-for实现列表渲染
<el-descriptions :column="1"><el-descriptions-item v-for="(label, index) in item.labels" :key="index" :label="label">{{ item.params[index] }}</el-descriptions-item>
</el-descriptions>
1.2 解析
  • :column="1" 👉 设置 el-descriptions 每行只显示 1 列(默认是 3 列)。
  • el-descriptions-item 通过 v-for 遍历 labelsparams,动态生成描述项。
  • :label="label" 👉 绑定每个 el-descriptions-item 的标题。

2. 自定义 el-descriptions 样式

2.1 修改背景色、字体颜色
/* 控制 el-descriptions 的背景透明 */
:deep(.el-descriptions),
:deep(.el-descriptions__body) {background: transparent !important;
}/* 控制 el-descriptions-item 的颜色 */
:deep(.el-descriptions-item) {background: transparent !important;color: white !important;
}/* 控制 el-descriptions 的 label 和 content 颜色 */
:deep(.el-descriptions__label),
:deep(.el-descriptions__content) {color: white !important; /* 让 el-descriptions 的文字变白 */
}
2.2 调整字体大小
/* 标签部分(左侧的 label) */
:deep(.el-descriptions__label) {font-size: 16px !important;
}/* 内容部分(右侧的内容) */
:deep(.el-descriptions__content) {font-weight: bold;font-size: 17px !important;
}
2.3 解析
  • background: transparent 👉 让 el-descriptionsel-descriptions-item 背景变透明。
  • color: white 👉 让 labelcontent 变成白色字体。
  • font-sizefont-weight: bold 👉 调整 labelcontent 的字号和加粗状态。

3. el-card 结合 el-descriptions 作为信息展示

3.1 代码
<el-card v-for="item in systemParam" :key="item.title" shadow="always":style="{background: `linear-gradient(135deg, ${item.colorStart}, ${item.colorEnd})`,color: 'white'}"
><template #header><span style="color: white;  font-size: 18px ; font-weight: bold;">{{ item.title }}</span></template><el-descriptions :column="1"><el-descriptions-item v-for="(label, index) in item.labels" :key="index" :label="label">{{ item.params[index] }}</el-descriptions-item></el-descriptions>
</el-card>
3.2 解析
  • 每个 el-card 代表一个数据块。
  • 通过 linear-gradient 动态设置 el-card 背景颜色。
  • el-descriptions 作为 el-card 内容展示详细参数信息。

4. el-card 标题分割线优化

4.1 涉及style
/*  el-card 自带的标题分割线和标题绑定过深,不方便调整 */
/* 移除 el-card 自带的标题分割线 */
:deep(.el-card__header) {position: relative;border-bottom: none;
}/* 自定义标题分割线 */
:deep(.el-card__header::after) {content: ''; position: absolute;bottom: 0;left: 50%;width: 90%;height: 1px;background-color: rgba(255, 255, 255, 0.5);transform: translateX(-50%);
}
4.2 解析
  • border-bottom: none 👉 取消 el-card 默认的底部边框。
  • el-card__header::after 👉 通过 伪元素 自定义一条更短的分割线。
http://www.yayakq.cn/news/425795/

相关文章:

  • 网站建设翻译wordpress取分类名称
  • 诚信通网站怎么做外链dux大前端WordPress
  • 全网最低价查询网站网页程序开发语言
  • 诸城企业网站建设10元网站备案
  • 受欢迎的广州网站设计哪个浏览器可以看禁止访问的网站
  • 网站设计与网站建设书店搜集10个优秀网站
  • 哪个网站上做ppt比较好网站建设要多少钱怎样
  • 网站技术策划人员要求商城分销系统
  • 做app简单还是网站南京网站建设 奥美通全网营销
  • 威海 网站建设系统清理优化工具
  • 钓鱼网站排名假冒建设银行最多wordpress自动网站地址
  • 网站优化qq群前端开发培训学校
  • 网站开发模合同php网站源码怎么在本地电脑调式
  • 网站开发出来为什么加载特别慢驻马店网站网站建设
  • 织梦网站关闭手机版公司支付网站款做凭证
  • 群晖nas可以做网站吗手机体验网站
  • 外国购物网站有哪些平台怎样向网站上传照片
  • 自己做免费网站进入百度app查看
  • 德州市建设工程质监站网站网页布局设计框架图表
  • 外贸推广用中文网站外贸公司网站多少钱
  • 泉州网站建设价格wordpress电影下载站
  • 网站中文名注册短视频制作价格明细
  • 有网站如何做app网站建设相关话术
  • ps网站轮播图怎么做的行业类门户网站建设方案
  • 美容美发化妆品培训企业网站源码带后台php织梦dede5.7网站超链接怎么做
  • 网站建设的问题分析网站策划就业前景
  • 网站开发行业发展重庆的电子商务网站
  • 网站安全防黑联盟建筑人才市场职称评审
  • 苏州网站优化推广wordpress主题如何使用
  • 做网站做app什么专业wordpress工具条