提交 3ca30f3c 编写于 作者: D DebugIsFalse

Update Create.vue

上级 e41e30d3
...@@ -70,15 +70,17 @@ const handleSearch = async () => { ...@@ -70,15 +70,17 @@ const handleSearch = async () => {
} }
onMounted(async () => { onMounted(async () => {
if (!$repos.length) { if (!$repos.length) {
let repoData = await useRequest('/v1/chat/repository', {}) const { data } = await useRequest('/v1/chat/repository', {})
repoData = repoData.data.map(item => { if ( data.value && data.value.data) {
return { const repoData = data.value && 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)
}
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册