mjz update
This commit is contained in:
@@ -5,10 +5,114 @@ permalink: /pages/component/timeline
|
||||
article: false
|
||||
---
|
||||
|
||||
## 操作条
|
||||
## 默认时间轴
|
||||
|
||||
::: details 点此查看页面源代码
|
||||
页面位置:`/pages/component/timeline`
|
||||
```vue
|
||||
1. 时间轴默认结构如下代码,对应右侧预览图第一个6-17时间轴的样式
|
||||
2. 由 `cu-timeline` 包裹 `cu-time` 和 `cu-item`,在 `item` 内编写内容,由 `content` 包裹
|
||||
|
||||
```html
|
||||
<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. 对应右侧彩色时间轴
|
||||
|
||||
```html
|
||||
<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. 上一个是简单的修改了颜色图标,这一个则是稍微复杂一点,结合之前的标签、列表等,丰富了内容
|
||||
|
||||
```html
|
||||
<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| 内容信息| ——|
|
||||
Reference in New Issue
Block a user