提交 65e17244 编写于 作者: D DebugIsFalse

fix: 搜索不能使用空

上级 c321c8e1
......@@ -25,6 +25,7 @@
trailing-icon="i-heroicons-chevron-right-20-solid"
@click="handleSearch"
:loading="loading"
:disabled="query === ''"
>搜索</UButton>
</div>
</UCard>
......@@ -41,7 +42,7 @@ const repos = ref([
])
const loading = ref(false)
const handleSearch = async () => {
if (loading.value) return
if (loading.value || query.value === '') return
loading.value = true
const result = await fetchRequest('/v1/chat/completion/create', {
method: 'post',
......
......@@ -34,4 +34,9 @@ const handleRenderMd = () => {
watch( () => props.content, () => {
handleRenderMd()
}, { immediate: true })
</script>
\ No newline at end of file
</script>
<style>
.hljs {
background: transparent;
}
</style>
\ No newline at end of file
......@@ -182,6 +182,7 @@ const handleScroll = () => {
const scrollToView = () => {
if (!isAutoToBottom.value) return
const $target = document.querySelector('#scrollElement')
if (!$target) return;
const height = $target.clientHeight
y.value = height
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册