ソースを参照

修改优化电梯楼层

unknown 6 年 前
コミット
3b270c8f2e
2 ファイル変更44 行追加38 行削除
  1. 5 0
      src/packages/elevator/elevator.scss
  2. 39 38
      src/packages/elevator/elevator.vue

+ 5 - 0
src/packages/elevator/elevator.scss

@@ -1,4 +1,9 @@
 .nut-elevator{
 .nut-elevator{
+    position: fixed;
+    top:40px;
+    width: 100%;
+}
+.nut-main{
     overflow: scroll;
     overflow: scroll;
     background:#FFF; 
     background:#FFF; 
     &::-webkit-scrollbar{
     &::-webkit-scrollbar{

+ 39 - 38
src/packages/elevator/elevator.vue

@@ -1,44 +1,45 @@
 <template>
 <template>
-    <div class="nut-elevator" id="nut-elevator" :style="{height:wrapHeight+'px'}">
-        <ul class="nut-elevator-ul" 
-            id="nut-elevator-ul"
-            >
-            <li 
-            v-for="item in dataArray" 
-            v-bind:key="item.title"
-            class="nut-list-title" 
-            >
-                <h3 class="nut-list-h" :id="item.title">{{item.title}}</h3>
-                <ul class="nut-people-list">
-                    <li v-for="(list,idx) in item.list" 
-                    v-bind:key="idx"
-                    class="nut-list-name" 
-                    :id="list.id?list.id:'list'+item.title+idx"
-                    @click="clickList(list,item)"
-                    >{{list.name}}</li>
+        <div class="nut-elevator"  :style="{height:wrapHeight+'px'}">
+            <div class="nut-main" :style="{height:wrapHeight+'px'}">
+                <ul class="nut-elevator-ul" 
+                    id="nut-elevator-ul"
+                    >
+                    <li 
+                    v-for="item in dataArray" 
+                    v-bind:key="item.title"
+                    class="nut-list-title" 
+                    >
+                        <h3 class="nut-list-h" :id="item.title">{{item.title}}</h3>
+                        <ul class="nut-people-list">
+                            <li v-for="(list,idx) in item.list" 
+                            v-bind:key="idx"
+                            class="nut-list-name" 
+                            :id="list.id?list.id:'list'+item.title+idx"
+                            @click="clickList(list,item)"
+                            >{{list.name}}</li>
+                        </ul>
+                    </li>
                 </ul>
                 </ul>
-            </li>
-        </ul>
-        <ul class="nut-elevator-nav" id="nut-elevator-nav" 
-            @touchmove="onPointerMove($event)"
-            @touchstart="onPointerMove($event)"
-            @touchend="onPointerEnd($event)"
-            >
-            <li v-for="(item,index) in dataArray"
-            v-bind:key="index" 
-            :id="'nav'+index"
-            class="nut-nav-list" 
-            :class="{'nut-nav-curr':item.title==currTitle}"
-            :style="{height:navListHeight+'px'}"
-            @click="clickNav(item.title,index)"
-            >{{item.title}}</li>
-        </ul>
-        <template v-if="showIndicator">
-            <div class="nut-big-box" v-show="currBox">
-                {{currTitle}}
+                <ul class="nut-elevator-nav" id="nut-elevator-nav" 
+                    @touchmove="onPointerMove($event)"
+                    @touchstart="onPointerMove($event)"
+                    @touchend="onPointerEnd($event)"
+                    >
+                    <li v-for="(item,index) in dataArray"
+                    v-bind:key="index" 
+                    :id="'nav'+index"
+                    class="nut-nav-list" 
+                    :style="{height:navListHeight+'px'}"
+                    @click="clickNav(item.title,index)"
+                    >{{item.title}}</li>
+                </ul>
+                <template v-if="showIndicator">
+                    <div class="nut-big-box" v-show="currBox">
+                        {{currTitle}}
+                    </div>
+                </template>
             </div>
             </div>
-        </template>
-    </div>
+        </div>  
 </template>
 </template>
 <script>
 <script>
 export default {
 export default {