mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-03-14 20:24:03 +08:00
v2.1.2
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
StatusBar: app.globalData.StatusBar,
|
||||
CustomBar: app.globalData.CustomBar,
|
||||
TabCur: 0,
|
||||
scrollLeft:0
|
||||
},
|
||||
tabSelect(e) {
|
||||
console.log(e);
|
||||
this.setData({
|
||||
TabCur: e.currentTarget.dataset.id,
|
||||
scrollLeft: (e.currentTarget.dataset.id-1)*60
|
||||
|
||||
@@ -1,70 +1,62 @@
|
||||
<view class="cu-custom" style="height:{{CustomBar}}px;">
|
||||
<view class="cu-bar fixed bg-gradual-pink" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
|
||||
<navigator class='action' open-type="navigateBack" delta="1" hover-class="none">
|
||||
<text class='icon-back'></text> 导航栏
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:for="{{10}}" wx:key wx:if="{{index==TabCur}}" class='bg-grey padding margin text-center'>
|
||||
<cu-custom bgColor="bg-gradual-pink" isBack="{{true}}"><view slot="backText">返回</view><view slot="content">导航栏</view></cu-custom>
|
||||
<view wx:for="{{10}}" wx:key wx:if="{{index==TabCur}}" class="bg-grey padding margin text-center">
|
||||
Tab{{index}}
|
||||
</view>
|
||||
<view class="cu-bar bg-white solid-bottom">
|
||||
<view class='action'>
|
||||
<text class='icon-titles text-orange '></text> 默认
|
||||
<view class="action">
|
||||
<text class="icon-titles text-orange"></text> 默认
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation scroll-left="{{scrollLeft}}">
|
||||
<view class="cu-item {{index==TabCur?'text-green cur':''}}" wx:for="{{10}}" wx:key bindtap='tabSelect' data-id="{{index}}">
|
||||
<view class="cu-item {{index==TabCur?'text-green cur':''}}" wx:for="{{10}}" wx:key bindtap="tabSelect" data-id="{{index}}">
|
||||
Tab{{index}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="cu-bar bg-white margin-top solid-bottom">
|
||||
<view class='action'>
|
||||
<text class='icon-title text-orange'></text> 居中
|
||||
<view class="action">
|
||||
<text class="icon-title text-orange"></text> 居中
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="bg-white nav text-center">
|
||||
<view class="cu-item {{index==TabCur?'text-blue cur':''}}" wx:for="{{3}}" wx:key bindtap='tabSelect' data-id="{{index}}">
|
||||
<view class="cu-item {{index==TabCur?'text-blue cur':''}}" wx:for="{{3}}" wx:key bindtap="tabSelect" data-id="{{index}}">
|
||||
Tab{{index}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="cu-bar bg-white margin-top solid-bottom">
|
||||
<view class='action'>
|
||||
<text class='icon-title text-orange'></text> 平分
|
||||
<view class="action">
|
||||
<text class="icon-title text-orange"></text> 平分
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="bg-white nav">
|
||||
<view class='flex text-center'>
|
||||
<view class="cu-item flex-sub {{index==TabCur?'text-orange cur':''}}" wx:for="{{4}}" wx:key bindtap='tabSelect' data-id="{{index}}">
|
||||
<view class="flex text-center">
|
||||
<view class="cu-item flex-sub {{index==TabCur?'text-orange cur':''}}" wx:for="{{4}}" wx:key bindtap="tabSelect" data-id="{{index}}">
|
||||
Tab{{index}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="cu-bar bg-white margin-top solid-bottom">
|
||||
<view class='action'>
|
||||
<text class='icon-title text-orange'></text> 背景
|
||||
<view class="action">
|
||||
<text class="icon-title text-orange"></text> 背景
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="bg-red nav text-center">
|
||||
<view class="cu-item {{index==TabCur?'text-white cur':''}}" wx:for="{{3}}" wx:key bindtap='tabSelect' data-id="{{index}}">
|
||||
<view class="cu-item {{index==TabCur?'text-white cur':''}}" wx:for="{{3}}" wx:key bindtap="tabSelect" data-id="{{index}}">
|
||||
Tab{{index}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="cu-bar bg-white margin-top solid-bottom">
|
||||
<view class='action'>
|
||||
<text class='icon-title text-orange'></text> 图标
|
||||
<view class="action">
|
||||
<text class="icon-title text-orange"></text> 图标
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="bg-green nav text-center">
|
||||
<view class="cu-item {{0==TabCur?'text-white cur':''}}" bindtap='tabSelect' data-id="0">
|
||||
<text class='icon-camerafill'></text> 数码
|
||||
<view class="cu-item {{0==TabCur?'text-white cur':''}}" bindtap="tabSelect" data-id="0">
|
||||
<text class="icon-camerafill"></text> 数码
|
||||
</view>
|
||||
<view class="cu-item {{1==TabCur?'text-white cur':''}}" bindtap='tabSelect' data-id="1">
|
||||
<text class='icon-upstagefill'></text> 排行榜
|
||||
<view class="cu-item {{1==TabCur?'text-white cur':''}}" bindtap="tabSelect" data-id="1">
|
||||
<text class="icon-upstagefill"></text> 排行榜
|
||||
</view>
|
||||
<view class="cu-item {{2==TabCur?'text-white cur':''}}" bindtap='tabSelect' data-id="2">
|
||||
<text class='icon-clothesfill'></text> 皮肤
|
||||
<view class="cu-item {{2==TabCur?'text-white cur':''}}" bindtap="tabSelect" data-id="2">
|
||||
<text class="icon-clothesfill"></text> 皮肤
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
Reference in New Issue
Block a user