Просмотр исходного кода

外墙重新设计后,选项居中显示

yanym недель назад: 3
Родитель
Сommit
832ce92b4c
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/views/AIDesign/design.vue

+ 3 - 2
src/views/AIDesign/design.vue

@@ -893,7 +893,6 @@ export default class extends Vue {
   //   console.log('拍摄图片');
   // }
   private autoScrollToActive(refsName: string, selcIndex: number) {
-    console.log("refsName=", refsName)
     const container = this.$refs[refsName];
     const activeItem = container.children[selcIndex];
     const itemWidth = activeItem.offsetWidth * 1.1;
@@ -944,7 +943,9 @@ export default class extends Vue {
 
   private selectSplit(value: string, refsName: string, selcIndex: number) {
     this.selectedSplit = value;
-    this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
+    setTimeout(function () {
+        this.autoScrollToActive(refsName, selcIndex); // 选中后触发自动滚动
+    },1000)
   }
 
   private selectWindowStyle(value: string, refsName: string, selcIndex: number) {