<template>
    <renderer v-if="items && items.length > 0"
                :data="items"
                class="eye-clear"
                :cols="type == 'row' ? 1 : 2"
                >
      <template slot-scope="{row,index}">

        <SupplyRenderer :data="row.data"
                        :modeType="type"
                        :style="formatterGapStyle(gap)"
                        :priceStyle="formatterFontStyle({ font : priceFont})"
                        :descStyle="formatterFontStyle({ font : descFont})"
        ></SupplyRenderer>

      </template>
    </renderer>

</template>

<script>


import SupplyRenderer from '../renderer/SupplyRenderer'
import Renderer from '../renderer/Renderer'
import Field from '../mixins/field'

export default {

  name: "SupplyView",

  mixins:[ Field ],

  components: {
      SupplyRenderer,
      Renderer
  },

  props: {
      type: {
          type:String,
          default:'row'
      },
      gap: {
          type:Number,
          default:0
      },
      descFont:{
          type:String,
          default:'|'
      },
      priceFont:{
          type:String,
          default:'|'
      },
      items: {
          type:Array,
          default:()=>{
            return []
          }
      }
  },

  methods: {
  }
}

</script>