I am having trouble linking to another URL when I click on an image using Vue.
It should be possible to link by clicking on the images, but it seems to not be working.
If anyone can offer assistance, I would greatly appreciate it.
Below is what my code looks like:
HTML
<section class="bg-light page-section" id="portfolio">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center"><br>
<h2 class="section-heading text-uppercase works-text">Works</h2>
<h3 class="section-subheading text-muted">Selected work that has been created with the help of many.</h3>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6 portfolio-item" v-for="(obj, key) in portfolioJSON" :key="key" >
<a class="portfolio-link" data-toggle="modal" target = "_blank" v-bind:href="`${obj.url}`">
<div class="portfolio-hover">
<div class="portfolio-hover-content">
<!-- <! <i class="fas fa-plus fa-3x"></i> -->
</div>
</div>
<img :src="`${obj.img}`" class="img-fluid" >
</a>
<div class="portfolio-caption works-text">
<h4 class="works-text">{{ obj.caption }}</h4>
<p class="text-muted works-text">{{ obj.title }}</p>
</div>
</div>
</div>
</div>
</section>
export default {
data() {
return{
portfolioJSON: [
{
img: require('../assets/img/sukimatch/sukimatch.png'),
caption: 'Sukimatch',
title: 'WEBSITE, BANNER DESIGN',
url: "https://sukimatch-f887f.firebaseapp.com/"
},
{
img: require('../assets/img/portfolio/greencosjapan.png'),
caption: 'Greencosjapan',
title: 'WEBSITE',
url: "https://greencosjapan.com"
}
]
}
}, computed: {
imageArray: function() {
return this.portfolioJSON.map(obj => obj.img)
},
urlArray: function() {
return this.portfolioJSON.map(obj => obj.url)
}
},
}