diff --git a/demo/app.js b/demo/app.js
index d5a9867..55a8c5f 100644
--- a/demo/app.js
+++ b/demo/app.js
@@ -4,7 +4,9 @@ App({
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;
- this.globalData.CustomBar = e.platform == 'android' ? e.statusBarHeight + 50 : e.statusBarHeight + 45;
+ let custom = wx.getMenuButtonBoundingClientRect();
+ this.globalData.Custom = custom;
+ this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
}
})
},
diff --git a/demo/app.json b/demo/app.json
index dbb601c..94d4348 100644
--- a/demo/app.json
+++ b/demo/app.json
@@ -33,7 +33,8 @@
"pages/about/test/list",
"pages/about/test/filter",
"pages/about/home/home",
- "custom-tab-bar/index"
+ "custom-tab-bar/index",
+ "pages/plugin/drawer/drawer"
],
"window": {
"navigationBarBackgroundColor": "#39b54a",
diff --git a/demo/app.wxss b/demo/app.wxss
index 9569f3e..3a7b80b 100644
--- a/demo/app.wxss
+++ b/demo/app.wxss
@@ -1,6 +1,10 @@
@import "icon.wxss";
@import "colorui.wxss";
+.cu-modal.show {
+ z-index: 99999;
+}
+
.nav-list {
display: flex;
flex-wrap: wrap;
diff --git a/demo/colorui.wxss b/demo/colorui.wxss
index d78b289..a027af1 100644
--- a/demo/colorui.wxss
+++ b/demo/colorui.wxss
@@ -1,5 +1,5 @@
/*
- Color UI v2.0.6 修复v1 | by 文晓港
+ Color UI v2.0.7 | by 文晓港
仅供学习交流,如作它用所承受的法律责任一概与作者无关
(QQ交流群:240787041)
文档:http://www.color-ui.com/
@@ -774,6 +774,7 @@ button.icon.lg {
height: 28rpx;
color: #fff;
}
+
.cu-tag.badge:not([class*="bg-"]) {
background: #dd514c;
}
@@ -1464,10 +1465,11 @@ button.icon.lg {
.cu-bar .content {
position: absolute;
text-align: center;
- width: 400rpx;
+ width: calc(100% - 340rpx);
left: 0;
right: 0;
- bottom: 20rpx;
+ bottom: 0;
+ top: 0;
margin: auto;
height: 60rpx;
font-size: 32rpx;
@@ -1479,6 +1481,13 @@ button.icon.lg {
overflow: hidden;
}
+.cu-bar.ios .content {
+ bottom: 7px;
+ height: 30px;
+ font-size: 32rpx;
+ line-height: 30px;
+}
+
.cu-bar.btn-group {
justify-content: space-around;
}
@@ -1543,6 +1552,14 @@ button.icon.lg {
.cu-bar.tabbar {
padding: 0;
+ z-index: 0;
+ height: calc(100rpx + env(safe-area-inset-bottom) / 2);
+ padding-bottom: calc(env(safe-area-inset-bottom) / 2);
+}
+
+.cu-tabbar-height {
+ min-height: 100rpx;
+ height: calc(100rpx + env(safe-area-inset-bottom) / 2);
}
.cu-bar.tabbar.shadow {
@@ -1716,51 +1733,72 @@ button.icon.lg {
margin-left: 0rpx;
}
-/*
-.cu-bar.tabbar .action {
- flex: 1;
- text-align: center;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
-}
-.cu-bar.tabbar .action .tabbar-icon {
- width: 54rpx;
- height: 54rpx;
- position: relative;
-}
-.cu-bar.tabbar .action image {
- position: absolute;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- margin: auto;
-}
-.cu-bar.tabbar .action .tabbar-icon image:first-child,.cu-bar.tabbar .action.cur .tabbar-icon image:last-child {
- width: 0rpx;
- height: 0rpx;
-}
-.cu-bar.tabbar .action .tabbar-icon image:last-child,.cu-bar.tabbar .action.cur .tabbar-icon image:first-child {
- width: 54rpx;
- height: 54rpx;
-}
-
-.cu-bar.tabbar .action view {
- font-size: 20rpx;
-} */
-
.cu-custom {
display: block;
position: relative;
}
+.cu-custom .cu-bar .content {
+ width: calc(100% - 440rpx);
+}
+
+.cu-custom .cu-bar {
+ min-height: 0px;
+}
+
.cu-custom .cu-bar {
padding-right: 220rpx;
box-shadow: 0rpx 0rpx 0rpx;
}
+.cu-custom .cu-bar .border-custom {
+ position: relative;
+ background: rgba(0, 0, 0, 0.15);
+ border-radius: 1000rpx;
+ height: 30px;
+}
+
+.cu-custom .cu-bar .border-custom::after {
+ content: " ";
+ width: 200%;
+ height: 200%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ border-radius: inherit;
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ pointer-events: none;
+ box-sizing: border-box;
+ border: 1rpx solid #fff;
+ opacity: 0.5;
+}
+
+.cu-custom .cu-bar .border-custom::before {
+ content: " ";
+ width: 1rpx;
+ height: 110%;
+ position: absolute;
+ top: 22.5%;
+ left: 0;
+ right: 0;
+ margin: auto;
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ pointer-events: none;
+ box-sizing: border-box;
+ opacity: 0.6;
+ background-color: #fff;
+}
+
+.cu-custom .cu-bar .border-custom text {
+ display: block;
+ flex: 1;
+ margin: auto !important;
+ text-align: center;
+ font-size: 34rpx;
+}
+
/* ==================
导航栏
==================== */
@@ -2010,7 +2048,7 @@ button.icon.lg {
.cu-card>.cu-item {
display: block;
- background: #fff;
+ background-color: #fff;
overflow: hidden;
border-radius: 10rpx;
margin: 30rpx;
diff --git a/demo/pages/about/home/home.wxml b/demo/pages/about/home/home.wxml
index 26859d4..3b660a8 100644
--- a/demo/pages/about/home/home.wxml
+++ b/demo/pages/about/home/home.wxml
@@ -64,17 +64,4 @@
-
-
-
-
-
-
-
-
-
-
- 保存到相册
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/demo/pages/about/home/home.wxss b/demo/pages/about/home/home.wxss
index d67f2e1..6508827 100644
--- a/demo/pages/about/home/home.wxss
+++ b/demo/pages/about/home/home.wxss
@@ -1,6 +1,3 @@
-page{
- padding-bottom: 100rpx;
-}
.UCenter-bg {
background-image: url(https://image.weilanwl.com/color2.0/index.jpg);
background-size: cover;
@@ -36,4 +33,14 @@ page{
height: 100rpx;
}
+map,.mapBox{
+ left: 0;
+ z-index: 99;
+ mix-blend-mode: screen;
+ height: 100rpx;
+}
+map,.mapBox{
+ width: 750rpx;
+ height: 300rpx;
+}
\ No newline at end of file
diff --git a/demo/pages/about/log/log.wxml b/demo/pages/about/log/log.wxml
index a1a8bd8..f7cc276 100644
--- a/demo/pages/about/log/log.wxml
+++ b/demo/pages/about/log/log.wxml
@@ -8,6 +8,18 @@
+
+ v2.0.7
+ 2019/02/20
+
+
+ 1.新增操作条胶囊样式,优化全屏操作条
+ 2.新增操垂直导航
+
+
+
+
+
v2.0.6
2019/02/09
diff --git a/demo/pages/basics/home/home.wxml b/demo/pages/basics/home/home.wxml
index 8c9aa10..6a9351d 100644
--- a/demo/pages/basics/home/home.wxml
+++ b/demo/pages/basics/home/home.wxml
@@ -6,3 +6,4 @@
+
\ No newline at end of file
diff --git a/demo/pages/basics/home/home.wxss b/demo/pages/basics/home/home.wxss
index 6fc6f7a..e69de29 100644
--- a/demo/pages/basics/home/home.wxss
+++ b/demo/pages/basics/home/home.wxss
@@ -1,3 +0,0 @@
-page{
- padding-bottom: 100rpx;
-}
\ No newline at end of file
diff --git a/demo/pages/component/bar/bar.js b/demo/pages/component/bar/bar.js
index ee1a2b8..7e7e980 100644
--- a/demo/pages/component/bar/bar.js
+++ b/demo/pages/component/bar/bar.js
@@ -3,6 +3,7 @@ Page({
data: {
StatusBar: app.globalData.StatusBar,
CustomBar: app.globalData.CustomBar,
+ Custom: app.globalData.Custom,
},
})
\ No newline at end of file
diff --git a/demo/pages/component/bar/bar.wxml b/demo/pages/component/bar/bar.wxml
index 6c70234..fbde6df 100644
--- a/demo/pages/component/bar/bar.wxml
+++ b/demo/pages/component/bar/bar.wxml
@@ -1,9 +1,10 @@
-
+
- 操作条
+
+ 操作条
diff --git a/demo/pages/component/home/home.wxml b/demo/pages/component/home/home.wxml
index 3cf73a2..371f086 100644
--- a/demo/pages/component/home/home.wxml
+++ b/demo/pages/component/home/home.wxml
@@ -6,3 +6,4 @@
+
\ No newline at end of file
diff --git a/demo/pages/component/home/home.wxss b/demo/pages/component/home/home.wxss
index 6fc6f7a..e69de29 100644
--- a/demo/pages/component/home/home.wxss
+++ b/demo/pages/component/home/home.wxss
@@ -1,3 +0,0 @@
-page{
- padding-bottom: 100rpx;
-}
\ No newline at end of file
diff --git a/demo/pages/component/modal/modal.wxml b/demo/pages/component/modal/modal.wxml
index efbb407..056f6e4 100644
--- a/demo/pages/component/modal/modal.wxml
+++ b/demo/pages/component/modal/modal.wxml
@@ -5,10 +5,9 @@
-
-
+
- 模态窗口
+ 普通窗口
diff --git a/demo/pages/component/nav/nav.wxml b/demo/pages/component/nav/nav.wxml
index 324218b..e4e2cd2 100644
--- a/demo/pages/component/nav/nav.wxml
+++ b/demo/pages/component/nav/nav.wxml
@@ -71,17 +71,75 @@
- 定位
+ 垂直导航
-
-
- 数码
-
-
- 排行榜
-
-
- 皮肤
-
-
\ No newline at end of file
+
+
+
+ Tab{{index +1}}
+
+
+
+
+
+
+ Tab{{index +1}}
+
+
+
+
+
\ No newline at end of file
diff --git a/demo/pages/component/nav/nav.wxss b/demo/pages/component/nav/nav.wxss
index 22ff25f..67f03f3 100644
--- a/demo/pages/component/nav/nav.wxss
+++ b/demo/pages/component/nav/nav.wxss
@@ -1 +1,37 @@
-/* pages/component/nav/nav.wxss */
\ No newline at end of file
+/* pages/component/nav/nav.wxss */
+.ScrollNav.nav {
+ width: 200rpx;
+ white-space: initial;
+}
+
+.ScrollNav.nav .cu-item {
+ width: 100%;
+ text-align: center;
+ background-color: #fff;
+ margin: 0;
+ border: none;
+ height: 50px;
+ position: relative;
+}
+
+.ScrollNav.nav .cu-item.cur {
+ background-color: #f1f1f1;
+}
+.ScrollNav.nav .cu-item.cur::after {
+ content: "";
+ width: 8rpx;
+ height: 30rpx;
+ border-radius: 10rpx 0 0 10rpx;
+ position: absolute;
+ background-color: currentColor;
+ top: 0;
+ right: 0rpx;
+ bottom: 0;
+ margin: auto;
+}
+.ScrollBox{
+ display: flex;
+}
+.ScrollMain{
+ background-color: #f1f1f1;
+}
\ No newline at end of file
diff --git a/demo/pages/plugin/drawer/drawer.js b/demo/pages/plugin/drawer/drawer.js
new file mode 100644
index 0000000..ea3d78f
--- /dev/null
+++ b/demo/pages/plugin/drawer/drawer.js
@@ -0,0 +1,40 @@
+//index.js
+//获取应用实例
+const app = getApp()
+
+Page({
+ data: {
+ StatusBar: app.globalData.StatusBar,
+ CustomBar: app.globalData.CustomBar,
+ Custom: app.globalData.Custom,
+ hasUserInfo: false,
+ canIUse: wx.canIUse('button.open-type.getUserInfo'),
+ TabCur: 1,
+ scrollLeft: 0
+ },
+ getUserInfo: function (e) {
+ console.log(e)
+ app.globalData.userInfo = e.detail.userInfo
+ this.setData({
+ userInfo: e.detail.userInfo,
+ hasUserInfo: true
+ })
+ },
+ showModal(e) {
+ this.setData({
+ modalName: e.currentTarget.dataset.target
+ })
+ },
+ hideModal(e) {
+ this.setData({
+ modalName: null
+ })
+ },
+ tabSelect(e) {
+ console.log(e);
+ this.setData({
+ TabCur: e.currentTarget.dataset.id,
+ scrollLeft: (e.currentTarget.dataset.id - 1) * 60
+ })
+ }
+})
diff --git a/demo/pages/plugin/drawer/drawer.json b/demo/pages/plugin/drawer/drawer.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/demo/pages/plugin/drawer/drawer.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/demo/pages/plugin/drawer/drawer.wxml b/demo/pages/plugin/drawer/drawer.wxml
new file mode 100644
index 0000000..559d64b
--- /dev/null
+++ b/demo/pages/plugin/drawer/drawer.wxml
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 99
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tab{{index}}
+ 点击头像打开抽屉
+
+ 返回上一页
+
+
+
+
+
+
+
+ ColorUI组件库
+ v2.0
+
+
+ By:文晓港
+
+
+
+
+
+
+ GitHub
+
+
+
+
+
+ 关于ColorUI组件库
+
+
+
+
+
+ 日志
+
+
+
+
+
+ 赞赏支持
+
+
+
+
+
+
+
+
+ Bug测试
+
+
+
+
\ No newline at end of file
diff --git a/demo/pages/plugin/drawer/drawer.wxss b/demo/pages/plugin/drawer/drawer.wxss
new file mode 100644
index 0000000..36cbcb7
--- /dev/null
+++ b/demo/pages/plugin/drawer/drawer.wxss
@@ -0,0 +1,101 @@
+page {
+ background-color: #555;
+ background-size: 100%;
+}
+
+.DrawerPage {
+ position: absolute;
+ width: 100vw;
+ height: 100vh;
+ left: 0vw;
+ background-color: #f1f1f1;
+ transition: all 0.6s;
+}
+
+.DrawerPage.show {
+ transform: scale(0.9, 0.9);
+ left: 85vw;
+ box-shadow: 0 0 60rpx rgba(0, 0, 0, 0.2);
+ transform-origin: 0;
+}
+
+.DrawerWindow {
+ position: absolute;
+ width: 85vw;
+ height: 100vh;
+ left: 0;
+ top: 0;
+ transform: scale(0.9, 0.9) translateX(-100%);
+ opacity: 0;
+ pointer-events: none;
+ transition: all 0.6s;
+}
+
+.DrawerWindow.show {
+ transform: scale(1, 1) translateX(0%);
+ opacity: 1;
+ pointer-events: all;
+}
+
+.DrawerClose {
+ position: absolute;
+ width: 40vw;
+ height: 100vh;
+ right: 0;
+ top: 0;
+ color: transparent;
+ padding-bottom: 30rpx;
+ display: flex;
+ align-items: flex-end;
+ justify-content: center;
+ background-image: linear-gradient(90deg,rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.6));
+ letter-spacing: 5px;
+ font-size: 50rpx;
+ opacity: 0;
+ pointer-events: none;
+ transition: all 0.6s;
+}
+.DrawerClose.show {
+ opacity: 1;
+ pointer-events: all;
+ width: 15vw;
+ color: #fff;
+}
+
+.DrawerPage .cu-bar.tabbar .action button.icon {
+ width: 64rpx;
+ height: 64rpx;
+ line-height: 64rpx;
+ margin: 0;
+ display: inline-block;
+}
+
+.DrawerPage .cu-bar.tabbar .action .cu-avatar {
+ margin: 0;
+}
+
+.DrawerPage .nav {
+ flex: 1;
+}
+
+.DrawerPage .nav .cu-item.cur {
+ border-bottom: 0;
+ position: relative;
+}
+
+.DrawerPage .nav .cu-item.cur::after {
+ content: "";
+ width: 10rpx;
+ height: 10rpx;
+ background-color: currentColor;
+ position: absolute;
+ bottom: 10rpx;
+ border-radius: 10rpx;
+ left: 0;
+ right: 0;
+ margin: auto;
+}
+
+.DrawerPage .cu-bar.tabbar .action {
+ flex: initial;
+}
diff --git a/demo/pages/plugin/home/home.js b/demo/pages/plugin/home/home.js
index 8034b52..42c9af4 100644
--- a/demo/pages/plugin/home/home.js
+++ b/demo/pages/plugin/home/home.js
@@ -7,11 +7,16 @@ Component({
title: '索引列表',
img: 'https://image.weilanwl.com/color2.0/plugin/sylb2244.jpg',
url: '../indexes/indexes'
- },
+ },
{
title: '微动画',
img: 'https://image.weilanwl.com/color2.0/plugin/wdh2236.jpg',
url: '../animation/animation'
+ },
+ {
+ title: '全屏抽屉',
+ img: 'https://image.weilanwl.com/color2.0/plugin/qpct2148.jpg',
+ url: '../drawer/drawer'
}
]
},
diff --git a/demo/pages/plugin/home/home.wxml b/demo/pages/plugin/home/home.wxml
index 656f08b..d797975 100644
--- a/demo/pages/plugin/home/home.wxml
+++ b/demo/pages/plugin/home/home.wxml
@@ -1,6 +1,6 @@
-
+
@@ -11,4 +11,5 @@
{{item.title}}
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/demo/pages/plugin/home/home.wxss b/demo/pages/plugin/home/home.wxss
index e5bbb3b..6ade6a4 100644
--- a/demo/pages/plugin/home/home.wxss
+++ b/demo/pages/plugin/home/home.wxss
@@ -1,6 +1,3 @@
-page{
- padding-bottom: 100rpx;
-}
.cu-bar .content image{
height: 60rpx;
width: 240rpx;
diff --git a/demo/project.config.json b/demo/project.config.json
index 530a44c..caa23e8 100644
--- a/demo/project.config.json
+++ b/demo/project.config.json
@@ -36,7 +36,7 @@
"list": []
},
"miniprogram": {
- "current": 2,
+ "current": 31,
"list": [
{
"id": 0,
@@ -194,6 +194,13 @@
"pathName": "pages/plugin/animation/animation",
"query": ""
},
+ {
+ "id": 31,
+ "name": "3.3 扩展-全屏抽屉",
+ "pathName": "pages/plugin/drawer/drawer",
+ "query": "",
+ "scene": null
+ },
{
"id": -1,
"name": "-----关于-首页-----",