mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-06-06 21:54:00 +08:00
v2.0.6
1.修复行距带来的垂直不居中问题 2.优化操作条组件,新增多种样式 3.优化背景颜色(某些组件的默认背景调整,移除一些important) 4.更新动画扩展5.优化按钮,标签,头像的大小
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
Component({
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
},
|
||||
data: {
|
||||
selected: 0,
|
||||
list: [{
|
||||
pagePath: "/pages/basics/home/home",
|
||||
iconPath: "/images/tabbar/basics.png",
|
||||
selectedIconPath: "/images/tabbar/basics_cur.png",
|
||||
text: "基础"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/component/home/home",
|
||||
iconPath: "/images/tabbar/component.png",
|
||||
selectedIconPath: "/images/tabbar/component_cur.png",
|
||||
text: "组件"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/plugin/home/home",
|
||||
iconPath: "/images/tabbar/plugin.png",
|
||||
selectedIconPath: "/images/tabbar/plugin_cur.png",
|
||||
text: "扩展"
|
||||
},
|
||||
{
|
||||
pagePath: "/pages/about/home/home",
|
||||
iconPath: "/images/tabbar/about.png",
|
||||
selectedIconPath: "/images/tabbar/about_cur.png",
|
||||
text: "关于"
|
||||
}
|
||||
]
|
||||
},
|
||||
methods: {
|
||||
switchTab(e) {
|
||||
const url = e.currentTarget.dataset.path
|
||||
wx.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
},
|
||||
pageLifetimes: {
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<view class="cu-bar tabbar bg-white shadow">
|
||||
<view class="action" wx:for="{{list}}" wx:key="index" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
|
||||
<view class='icon-cu-image'>
|
||||
<image src='{{selected === index ? item.selectedIconPath : item.iconPath}}' class='{{selected === index ? "animation" : "animation"}}'></image>
|
||||
</view>
|
||||
<view class='{{selected === index ? "text-green" : "text-gray"}}'>{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user