Browse Source

fix creation img url & modal scope

axolotle 2 years ago
parent
commit
7b67f717c2

+ 5 - 6
src/components/globals/FullscreenModal.vue

@@ -1,12 +1,12 @@
 <template>
   <b-modal
     :id="id"
-    class="modal-image"
-    static hide-footer hide-header
+    modal-class="modal-image"
+    hide-footer hide-header
   >
     <template #default="{ close }">
       <div class="modal-image-wrapper">
-        <button-expand expanded  @click="close()" />
+        <button-expand expanded @click="close()" />
         <img
           v-if="image"
           :src="image.url" :alt="image.alt"
@@ -28,11 +28,11 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped>
+<style lang="scss">
 .modal-image {
   z-index: 1100;
 
-  ::v-deep .modal {
+  .modal {
     &-dialog {
       max-width: 100%;
       height: 100%;
@@ -76,6 +76,5 @@ export default {
       }
     }
   }
-
 }
 </style>

+ 1 - 1
src/components/nodes/NodeViewFigure.vue

@@ -53,7 +53,7 @@ export default {
   created () {
     if (this.node.images && this.node.images.length) {
       const { url, alt, id } = this.node.images[0]
-      this.image = { alt, id, url: url.replace('api', 'api/sites/default/files') }
+      this.image = { alt, id, url }
     }
   }
 }