浏览代码

修复一些自测的bug

tremble 2 年之前
父节点
当前提交
8297eadf1b

+ 2 - 2
packages/qjkankan-editor/src/components/materialSelectorForEditor.vue

@@ -991,7 +991,7 @@ export default {
       const latestUsedSearchKey = this.searchKey
       getMaterialList(
         {
-          pageNum: Math.floor(this.videoListReallength / config.PAGE_SIZE) + 1,
+          pageNum: Math.floor(this.videoListRealLength / config.PAGE_SIZE) + 1,
           pageSize: config.PAGE_SIZE,
           searchKey: this.searchKey,
           type: 'video',
@@ -1005,7 +1005,7 @@ export default {
             return i;
           });
           this.videoList = this.videoList.concat(newData)
-          if (this.videoListReallength === data.data.total) {
+          if (this.videoListRealLength === data.data.total) {
             this.hasMoreVideoData = false
           }
           this.isRequestingMoreVideoData = false

+ 19 - 10
packages/qjkankan-view/src/components/UIGather/mobile/list.vue

@@ -12,8 +12,9 @@
           }" :style="{ backgroundImage: `url(${item.icon})` }" v-for="(item, i) in currentScenesList" :key="i">
             <i class="iconfont " :class="item.type == '4dkk' ? 'icon-editor_3d' : 'icon-editor_panoramic'"></i>
             <div>
-              <span v-if="currentScene.id == item.id">{{item.sceneTitle}}</span>
-              <span v-else>{{ item.sceneTitle.length > spanlength ? item.sceneTitle.slice(0, spanlength) : item.sceneTitle
+              <span v-if="currentScene.id == item.id">{{ item.sceneTitle }}</span>
+              <span v-else>{{ item.sceneTitle.length > spanlength ? item.sceneTitle.slice(0, spanlength) :
+                  item.sceneTitle
               }}</span>
             </div>
           </li>
@@ -27,25 +28,24 @@
             active: currentSecondary.id == item.id,
             loopspan: item.name.length > spanlength && currentSecondary.id == item.id,
           }" v-for="(item, i) in secondaryList" :key="i">
-            <span v-if="currentSecondary.id == item.id">{{item.name}}</span>
+            <span v-if="currentSecondary.id == item.id">{{ item.name }}</span>
             <span v-else>{{ item.name.length > spanlength ? item.name.slice(0, spanlength) : item.name }}</span>
-           </li>
+          </li>
         </ul>
       </div>
     </div>
 
-    <div class="swiper-container" id="swcatalogRoot"
-    :style="`width:${Math.min(catalogRootW, innerW)}px;
-      padding:${catalogRootW > innerW ? '0 15px' : '0'}`"
+    <div class="swiper-container" id="swcatalogRoot" :style="`width:${Math.min(catalogRootW, innerW)}px;
+    padding:${catalogRootW > innerW ? '0 15px' : '0'}`"
       v-if="metadata.catalogRoot.length > 0 && metadata.catalogs.length > 1">
       <ul class="swiper-wrapper" v-if="metadata.catalogRoot.length > 1">
         <li class="swiper-slide" :class="{
           active: currentCatalogRoot.id == item.id,
           loopspan: item.name.length > spanlength && currentCatalogRoot.id == item.id,
         }" @click="tabRoot(item)" v-for="(item, i) in metadata.catalogRoot" :key="i">
-          <span v-if="currentCatalogRoot.id == item.id">{{item.name}}</span>
+          <span v-if="currentCatalogRoot.id == item.id">{{ item.name }}</span>
           <span v-else>{{ item.name.length > spanlength ? item.name.slice(0, spanlength) : item.name }}</span>
-     
+
         </li>
       </ul>
     </div>
@@ -107,14 +107,23 @@ const loadList = () => {
     let t = setTimeout(() => {
       clearTimeout(t);
       ["#swcatalogRoot", "#swSecondary", "#swScenes"].forEach((item) => {
-        new Swiper(item, {
+        let tmp = new Swiper(item, {
           slidesPerView: "auto",
           centeredSlides: true,
           spaceBetween: 10,
           centerInsufficientSlides: true,
           centeredSlidesBounds: true,
           freeMode: true,
+          observer: true,
+          observeParents:true
         });
+        if (item == '#swScenes') {
+          setTimeout(() => {
+            tmp && tmp.slideTo(0, 50, false)
+          }, 0);
+        }
+
+        // console.log(tmp.slideTo);
       });
     }, 100);
   });