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

uni-app:实现快递的节点功能

一、效果

二、实现代码

<template><view class="container"><view class="header"><text class="title">快递物流信息</text><text class="subtitle">快递单号:SF1234567890</text></view><view class="timeline"><view v-for="(item, index) in expressList" :key="index" class="timeline-item" :class="{'active': item.status === 'active','completed': item.status === 'completed'}"><view class="timeline-left"><view class="timeline-dot"><view class="dot-inner"><text v-if="item.status === 'completed'" class="icon">✓</text><text v-else-if="item.status === 'active'" class="icon">●</text></view></view><view class="timeline-connector" v-if="index !== expressList.length - 1"></view></view><view class="timeline-content"><view class="timeline-title">{{ item.title }}</view><view class="timeline-desc">{{ item.desc }}</view><view class="timeline-time">{{ item.time }}</view></view></view></view></view>
</template><script>export default {data() {return {expressList: [{title: "已签收",desc: "快件已签收,签收人:本人",time: "2023-06-15 14:30",status: "active"},{title: "派送中",desc: "快件已到达【深圳福田分部】,快递员:李师傅(138****5678)正在派件",time: "2023-06-15 09:15",status: "active"},{title: "运输中",desc: "快件已到达【深圳转运中心】",time: "2023-06-14 22:45",status: "completed"},{title: "运输中",desc: "快件已离开【广州转运中心】,下一站【深圳转运中心】",time: "2023-06-14 18:20",status: "completed"},{title: "已发货",desc: "商家已发货",time: "2023-06-13 16:10",status: "completed"},{title: "已下单",desc: "您的订单已提交成功",time: "2023-06-12 10:30",status: "completed"}]};}};
</script><style scoped>.container {padding: 30rpx;background-color: #f8f8f8;min-height: 100vh;}.header {background-color: #ffffff;border-radius: 16rpx;padding: 30rpx;margin-bottom: 30rpx;box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);}.title {display: block;font-size: 36rpx;font-weight: bold;color: #333333;margin-bottom: 10rpx;}.subtitle {display: block;font-size: 28rpx;color: #666666;}.timeline {background-color: #ffffff;border-radius: 16rpx;padding: 30rpx;box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);}.timeline-item {display: flex;position: relative;}.timeline-left {display: flex;flex-direction: column;align-items: center;width: 60rpx;min-height: 240rpx;margin-right: 20rpx;}.timeline-dot {width: 60rpx;height: 40rpx;display: flex;justify-content: center;align-items: center;z-index: 2;position: relative;}.dot-inner {width: 40rpx;height: 40rpx;border-radius: 50%;background-color: #e0e0e0;display: flex;justify-content: center;align-items: center;}.timeline-item.completed .dot-inner {background-color: #4CAF50;}.timeline-item.active .dot-inner {background-color: #2196F3;animation: pulse 1.5s infinite;}.icon {color: white;font-size: 24rpx;font-weight: bold;}.timeline-connector {width: 2rpx;flex: 1;background-color: #e0e0e0;margin-top: -10rpx;}.timeline-item.completed .timeline-connector {background-color: #4CAF50;}.timeline-item.active .timeline-connector {background-color: #2196F3;}.timeline-content {flex: 1;padding-bottom: 40rpx;padding-top: 5rpx;}.timeline-title {font-size: 32rpx;font-weight: bold;color: #333333;margin-bottom: 8rpx;}.timeline-item.completed .timeline-title {color: #4CAF50;}.timeline-item.active .timeline-title {color: #2196F3;}.timeline-desc {font-size: 28rpx;color: #666666;line-height: 1.5;margin-bottom: 8rpx;}.timeline-time {font-size: 24rpx;color: #999999;}.timeline-item:last-child .timeline-content {padding-bottom: 0;}@keyframes pulse {0% {box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4);}70% {box-shadow: 0 0 0 10rpx rgba(33, 150, 243, 0);}100% {box-shadow: 0 0 0 0 rgba(33, 150, 243, 0);}}
</style>

http://www.dtcms.com/a/596485.html

相关文章:

  • 使用虚拟机搭建简易K8s实验环境的一种方法
  • 构建下一代临床AI诊断系统:基于CPC-Bench基准的工程化路线图(上)
  • Electron 原理浅析
  • Git 命令全攻略:从入门到实战
  • React底层原理
  • tensorflow 图像分类 之四
  • GEO优化:针对生成式AI内容分发逻辑的四大维度优化策略
  • 做a手机视频在线观看网站网页程序开发采购
  • USP-Ulysses+Ring-Attention技术原理
  • mirage 接口mock 拦截
  • flash网站设计教程北京建设网上银行
  • 高端网站建设设计公司有哪些wordpress网站迁移后插件
  • redis进阶 - 底层数据结构
  • 【自然语言处理】语料库:自然语言处理的基石资源与发展全景
  • Rust: 量化策略回测与简易线程池构建、子线程执行观测
  • 基于systemd的系统负载控制与检测方案
  • 闲谈-三十而已
  • LangChain 是一个 **大语言模型(LLM)应用开发框架**
  • 从RAM/ROM到Redis:项目架构设计的存储智慧
  • 高中课程免费教学网站网页塔防游戏排行榜
  • Access导出带图表的 HTML 报表:技术实现详解
  • 郑州上海做网站的公司嘉兴网站建设有前途吗
  • 学习JavaScript进阶记录(二)
  • 优化用户体验的小点:乐观更新链路 双数据库查询
  • C++—list:list的使用及模拟实现
  • EasyExcel 与 Apache POI 版本冲突导致的 `NoSuchMethodError` 异常
  • WebServer04
  • 品牌网站建设技术网站搜索引擎优化诊断
  • 优秀企业网站设计WordPress评论楼层
  • 卡索(CASO)汽车调查:新能源时代如何精准度量用户体验?