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

Update Create.vue

上级 94ef6534
...@@ -54,22 +54,23 @@ const handleSearch = async () => { ...@@ -54,22 +54,23 @@ const handleSearch = async () => {
}) })
} }
} }
onMounted(async () => {
if (!$repos.length) { if (!$repos.length) {
let repoData = await fetchRequest('/v1/chat/repository', { let repoData = await fetchRequest('/v1/chat/repository', {
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
} }
}) })
repoData = repoData.data.map(item => { repoData = repoData.data.map(item => {
return { return {
label: item.name, label: item.name,
url: item.path, url: item.path,
branch: item.branch 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.
先完成此消息的编辑!
想要评论请 注册