ColorUI 使用文档 ColorUI 使用文档
文档
GitHub (opens new window)
文档
GitHub (opens new window)
  • 快速开始

    • 介绍
    • 快速使用
  • 基础元素

    • 布局
    • 背景
    • 文本
    • 图标
    • 按钮
    • 标签
    • 头像
    • 进度条
    • 边框阴影
    • 加载
  • 交互组件

    • 操作条

      • 底部操作条
      • 标题操作条
      • 顶部操作条
      • 搜索&按钮组&输入操作条
    • 导航栏
    • 列表
    • 卡片
    • 表单
    • 时间轴
      • 默认时间轴
      • 彩色时间轴
      • 自定义时间轴
      • 时间轴相关class
    • 聊天
    • 轮播
    • 模态框
    • 步骤条
  • 插件扩展

    • 索引列表
    • 微动画
    • 全屏抽屉
    • 垂直导航
  • 视图模式
  • 目录模式
目录

时间轴

# 默认时间轴

  1. 时间轴默认结构如下代码,对应右侧预览图第一个6-17时间轴的样式

  2. 由 cu-timeline 包裹 cu-time 和 cu-item,在 item 内编写内容,由 content 包裹

<view class="cu-timeline">
	<view class="cu-time">06-17</view>
	<view class="cu-item">
		<view class="content">
			<text>01:30</text> 【喵星】 MX-12138 已揽收,准备发往银河系
		</view>
	</view>
</view>

# 彩色时间轴

  1. 与默认的基本格式相同,只是自定义了内容框颜色和图标

  2. 对应右侧彩色时间轴

<view class="cu-timeline">
	<view class="cu-time">昨天</view>
	<view class="cu-item cur cuIcon-noticefill">
		<view class="content bg-green shadow-blur">
			<text>22:22</text> 【广州市】快件已到达地球
		</view>
	</view>
	<view class="cu-item text-red cuIcon-attentionforbidfill">
		<view class="content bg-red shadow-blur">
			这是第一次,我家的铲屎官走了这么久。久到足足有三天!!
		</view>
	</view>
	<view class="cu-item text-grey cuIcon-evaluate_fill">
		<view class="content bg-grey shadow-blur">
			这是第一次,我家的铲屎官走了这么久。
		</view>
	</view>
	<view class="cu-item text-blue">
		<view class="bg-blue content">
			<text>20:00</text> 【月球】快件已到达月球,准备发往地球
		</view>
		<view class="bg-cyan content">
			<text>10:00</text> 【银河系】快件已到达银河系,准备发往月球
		</view>
	</view>
</view>

# 自定义时间轴

  1. 上一个是简单的修改了颜色图标,这一个则是稍微复杂一点,结合之前的标签、列表等,丰富了内容
<view class="cu-timeline">
	<view class="cu-time">06-17</view>
	<view class="cu-item">
		<view class="content">
			<view class="cu-capsule radius">
				<view class="cu-tag bg-cyan">上午</view>
				<view class="cu-tag line-cyan">10:00</view>
			</view>
			<view class="margin-top">这是第一次,我家的铲屎官走了这么久。久到足足有三天!! 在听到他的脚步声响在楼梯间的那一刻,我简直想要破门而出,对着他狠狠地吼上10分钟,然后再看心情要不要他进门。</view>
		</view>
	</view>
	<view class="cu-item text-blue">
		<view class="bg-blue shadow-blur content">
			<view class="cu-list menu-avatar radius">
				<view class="cu-item">
					<view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);"></view>
					<view class="content">
						<view class="text-grey">文晓港</view>
						<view class="text-gray text-sm">
							<text class="cuIcon-infofill text-red"></text> 消息未送达</view>
					</view>
					<view class="action">
						<view class="text-grey text-xs">22:20</view>
						<view class="cu-tag round bg-grey sm">5</view>
					</view>
				</view>
				<view class="cu-item">
					<view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg);">
						<view class="cu-tag badge">99+</view>
					</view>
					<view class="content">
						<view class="text-grey">文晓港
							<view class="cu-tag round orange sm">SVIP</view>
						</view>
						<view class="text-gray text-sm">
							<text class="cuIcon-redpacket_fill text-red"></text> 收到红包</view>
					</view>
					<view class="action">
						<view class="text-grey text-xs">22:20</view>
						<text class="cuIcon-notice_forbid_fill text-gray"></text>
					</view>
				</view>
			</view>
		</view>
	</view>
</view>

# 时间轴相关class

class 说明 可选值
cu-timeline 时间轴必选值 ——
cu-time 时间 ——
cu-item 子元素 ——
content 内容信息 ——
上次更新: 2024/05/01, 21:37:52
表单
聊天

← 表单 聊天→

Theme by Vdoing | Copyright © 2022-2024 miren | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式