Ver código fonte

Removed Carousel loaded flag

master
GJWilliams87 4 anos atrás
pai
commit
e315d57a3d

+ 10
- 15
src/components/property/commercial/singleView/singleCommercialPage.vue Ver arquivo

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div>
3 3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="carouselLoaded = true" /> -->
4
-    <main id="main" style="margin-top:20px">
4
+    <main id="main" style="margin-top: 20px">
5 5
       <contentSection
6 6
         :property="property"
7 7
         :propertyImages="propertyImages"
@@ -18,30 +18,28 @@
18 18
 
19 19
 import { mapState, mapActions, mapGetters } from "vuex";
20 20
 import makeOffer from "../../../processFlow/makeOffer";
21
-import carouselSection from "./carouselSection";
21
+// import carouselSection from "./carouselSection";
22 22
 import contentSection from "./contentSection";
23 23
 
24 24
 export default {
25 25
   name: "property",
26 26
   components: {
27 27
     makeOffer,
28
-    carouselSection,
29
-    contentSection
28
+    contentSection,
30 29
   },
31 30
   data() {
32 31
     return {
33 32
       index: null,
34 33
       date: new Date(),
35 34
       wait: true,
36
-      carouselLoaded: false,
37 35
       contentloaded: false,
38 36
       dataProp: {},
39
-      dataImages: {}
37
+      dataImages: {},
40 38
     };
41 39
   },
42 40
   mounted() {
43 41
     this.clearPropertyImages();
44
-    this.getDisplayProperty(this.$route.params.id).then(data => {
42
+    this.getDisplayProperty(this.$route.params.id).then((data) => {
45 43
       this.getSavedPropertyImages(data.id).then(() => {
46 44
         this.wait = false;
47 45
       });
@@ -52,17 +50,17 @@ export default {
52 50
   computed: {
53 51
     ...mapState("property", ["property", "propertyImages"]),
54 52
     Wait() {
55
-      if (this.wait && !this.carouselLoaded && !this.contentloaded) {
53
+      if (this.wait && !this.contentloaded) {
56 54
         return true;
57 55
       }
58 56
       return false;
59
-    }
57
+    },
60 58
   },
61 59
   methods: {
62 60
     ...mapActions("property", [
63 61
       "getDisplayProperty",
64 62
       "clearPropertyImages",
65
-      "getSavedPropertyImages"
63
+      "getSavedPropertyImages",
66 64
     ]),
67 65
     formatPrice(value) {
68 66
       const val = (value / 1).toFixed(2);
@@ -74,16 +72,13 @@ export default {
74 72
       }
75 73
       return "";
76 74
     },
77
-    CarouselDone() {
78
-      this.carouselLoaded = true;
79
-    },
80 75
     ContentDone() {
81 76
       this.contentloaded = true;
82
-    }
77
+    },
83 78
   },
84 79
   beforeDestroy() {
85 80
     this.clearPropertyImages();
86
-  }
81
+  },
87 82
 };
88 83
 </script>
89 84
 

+ 17
- 25
src/components/property/residential/singleView/singleResidentialPage.vue Ver arquivo

@@ -1,8 +1,12 @@
1 1
 <template>
2 2
   <div>
3 3
     <!-- <carouselSection :propertyImages="propertyImages" @Loaded="CarouselDone" /> -->
4
-    <main id="main" style="margin-top:20px">
5
-      <contentSection :property="property" :propertyImages="propertyImages" @Loaded="ContentDone" />
4
+    <main id="main" style="margin-top: 20px">
5
+      <contentSection
6
+        :property="property"
7
+        :propertyImages="propertyImages"
8
+        @Loaded="ContentDone"
9
+      />
6 10
     </main>
7 11
     <div v-if="Wait" id="preloader"></div>
8 12
   </div>
@@ -13,15 +17,14 @@
13 17
 
14 18
 import { mapState, mapActions } from "vuex";
15 19
 import makeOffer from "../../../processFlow/makeOffer";
16
-import carouselSection from "./carouselSection";
20
+//import carouselSection from "./carouselSection";
17 21
 import contentSection from "./contentSection";
18 22
 
19 23
 export default {
20 24
   name: "property",
21 25
   components: {
22 26
     makeOffer,
23
-    carouselSection,
24
-    contentSection
27
+    contentSection,
25 28
   },
26 29
   data() {
27 30
     return {
@@ -29,34 +32,23 @@ export default {
29 32
       date: new Date(),
30 33
       boolLoaded: false,
31 34
       wait: false,
32
-      carouselLoaded: false,
33
-      contentloaded: false
35
+      contentloaded: false,
34 36
     };
35 37
   },
36
-  async mounted() {
37
-    this.wait = true;
38
-    this.carouselLoaded = false;
39
-    this.contentloaded = false;
38
+  mounted() {
40 39
     this.clearPropertyImages();
41
-    await this.getDisplayProperty(this.$route.params.id);
42
-
43
-    // await this.getPropertyImages(this.$route.params.id);
44
-    // setTimeout(() => {
45
-    //   if (this.propertyImages.length > 0) {
46
-    //     this.boolLoaded = true;
47
-    //   }
48
-    // }, 100);
49
-
50
-    //this.mayEditProperty(this.$route.params.id);
40
+    this.getDisplayProperty(this.$route.params.id).then((data) => {
41
+      this.wait = false;
42
+    });
51 43
   },
52 44
   computed: {
53 45
     ...mapState("property", ["property", "propertyImages"]),
54 46
     Wait() {
55
-      if (this.wait && !this.carouselLoaded && !this.contentloaded) {
47
+      if (this.wait && !this.contentloaded) {
56 48
         return true;
57 49
       }
58 50
       return false;
59
-    }
51
+    },
60 52
   },
61 53
   methods: {
62 54
     ...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
@@ -77,11 +69,11 @@ export default {
77 69
     },
78 70
     ContentDone() {
79 71
       this.contentloaded = true;
80
-    }
72
+    },
81 73
   },
82 74
   beforeDestroy() {
83 75
     this.clearPropertyImages();
84
-  }
76
+  },
85 77
 };
86 78
 </script>
87 79
 

Carregando…
Cancelar
Salvar