zhaoxiaohai 3 years ago
parent
commit
bfcda1bf5d

+ 0 - 24
pages/tabbar/smartStore/index.js

@@ -5,30 +5,6 @@ Page({
      * 页面的初始数据
      */
     data: {
-        option1: [{
-                text: '列表',
-                value: 0
-            },
-            {
-                text: '收藏夹',
-                value: 1
-            }
-        ],
-        option2: [{
-                text: '默认排序',
-                value: 'a'
-            },
-            {
-                text: '按上传日期升序',
-                value: 'b'
-            },
-            {
-                text: '按上传日期降序',
-                value: 'c'
-            },
-        ],
-        value1: 0,
-        value2: 'a',
     },
 
     /**

+ 12 - 1
pages/tabbar/smartStore/index.scss

@@ -1 +1,12 @@
-@import '/static/unread.wxss';
+@import '../../../static/unread.wxss';
+
+.switch {
+    display: flex;
+    align-items: center;
+    height: 90rpx;
+    width: 650rpx;
+    box-sizing: border-box;
+    padding-right: 30rpx;
+    justify-content: flex-end;
+    background: #ffffff;
+}

+ 9 - 5
pages/tabbar/smartStore/index.wxml

@@ -1,8 +1,12 @@
 <van-search value="{{ value }}" shape="round" background="var(--bgColor)" placeholder="搜索文件" />
-<van-dropdown-menu active-color='var(--assist)'>
-    <van-dropdown-item value="{{value1}}" options="{{ option1 }}" />
-    <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" />
-</van-dropdown-menu>
+
+<van-tabs color='var(--assist)' title-active-color='var(--assist)' sticky>
+    <van-tab title="列表" />
+    <van-tab title="收藏夹" />
+    <view slot='nav-right' class="switch">
+        <My_switch></My_switch>
+    </view>
+</van-tabs>
 <view class="unread">总共20个,有1个更新</view>
 <My_files></My_files>
-<view style="height: 140rpx;" />
+<view style="height: 140rpx;" />