当前位置: 首页 > 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/935342/

相关文章:

  • 广元市建设银行网站小程序自助建站
  • 如何做企业网站小程序做企业门户网站
  • 创建网站服务器地址wordpress好看的背景
  • 网站推荐广告模板网站设计客户对接流程
  • 济南想建设网站企业名录2022版
  • 家具网站模版手机wap网站建站系统
  • 网站如何做搜狗搜索引擎网站正在建设 敬请期待
  • 个人网站备案要什么百度做公司网站
  • 网站开发绩效考核北京软件研发公司
  • 服务号微网站怎么做网站建设河南公司
  • 襄樊网站建设襄樊赤峰建筑人才网
  • 企业网站建设 新天地网络在线制图
  • 大理网站建设公司网站分享的功能怎么做
  • 推广网站发布文章重庆公司网站建设价格
  • 网站建设更新不及时 整改报告网站色调搭配
  • 南昌网站排名优化公司网站后台管理
  • 外贸网站建设平台有哪些网站建设的搜索栏怎么设置
  • 国内建网站软件广告联盟app下载
  • wordpress 4.8.2 漏洞seo推广专员工作内容
  • asp.net企业网站外贸是什么工作
  • 网站开发软件三剑客centos打开wordpress
  • 拖拽网站怎么做的网站如何做入支付接口
  • 蚌埠网站建设兼职pos机网站建设方案
  • 网络科技公司 网站建设中华机械网
  • 品牌建设网站特点wordpress 泛解析
  • 韩国设计交流网站网站培训机构
  • 自助建站官网h5制作方法和步骤
  • 贵阳网站建设哪里好wordpress模板与主题的区别
  • 网站建立需要什么技术创新作品及其设计方案
  • 做非法网站的有没有网站建设与制作的流程