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

add

上级 69138d41
<template> <template>
<div> <div class="flex h-full justify-center max-w-full">
Search <div class="max-w-screen-sm w-full flex flex-col space-y-4">
<h1 class="whitespace-pre-line break-words [word-break:break-word] default font-display text-3xl font-regular text-textMain dark:text-textMainDark selection:bg-super/50 selection:text-textMain dark:selection:bg-superDuper/10 dark:selection:text-superDark"
>{{ state.query }}</h1>
<section>{{ state.repo }}</section>
<UProgress :value="currentStep" :max="steps" :color="stepColor" indicator>
<template #step-1="{ step }">
<span class="text-blue-500 items-center justify-end flex space-x-1">
<UIcon name="i-heroicons-document-chart-bar-20-solid" class="text-base" />
<span>{{ step }}</span>
</span>
</template>
<template #step-2="{ step }">
<span class="text-blue-500 items-center justify-end flex space-x-1">
<UIcon name="i-heroicons-code-bracket-square-20-solid" class="text-base" />
<span>{{ step }}</span>
</span>
</template>
<template #step-3="{ step }">
<span class="text-blue-500 items-center justify-end flex space-x-1">
<UIcon name="i-heroicons-document-20-solid" class="text-base" />
<span>{{ step }}</span>
</span>
</template>
<template #step-4="{ step }">
<span class="text-green-500 items-center justify-end flex space-x-1">
<UIcon name="i-heroicons-document-check-20-solid" class="text-base" />
<span>{{ step }}</span>
</span>
</template>
</UProgress>
</div>
</div> </div>
</template> </template>
<script setup> <script setup>
defineOptions({ const route = useRoute()
name: 'page-search`' const state = reactive({
}); query: route.query.query || '',
repo: route.query.repo || ''
})
const currentStep = ref(1)
const steps = ['', '问题分析', '代码搜索', '整理答案', '完成!']
const stepColor = computed(() => {
switch (true) {
case currentStep.value >= steps.length - 1: return 'green'
default: return 'blue'
}
})
</script> </script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册