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

Merge branch 'main' of gitcode.com:git_bot/ai-fe

......@@ -13,14 +13,9 @@ const useFetchRequest = (baseUrl) => {
fetchConfig['Content-Type'] = 'application/json';
}
fetchConfig = Object.assign(config, fetchConfig);
return window.fetch(url, fetchConfig).then(async (response) => {
let result = await response.text()
try {
result = JSON.parse(result)
} catch(error) {
console.log(error)
}
return result;
return $fetch(url, fetchConfig).then(async (response) => {
console.log(`response:`, response)
return response;
}).finally(() => {
loading.value = false
})
......
......@@ -24,8 +24,8 @@
</div>
</template>
<script setup>
const query = ref(null)
const selectedRepo = ref(null)
const query = ref('')
const selectedRepo = ref('https://github.com/keycloak/keycloak.git')
const repos = ['keycloak', 'ViewUIPlus']
const handleSearch = () => {
navigateTo(`/search/1?query=${query.value}&repo=${selectedRepo.value}`);
......
......@@ -58,9 +58,7 @@
<UIcon name="i-heroicons-chat-bubble-left-right-20-solid" />
<span>答案</span>
</div>
<article>
{{ item.article }}
</article>
<MdRenderer :content="item.article" />
<div class="space-x-2">
<UButton size="xs" color="gray" @click="handleCopyMD(index)" leading-icon="i-heroicons-document-duplicate-20-solid" label="复制" />
<UButton size="xs" color="gray" @click="handleShare(index + 1)" leading-icon="i-heroicons-share-20-solid" label="分享" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册