schangxiang@126.com
2024-09-02 3b3e3bcf1345197670c82988ceb3e8d34be3b5f1
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
<!--
 * @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>