修改算法库

This commit is contained in:
guanj
2025-12-29 20:46:24 +08:00
parent 26ff8087c6
commit 06764c073a
6 changed files with 137 additions and 106 deletions

View File

@@ -2,10 +2,10 @@
<div class="default-main">
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="总览" name="1" v-if="tabList.includes('1')">
<overview v-if="activeName == '1'" />
<overview v-if="activeName == '1'" @algorithm="algorithm" />
</el-tab-pane>
<el-tab-pane label="算法库" name="2" v-if="tabList.includes('2')">
<list v-if="activeName == '2'" />
<list v-if="activeName == '2'" ref="listRef" />
</el-tab-pane>
</el-tabs>
</div>
@@ -27,6 +27,7 @@ defineOptions({
const activeName = ref('1')
const id = ref('')
const key = ref('')
const listRef = ref()
const tabList = ref(['1', '2'])
onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1)
@@ -36,7 +37,12 @@ onMounted(() => {
activeName.value = key
}
})
const algorithm = (val: any) => {
activeName.value = '2'
setTimeout(() => {
listRef.value.getList(val)
}, 100)
}
const layout = mainHeight(63) as any
</script>