不活跃禁用按钮
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
<div class="info-item border-left">存栏: {{ pen.current_pig_count || 0 }}</div>
|
||||
</div>
|
||||
<div class="actions-section">
|
||||
<el-button size="small" @click="emitModifyPigCount">修改猪只数量</el-button>
|
||||
<el-button size="small" type="danger" @click="emitRemove">移除</el-button>
|
||||
<el-button size="small" @click="emitModifyPigCount" :disabled="!isBatchActive">修改猪只数量</el-button>
|
||||
<el-button size="small" type="danger" @click="emitRemove" :disabled="!isBatchActive">移除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -25,6 +25,10 @@ export default {
|
||||
pen: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
isBatchActive: {
|
||||
type: Boolean,
|
||||
default: true // 默认活跃,以防万一没有传递
|
||||
}
|
||||
},
|
||||
emits: ['remove', 'modify-pig-count'],
|
||||
|
||||
Reference in New Issue
Block a user