2.0.3 • Published 3 years ago

em-grid-card-items v2.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

em-grid-card-items

Card grid

Install

npm install --save em-grid-card-items

Add to project

Global

#stylesheet.css

Vue.use options

// main.js
import EmGridCardItems from 'em-grid-card-items'
Vue.use(EmGridCardItems)

Local Usage

<template>
  <div>
      <em-grid-card-items
              :column-count="5"
              :column-spacing="10"
              :row-spacing="10"
              :is-add-mode-item="false"
              mode="add"
              resource-name="products"
              item-prop-name="product"
              em-card-type="EmCardProduct"
              :off-direction="false"
              :card-props="{isEditMode: true}"
              @action=""
      />
      <em-grid-card-items
              :column-count="5"
              resource-name="products"
              item-prop-name="product"
              em-card-type="EmCardProduct"
              :card-props="{isEditMode: true}"
              @action=""
      />
  </div>
</template>
<script>
  export default {
    name: 'component.vue',
  }
</script>

Setup

Parameters

Props(Parameter)TypeDefaultDescription
column-countNumber0Number of speakers
column-spacingNumber20Distance between columns of elements
row-spacingNumbercolumn-spacingDistance between rows of elements, if 0 or not set column-spacing is used
resource-nameStringnullThe api path of the resource on the backend
resource-prefixStringnullResource api path prefix on backend
resource-paramsObject{}The object of the parameters passed in the request to the api of the resource on the backend
item-prop-nameStringnullThe name of the parameter by which the object is passed to the component
card-propsObjectnullAdditional parameters passed to the object in the component
em-card-typeStringnullComponent name
off-directionBooleanfalseColumn distribution is done by flex-wrap, column-count is ignored
is-add-mode-itemBooleanfalseWhether to show the card in the mode of adding elements
check-listArray[]Array for storing selection of elements
modeStringpadination,addResource loading mode
is-dark-buttonBooleanfalseShow more button type true? 'Primary': 'warning'

License

The MIT License