1
我VUE成分是這樣的:如何在vue組件上添加href條件?
<template>
<ul class="nav nav-tabs nav-tabs-bg">
<li role="presentation">
<a :href="baseUrl+'/search/store/'+param">
Store
</a>
</li>
</ul>
</template>
<script>
export default {
props: ['type', 'param'],
}
</script>
我想在HREF
如果type = 'A',那麼HREF =
<a :href="baseUrl+'/search/store/'+param">Store</a>
如果type = 'B',那麼HREF添加條件=
<a href="javascript:">Store</a>
我該怎麼辦?