baseUrl added

pull/3426/head
Tuğçe Küçükoğlu 2022-12-21 16:48:44 +03:00
parent 704647172b
commit 456c69eba0
1 changed files with 7 additions and 4 deletions

View File

@ -23,7 +23,7 @@
<div class="product-item"> <div class="product-item">
<div class="product-item-content"> <div class="product-item-content">
<div class="mb-3"> <div class="mb-3">
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" /> <img :src="baseUrl + 'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" />
</div> </div>
<div> <div>
<h4 class="mb-1">{{ slotProps.data.name }}</h4> <h4 class="mb-1">{{ slotProps.data.name }}</h4>
@ -50,7 +50,7 @@
<div class="product-item"> <div class="product-item">
<div class="product-item-content"> <div class="product-item-content">
<div class="mb-3"> <div class="mb-3">
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" /> <img :src="baseUrl + 'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" />
</div> </div>
<div> <div>
<h4 class="mb-1">{{ slotProps.data.name }}</h4> <h4 class="mb-1">{{ slotProps.data.name }}</h4>
@ -77,7 +77,7 @@
<div class="product-item"> <div class="product-item">
<div class="product-item-content"> <div class="product-item-content">
<div class="mb-3"> <div class="mb-3">
<img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" /> <img :src="baseUrl + 'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.name" class="product-image" />
</div> </div>
<div> <div>
<h4 class="mb-1">{{ slotProps.data.name }}</h4> <h4 class="mb-1">{{ slotProps.data.name }}</h4>
@ -124,7 +124,8 @@ export default {
numVisible: 1, numVisible: 1,
numScroll: 1 numScroll: 1
} }
] ],
baseUrl: '/'
}; };
}, },
productService: null, productService: null,
@ -133,6 +134,8 @@ export default {
}, },
mounted() { mounted() {
this.productService.getProductsSmall().then((data) => (this.products = data.slice(0, 9))); this.productService.getProductsSmall().then((data) => (this.products = data.slice(0, 9)));
this.baseUrl = process.dev ? '/' : '/primevue-nuxt/';
}, },
components: { components: {
CarouselDoc: CarouselDoc CarouselDoc: CarouselDoc