tab页面自动切换
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
</el-steps>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<el-tabs type="border-card" :active-index="String(activeIndex)" >
|
||||
<el-tabs type="border-card" v-model="editableTabsValue" :active-index="String(activeIndex)" >
|
||||
<!-- <div > -->
|
||||
<el-tab-pane v-for="(device, index) in name" :key="index" :label="device">
|
||||
<template #label>
|
||||
@@ -135,7 +135,7 @@ const channel = ref<number[]>([])//系数校准所选设备通道数组
|
||||
// 在 setup 函数中
|
||||
const errorStates = ref(new Array(name.value.length).fill(false));
|
||||
const loadingStates = ref(new Array(name.value.length).fill(false)); // 初始化 loading 状态
|
||||
|
||||
const editableTabsValue = ref('0')
|
||||
const props = defineProps({
|
||||
webMsgSend: {
|
||||
type: Object,
|
||||
@@ -600,9 +600,7 @@ watch(activeIndex, function (newValue, oldValue) {
|
||||
outputDsc.value = "电压误差为:±0.1Un%; 电流误差为:±0.5%";
|
||||
// 当前源输出为:Ua=Ub=Uc=57.74V Ia=Ib=Ic=1A"
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
})
|
||||
|
||||
// 示例的 checkForErrors 函数,根据实际需求进行调整
|
||||
const checkForErrors = (data: TableDataItem[]): boolean => {
|
||||
@@ -627,7 +625,7 @@ const handleSubmit = async () => {
|
||||
// 重置状态变量
|
||||
active.value = 0;
|
||||
//activeIndex.value = 0;
|
||||
|
||||
editableTabsValue.value = i.toString();
|
||||
// 初始化并填充 currentTableData
|
||||
const currentTableData = initializeTableData(dataTemplates4, i);
|
||||
tableDataMap.set(i, currentTableData);
|
||||
|
||||
Reference in New Issue
Block a user