浏览代码

fix: H5端优化

lkd9698906@163.com 1 年之前
父节点
当前提交
99decf3419
共有 3 个文件被更改,包括 18 次插入4 次删除
  1. 2 2
      src/pages/Index.vue
  2. 8 1
      src/pages/mine/wifi/Index.vue
  3. 8 1
      src/router/index.ts

+ 2 - 2
src/pages/Index.vue

@@ -9,12 +9,12 @@
     </router-view>
   </div>
   <van-tabbar style="border-top: 1px solid #f0f0f0;" class="jj" v-show="showBtn" active-color="#0047FF" v-model="active">
-    <van-tabbar-item name="/home" to="/">
+    <!-- <van-tabbar-item name="/home" to="/">
       <span>工作台</span>
       <template #icon="props">
         <img :src="props.active? 'static/images/icon-home-active.png': 'static/images/icon-home.png'">
       </template>
-    </van-tabbar-item>
+    </van-tabbar-item> -->
     <van-tabbar-item name="/device" to="/device">
       <span>设备</span>
       <template #icon="props">

+ 8 - 1
src/pages/mine/wifi/Index.vue

@@ -90,6 +90,7 @@
           <van-cell
             :title="item.name"
             :label="item.password"
+            title-class="wifi-name"
             style="margin: 0.625rem 0 0 1rem"
           >
             <van-button
@@ -134,7 +135,7 @@
               placeholder="请输入WIFI名称"
               :rules="[
                 { required: true, message: '请输入WIFI名称' },
-                { validator: validator8, message: 'WIFI名称不得大于8位' },
+                { validator: validator20, message: 'WIFI名称不得大于8位' },
               ]"
             />
           </van-cell>
@@ -424,4 +425,10 @@ function getWifiInfo() {
     }
   }
 }
+
+.wifi-name{
+  white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
 </style>

+ 8 - 1
src/router/index.ts

@@ -13,9 +13,16 @@ const routes: Array<RouteRecordRaw> = [
       keepAlive: true,
     },
     children: [
+      // {
+      //   path: '/home',
+      //   component: ()=> import('@/pages/home/Index.vue'),
+      //   meta: {
+      //     keepAlive: true,
+      //   }
+      // },
       {
         path: '/home',
-        component: ()=> import('@/pages/home/Index.vue'),
+        component: ()=> import('@/pages/device/list/Index.vue'),
         meta: {
           keepAlive: true,
         }