Change price display
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<p class="price">{{ "$" + item.price }}</p>
|
<p class="price">${{ item.price | noDecimal }}</p>
|
||||||
</section>
|
</section>
|
||||||
</router-link>
|
</router-link>
|
||||||
</article>
|
</article>
|
||||||
@@ -22,6 +22,11 @@
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
item: Object
|
item: Object
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
noDecimal(value) {
|
||||||
|
return parseInt(value).toFixed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<p class="price">{{ "$" + fruit.price }}</p>
|
<p class="price">${{ fruit.price | noDecimal }}</p>
|
||||||
<div class="alert">
|
<div class="alert">
|
||||||
{{ "This offer " + expirationState }} {{ fruit.expires | moment("from", "now") }}
|
{{ "This offer " + expirationState }} {{ fruit.expires | moment("from", "now") }}
|
||||||
</div>
|
</div>
|
||||||
@@ -33,6 +33,11 @@ export default {
|
|||||||
modalOpen: true
|
modalOpen: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
filters: {
|
||||||
|
noDecimal(value) {
|
||||||
|
return parseInt(value).toFixed();
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["fruit"]),
|
...mapState(["fruit"]),
|
||||||
expirationState() {
|
expirationState() {
|
||||||
@@ -64,7 +69,7 @@ article {
|
|||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
padding: 1.5rem 1rem;
|
padding: 1.5rem 2rem;
|
||||||
background-color: @color-2;
|
background-color: @color-2;
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
|
|||||||
Reference in New Issue
Block a user