1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<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>