Skip to content

Commit e2e35a2

Browse files
committed
2019-2-25 22:42:38
1 parent 56d3505 commit e2e35a2

File tree

24 files changed

+476
-87
lines changed

24 files changed

+476
-87
lines changed

demo/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ App({
44
wx.getSystemInfo({
55
success: e => {
66
this.globalData.StatusBar = e.statusBarHeight;
7-
this.globalData.CustomBar = e.platform == 'android' ? e.statusBarHeight + 50 : e.statusBarHeight + 45;
7+
let custom = wx.getMenuButtonBoundingClientRect();
8+
this.globalData.Custom = custom;
9+
this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
810
}
911
})
1012
},

demo/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"pages/about/test/list",
3434
"pages/about/test/filter",
3535
"pages/about/home/home",
36-
"custom-tab-bar/index"
36+
"custom-tab-bar/index",
37+
"pages/plugin/drawer/drawer"
3738
],
3839
"window": {
3940
"navigationBarBackgroundColor": "#39b54a",

demo/app.wxss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
@import "icon.wxss";
22
@import "colorui.wxss";
33

4+
.cu-modal.show {
5+
z-index: 99999;
6+
}
7+
48
.nav-list {
59
display: flex;
610
flex-wrap: wrap;

demo/colorui.wxss

Lines changed: 75 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Color UI v2.0.6 修复v1 | by 文晓港
2+
Color UI v2.0.7 | by 文晓港
33
仅供学习交流,如作它用所承受的法律责任一概与作者无关
44
(QQ交流群:240787041)
55
文档:http://www.color-ui.com/
@@ -774,6 +774,7 @@ button.icon.lg {
774774
height: 28rpx;
775775
color: #fff;
776776
}
777+
777778
.cu-tag.badge:not([class*="bg-"]) {
778779
background: #dd514c;
779780
}
@@ -1464,10 +1465,11 @@ button.icon.lg {
14641465
.cu-bar .content {
14651466
position: absolute;
14661467
text-align: center;
1467-
width: 400rpx;
1468+
width: calc(100% - 340rpx);
14681469
left: 0;
14691470
right: 0;
1470-
bottom: 20rpx;
1471+
bottom: 0;
1472+
top: 0;
14711473
margin: auto;
14721474
height: 60rpx;
14731475
font-size: 32rpx;
@@ -1479,6 +1481,13 @@ button.icon.lg {
14791481
overflow: hidden;
14801482
}
14811483

1484+
.cu-bar.ios .content {
1485+
bottom: 7px;
1486+
height: 30px;
1487+
font-size: 32rpx;
1488+
line-height: 30px;
1489+
}
1490+
14821491
.cu-bar.btn-group {
14831492
justify-content: space-around;
14841493
}
@@ -1543,6 +1552,14 @@ button.icon.lg {
15431552

15441553
.cu-bar.tabbar {
15451554
padding: 0;
1555+
z-index: 0;
1556+
height: calc(100rpx + env(safe-area-inset-bottom) / 2);
1557+
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
1558+
}
1559+
1560+
.cu-tabbar-height {
1561+
min-height: 100rpx;
1562+
height: calc(100rpx + env(safe-area-inset-bottom) / 2);
15461563
}
15471564

15481565
.cu-bar.tabbar.shadow {
@@ -1716,49 +1733,70 @@ button.icon.lg {
17161733
margin-left: 0rpx;
17171734
}
17181735

1719-
/*
1720-
.cu-bar.tabbar .action {
1721-
flex: 1;
1722-
text-align: center;
1723-
display: flex;
1724-
justify-content: center;
1725-
align-items: center;
1726-
flex-direction: column;
1736+
.cu-custom {
1737+
display: block;
1738+
position: relative;
1739+
}
1740+
1741+
.cu-custom .cu-bar .content {
1742+
width: calc(100% - 440rpx);
1743+
}
1744+
1745+
.cu-custom .cu-bar {
1746+
min-height: 0px;
1747+
}
1748+
1749+
.cu-custom .cu-bar {
1750+
padding-right: 220rpx;
1751+
box-shadow: 0rpx 0rpx 0rpx;
17271752
}
1728-
.cu-bar.tabbar .action .tabbar-icon {
1729-
width: 54rpx;
1730-
height: 54rpx;
1753+
1754+
.cu-custom .cu-bar .border-custom {
17311755
position: relative;
1756+
background: rgba(0, 0, 0, 0.15);
1757+
border-radius: 1000rpx;
1758+
height: 30px;
1759+
}
1760+
1761+
.cu-custom .cu-bar .border-custom::after {
1762+
content: " ";
1763+
width: 200%;
1764+
height: 200%;
1765+
position: absolute;
1766+
top: 0;
1767+
left: 0;
1768+
border-radius: inherit;
1769+
transform: scale(0.5);
1770+
transform-origin: 0 0;
1771+
pointer-events: none;
1772+
box-sizing: border-box;
1773+
border: 1rpx solid #fff;
1774+
opacity: 0.5;
17321775
}
1733-
.cu-bar.tabbar .action image {
1776+
1777+
.cu-custom .cu-bar .border-custom::before {
1778+
content: " ";
1779+
width: 1rpx;
1780+
height: 110%;
17341781
position: absolute;
1782+
top: 22.5%;
17351783
left: 0;
17361784
right: 0;
1737-
top: 0;
1738-
bottom: 0;
17391785
margin: auto;
1740-
}
1741-
.cu-bar.tabbar .action .tabbar-icon image:first-child,.cu-bar.tabbar .action.cur .tabbar-icon image:last-child {
1742-
width: 0rpx;
1743-
height: 0rpx;
1744-
}
1745-
.cu-bar.tabbar .action .tabbar-icon image:last-child,.cu-bar.tabbar .action.cur .tabbar-icon image:first-child {
1746-
width: 54rpx;
1747-
height: 54rpx;
1786+
transform: scale(0.5);
1787+
transform-origin: 0 0;
1788+
pointer-events: none;
1789+
box-sizing: border-box;
1790+
opacity: 0.6;
1791+
background-color: #fff;
17481792
}
17491793

1750-
.cu-bar.tabbar .action view {
1751-
font-size: 20rpx;
1752-
} */
1753-
1754-
.cu-custom {
1794+
.cu-custom .cu-bar .border-custom text {
17551795
display: block;
1756-
position: relative;
1757-
}
1758-
1759-
.cu-custom .cu-bar {
1760-
padding-right: 220rpx;
1761-
box-shadow: 0rpx 0rpx 0rpx;
1796+
flex: 1;
1797+
margin: auto !important;
1798+
text-align: center;
1799+
font-size: 34rpx;
17621800
}
17631801

17641802
/* ==================
@@ -2010,7 +2048,7 @@ button.icon.lg {
20102048

20112049
.cu-card>.cu-item {
20122050
display: block;
2013-
background: #fff;
2051+
background-color: #fff;
20142052
overflow: hidden;
20152053
border-radius: 10rpx;
20162054
margin: 30rpx;

demo/pages/about/home/home.wxml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,4 @@
6464
</view>
6565
</view>
6666

67-
<view class="cu-modal {{modalName=='QrcodeModal'?'show':''}}">
68-
<view class="cu-dialog">
69-
<view class="bg-img" style="background-image: url('https://image.weilanwl.com/color2.0/zanCode.jpg');height:544rpx;">
70-
<view class="cu-bar justify-end none-bg text-white">
71-
<view class='action' bindtap='hideModal'>
72-
<text class='icon-close '></text>
73-
</view>
74-
</view>
75-
</view>
76-
<view class="cu-bar">
77-
<view class='justify-center flex-sub' bindtap='SaveQrcode'>保存到相册</view>
78-
</view>
79-
</view>
80-
</view>
67+
<view class='cu-tabbar-height'></view>

demo/pages/about/home/home.wxss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
page{
2-
padding-bottom: 100rpx;
3-
}
41
.UCenter-bg {
52
background-image: url(https://image.weilanwl.com/color2.0/index.jpg);
63
background-size: cover;
@@ -36,4 +33,14 @@ page{
3633
height: 100rpx;
3734
}
3835

36+
map,.mapBox{
37+
left: 0;
38+
z-index: 99;
39+
mix-blend-mode: screen;
40+
height: 100rpx;
41+
}
3942

43+
map,.mapBox{
44+
width: 750rpx;
45+
height: 300rpx;
46+
}

demo/pages/about/log/log.wxml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
<view class="cu-timeline">
99
<view class='cu-item text-green'>
1010
<view class="bg-gradual-green content shadow-blur">
11+
<view class="cu-capsule radius">
12+
<view class="cu-tag bg-white text-green">v2.0.7</view>
13+
<view class="cu-tag line-white">2019/02/20</view>
14+
</view>
15+
<view class='margin-top-sm text-content'>
16+
<view>1.新增操作条胶囊样式,优化全屏操作条</view>
17+
<view>2.新增操垂直导航</view>
18+
</view>
19+
</view>
20+
</view>
21+
<view class='cu-item text-green'>
22+
<view class="bg-green content shadow-blur">
1123
<view class="cu-capsule radius">
1224
<view class="cu-tag bg-white text-green">v2.0.6</view>
1325
<view class="cu-tag line-white">2019/02/09</view>

demo/pages/basics/home/home.wxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
<text class='icon-{{item.icon}}'></text>
77
</navigator>
88
</view>
9+
<view class='cu-tabbar-height'></view>

demo/pages/basics/home/home.wxss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
page{
2-
padding-bottom: 100rpx;
3-
}

demo/pages/component/bar/bar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Page({
33
data: {
44
StatusBar: app.globalData.StatusBar,
55
CustomBar: app.globalData.CustomBar,
6+
Custom: app.globalData.Custom,
67
},
78

89
})

0 commit comments

Comments
 (0)