perf: 调整

This commit is contained in:
renxiaodong
2025-09-07 17:29:14 +08:00
parent 11382d8204
commit 4bab009fe6

View File

@ -9,12 +9,12 @@
@cancel="onClose"
centered
>
<Tabs :activeKey="activeTab" @change="handleTabClick">
<TabPane key="0" tab="导入"> </TabPane>
<TabPane key="1" tab="导出"> </TabPane>
<Tabs v-model:activeKey="activeTab" @change="handleTabClick">
<TabPane key="1" tab="导入"> </TabPane>
<TabPane key="2" tab="导出"> </TabPane>
</Tabs>
<div class="content">
<component :is="activeTab === '0' ? ImportTask : ExportTask" ref="componentRef" />
<component :is="activeTab === '1' ? ImportTask : ExportTask" ref="componentRef" />
</div>
</Modal>
</template>
@ -28,12 +28,12 @@ import ImportTask from './components/import-task';
const visible = ref(false);
const componentRef = ref(null);
const activeTab = ref('0');
const activeTab = ref('1');
let timer = null;
const handleTabClick = (key) => {
activeTab.value = key;
// activeTab.value = key;
nextTick(() => {
getData();
});
@ -44,13 +44,14 @@ const getData = () => {
};
const open = () => {
visible.value = true;
nextTick(() => {
getData();
});
timer = setInterval(() => {
getData();
}, 10000);
visible.value = true;
};
const onClose = () => {
activeTab.value = '0';