diff --git a/public/index.html b/public/index.html index 775a036..ef6bb03 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - + Булочные Ф. Вольчека diff --git a/src/App.vue b/src/App.vue index 0eab6fe..a0a5a83 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,10 @@ @@ -24,6 +26,21 @@ export default { return { expanded: false } + }, + computed: { + // У некоторых товаров цена указана без символа рубля, легче просто его тут добавить. + cost: function() { + return isNaN(this.item.cost) ? this.item.cost : this.item.cost + " ₽" + }, + unit: function() { + // У некоторых товаров указана масса, но единицей измерения являются штуки. + // Вероятно стоит еще указывать количество (1 шт.)? + if (this.item.mass < 1 && this.item.unit === "шт.") { + return "кг"; + } else { + return this.item.unit; + } + } } } diff --git a/src/views/Contact.vue b/src/views/Contact.vue index ba7dd49..3965db6 100644 --- a/src/views/Contact.vue +++ b/src/views/Contact.vue @@ -1,5 +1,21 @@ \ No newline at end of file diff --git a/src/views/Goods.vue b/src/views/Goods.vue index 6113bff..5d70ef3 100644 --- a/src/views/Goods.vue +++ b/src/views/Goods.vue @@ -1,5 +1,7 @@ + + \ No newline at end of file