<!--
|
* @Author: 陈祝文 15821704398@163.com
|
* @Date: 2023-03-14 09:50:40
|
* @LastEditors: 陈祝文 15821704398@163.com
|
* @LastEditTime: 2023-03-14 11:31:46
|
* @FilePath: \iwara-scada-web\src\views\main\EquipmentCurrentMonitor\modules\tab.vue
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
-->
|
<template>
|
<div>
|
<a-tabs :default-active-key="active" @change="activeChange">
|
<a-tab-pane v-for="item in statusEnums" :key="item.equipmentState" :tab="item.equipmentStateName + ' ' + item.equipmentStateNum"></a-tab-pane>
|
</a-tabs>
|
</div>
|
</template>
|
<script>
|
|
export default {
|
props: {
|
activeKey: { type: String, required: true },
|
statusEnums: { type: Array, required: true }
|
},
|
emits: ['update:activeKey'],
|
computed: {
|
active: {
|
get() {
|
return this.activeKey
|
},
|
set(val) {
|
this.$emit('update:activeKey', val)
|
}
|
}
|
},
|
methods: {
|
activeChange(key) {
|
this.active = key
|
}
|
}
|
}
|
</script>
|
<style>
|
</style>
|