Przeglądaj źródła

图片预览优化

yanym 3 tygodni temu
rodzic
commit
4d613bc540
2 zmienionych plików z 9 dodań i 4 usunięć
  1. 0 2
      src/main.ts
  2. 9 2
      src/views/AIDesign/result.vue

+ 0 - 2
src/main.ts

@@ -84,7 +84,6 @@ import {
   CheckboxGroup,
   ActionSheet,
   Search,
-    ImagePreview,
     Overlay,
   Lazyload
 } from "vant";
@@ -123,7 +122,6 @@ import {
   CheckboxGroup,
   ActionSheet,
   Search,
-    ImagePreview,
     Overlay,
   Lazyload
 ].forEach(x => Vue.use(x));

+ 9 - 2
src/views/AIDesign/result.vue

@@ -105,7 +105,7 @@
     <van-image-preview
             v-model="showImagePreview"
             :images="imagePreviewArray"
-            :loop="false"
+            :loop="true"
             :start-position="imagePreviewIndex"
             @change="imagePreviewOnChange">
       <template v-slot:index>
@@ -124,7 +124,11 @@ import { GetEntity, GetReadState, UpdateReadState, insideGetEntity, insideGetRea
 import { getWecomType, toLBHome, toXiaoChengxu, getWxconfig, getWecomTypeName, checkAndSaveUserWecomType } from '@/utils/index';
 import axios from "axios";
 declare let wx: any;
-@Component
+@Component({
+    components: {
+        [ImagePreview.Component.name]: ImagePreview.Component,
+    }
+})
 export default class extends Vue {
   private readState = true;
   // 数据属性
@@ -987,4 +991,7 @@ export default class extends Vue {
   font-size: 20px;
   color: #333;
 }
+::v-deep .van-swipe__track{
+  transition-duration: 300ms!important;
+}
 </style>