提交 8d885b7c 编写于 作者: View Design's avatar View Design

Update Create.vue

上级 b0c4b27c
...@@ -70,17 +70,19 @@ const handleSearch = async () => { ...@@ -70,17 +70,19 @@ const handleSearch = async () => {
$getSearchHistory() $getSearchHistory()
}) })
} }
if (!$repos.value.length) { nextTick(async () => {
const { data } = await useRequest('/v1/chat/repository') if (!$repos.value.length) {
const repoData = data.value.data.map(item => { const { data } = await useRequest('/v1/chat/repository')
return { const repoData = data.value.data.map(item => {
label: item.name, return {
url: item.path, label: item.name,
branch: item.branch url: item.path,
} branch: item.branch
}) }
$setRepo(repoData) })
} $setRepo(repoData)
}
})
defineShortcuts({ defineShortcuts({
meta_enter: { meta_enter: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册