Skip to content

Commit ce01d50

Browse files
committed
更新版本号及文档
1 parent fc91a7c commit ce01d50

File tree

7 files changed

+73
-53
lines changed

7 files changed

+73
-53
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```jsx
2+
<ClCard
3+
title={{
4+
text: "我是标题",
5+
textColor: "white",
6+
align: "center",
7+
size: 'xlarge',
8+
fontWeight: 'bold'
9+
}}
10+
bgColor="gradualPink"
11+
>
12+
标题可以传入 ClText 组件的任何属性,可以设置标题大小,颜色,颜色等
13+
</ClCard>
14+
```

docs/.vuepress/public/dataKeyMap.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
{ "key": "card", "value": "卡片模式" },
3737
{ "key": "full", "value": "全铺模式" },
3838
{ "key": "color", "value": "颜色" },
39-
{ "key": "active", "value": "激活" }
39+
{ "key": "active", "value": "激活" },
40+
{ "key": "title", "value": "标题" }
4041
],
4142
"checkbox": [
4243
{ "key": "type", "value": "类型" },
Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11

22
```jsx
3-
<ClTimeline times={[
4-
{
5-
node: '2019'
6-
}, {
7-
content: ['我是内容,默认背景']
8-
}, {
9-
content: ['我是内容,有背景'],
10-
bgColor: 'light-blue'
11-
}, {
12-
content: ['我是里程碑,我有图标'],
13-
title: '2019 年到啦',
14-
time: '2019-01-01',
15-
bgColor: 'light-red',
16-
icon: 'emoji'
17-
}, {
18-
node: '2018'
19-
}, {
20-
content: ['我是里程碑,我有图标,我图标有颜色', '我有多行内容'],
21-
bgColor: 'red',
22-
icon: 'emoji',
23-
iconColor: 'red'
24-
}
25-
]}
3+
<ClTimeline
4+
times={[
5+
{
6+
node: "2019"
7+
},
8+
{
9+
content: ["我是内容,默认背景"]
10+
},
11+
{
12+
content: ["我是内容,有背景"],
13+
bgColor: "light-blue"
14+
},
15+
{
16+
content: ["我是里程碑,我有图标"],
17+
title: "2019 年到啦",
18+
time: "2019-01-01",
19+
bgColor: "light-red",
20+
icon: "emoji"
21+
},
22+
{
23+
node: "2018"
24+
},
25+
{
26+
content: ["我是里程碑,我有图标,我图标有颜色", "我有多行内容"],
27+
bgColor: "red",
28+
icon: "emoji",
29+
iconColor: "red"
30+
}
31+
]}
32+
onClick={(index) => {
33+
Taro.showToast({
34+
icon: 'none',
35+
title: `您点击了第${index + 1}个节点`
36+
})
37+
}}
2638
/>
2739
```

docs/layout/card.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import { ClCard } from "mp-colorui";
1212

1313
### Card 参数
1414

15-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
16-
| ------- | ------------------ | ------- | ------------------------------ | -------- |
17-
| type | _卡片组件类型选择_ | string | _`card`_,_`full`_ | _`card`_ |
18-
| bgColor | _卡片背景色设置_ | string | 参考文档 [默认色](/home/color) | - |
19-
| shadow | _卡片阴影设置_ | boolean | - | _`true`_ |
15+
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
16+
| ------- | ------------------ | ------- | -------------------------------- | -------- |
17+
| type | _卡片组件类型选择_ | string | _`card`_,_`full`_ | _`card`_ |
18+
| bgColor | _卡片背景色设置_ | string | 参考文档 [默认色](/home/color) | - |
19+
| shadow | _卡片阴影设置_ | boolean | - | _`true`_ |
20+
| title | _卡片标题_ | Text | 参考文档 [Text 组件](/base/text) | _`{}`_ |
2021

2122
<FloatPhone url="https://yinliangdream.github.io/mp-colorui-h5-demo/#/pages/components/card/index" />

docs/view/timeline.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ import { ClTimeline } from "mp-colorui";
2828
| node | _节点(若存在则会忽略其他属性)_ | string | - | - |
2929
| time | 时间(右上角内容) | string | - | - |
3030

31+
### Timeline 事件
32+
33+
| 事件名称 | 说明 | 返回参数 |
34+
| -------- | -------- | ----------------- |
35+
| onClick | 点击事件 | index(第几个标签) |
36+
3137
<FloatPhone url="https://yinliangdream.github.io/mp-colorui-h5-demo/#/pages/components/timeline/index" />

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mp-colorui",
3-
"version": "0.5.6",
3+
"version": "0.5.7",
44
"description": "MP ColorUI 是一款基于 Taro 框架并且联合 Color-UI CSS 库开发的多端 UI 组件库(支持小程序端和H5端)",
55
"keywords": [
66
"taro",

src/pages/index/index.js

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,17 @@ import ClAvatar from "../../components/avatar";
2929

3030
console.log(Taro);
3131
export default function Index() {
32-
const muti = [["水果", "蔬菜"], ["苹果", "桃子", "葡萄", "火龙果", "西瓜"]];
33-
const [single, setSingle] = useState([]);
34-
const [value, setValue] = useState(0);
35-
useEffect(() => {
36-
setTimeout(() => {
37-
setSingle(["苹果", "桃子", "葡萄", "火龙果", "西瓜"]);
38-
}, 1000);
39-
setTimeout(() => {
40-
setValue(3);
41-
}, 2000);
42-
}, []);
4332
return (
4433
<View>
45-
<ClNoticeBar
46-
text="我是文字我很长啊啊啊啊啊啊啊啊啊啊啊啊啊我是文字我很长啊啊啊啊啊啊啊啊啊啊啊啊啊"
47-
single
48-
marquee
49-
showMore
50-
close
51-
/>
52-
<View style={{ width: pxTransform(300) }}>
53-
<ClText cut align="left">
54-
泰国、新加坡、印度尼西亚~{" "}
55-
</ClText>
56-
</View>
34+
<ClCard
35+
title={{
36+
text: "阿里巴巴",
37+
textColor: "cyan",
38+
size: "large"
39+
}}
40+
>
41+
我是内容太打了我是内容太打了我是内容太打了我是内容太打了我是内容太打了我是内容太打了
42+
</ClCard>
5743
</View>
5844
);
5945
}

0 commit comments

Comments
 (0)