unitCount.vue 817 Bytes
<template>
  <!-- <a-form-model-item :label="uname" :span="6">
    <a-input-number v-model="value" :min="0" :max="99" />
  </a-form-model-item> -->
  <div>
    <a-col :span="colSpan" class="bg-light_blue" style="text-align: right;">
      {{Unit.unitName}}
    </a-col>
    <a-col :span="colSpan">
      <a-input-number v-model="Unit.projLimit" :min="0" :max="1000" @change="onChange" />
    </a-col>
  </div>
  
</template>

<script>

export default {
  name: "UnitCount",
  data() {
    return {
    }
  },
  props: {
    Unit: {
      type: Object,
      require: true
    },
    colCount: {
      type: Number,
      require: true
    }
  },
  computed: {
    colSpan() {
      return this.colCount / 2
    }
  },
  methods: {
    onChange() {
      this.$emit('valueChange', this.Unit)
    }
  }
};
</script>