提交 ac92eae5 编写于 作者: D DebugIsFalse

Update Create.vue

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