Browse Source

[ADD] product card description

Gogs 7 years ago
parent
commit
1aac5575b8
2 changed files with 6 additions and 2 deletions
  1. 5 1
      src/components/common/CardGrid.vue
  2. 1 1
      src/components/product/ProductsStep.vue

+ 5 - 1
src/components/common/CardGrid.vue

@@ -2,7 +2,7 @@
     .card-grid-wrapper
         .card-grid
             add-card(v-if='canAdd' @onClick='onClickAdd')
-            card(v-for='item in items' :key='item.id' :title='item.name' :image='item.imageMedium' :isSelected='item.id === selectedId' @onClick='onClickCard(item)')
+            card(v-for='item in items' :key='item.id' :title='item.name' :image='item.imageMedium' :isSelected='item.id === selectedId' :withDescription='displayDescriptions' @onClick='onClickCard(item)')
 </template>
 
 <script>
@@ -18,6 +18,10 @@
             canAdd: {
                 type: Boolean,
                 default: false
+            },
+            displayDescriptions: {
+                type: Boolean,
+                default: false
             }
         },
         components: {

+ 1 - 1
src/components/product/ProductsStep.vue

@@ -2,7 +2,7 @@
     .purchase-step
         .products-selector
             searcher(:items='products' :keys="['name', 'displayName']" @onSearch='filterProducts')
-            card-grid(:items='visibleProducts' canAdd @onAdd='showProductForm' @onSelect='selectProduct')
+            card-grid(:items='visibleProducts' canAdd displayDescriptions @onAdd='showProductForm' @onSelect='selectProduct')
             product-form
         cart
 </template>