提交 df1a0023 编写于 作者: D DebugIsFalse

fix: 修改体验

上级 1e7995b0
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
{{ state.repo }} {{ state.repo }}
</section> </section>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2" v-if="initLoading">
<USkeleton class="h-4" /> <USkeleton class="h-4" />
<USkeleton class="h-4" /> <USkeleton class="h-4" />
<USkeleton class="h-4 w-2/3" /> <USkeleton class="h-4 w-2/3" />
...@@ -54,9 +54,9 @@ ...@@ -54,9 +54,9 @@
/> />
</div> </div>
</template> </template>
<template #item="{ item }"> <template #item>
<div class="text-base">改写问题</div> <div class="text-base">改写问题</div>
<MdRenderer class="prose prose-sm" :content="item.description" /> <MdRenderer :content="item.description" />
</template> </template>
</UAccordion> </UAccordion>
</UCard> </UCard>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<UCard :ui="{ body: { padding: 'sm:p-3 p-3' } }"> <UCard :ui="{ body: { padding: 'sm:p-3 p-3' } }">
<div class="flex flex-col space-y-1"> <div class="flex flex-col space-y-1">
<div class="justify-between flex space-x-1"> <div class="justify-between flex space-x-1">
<span class="truncate">{{ source.repo }}</span> <span class="truncate"><UIcon class="mr-1" name="i-simple-icons-github" />{{ source.repo }}</span>
<span class="text-gray-200">{{ sourceIndex + 1 }}</span> <span class="text-gray-200">{{ sourceIndex + 1 }}</span>
</div> </div>
<div class="text-blue-500 truncate">{{ source.label }}</div> <div class="text-blue-500 truncate">{{ source.label }}</div>
...@@ -144,6 +144,7 @@ const toast = useToast() ...@@ -144,6 +144,7 @@ const toast = useToast()
const route = useRoute() const route = useRoute()
const { fetchRequest } = useFetchRequest() const { fetchRequest } = useFetchRequest()
const repos = getMockRepo(); const repos = getMockRepo();
const initLoading = ref(true);
// todo mock // todo mock
const repoItem = repos.find(item => route.query.repo === item.label); const repoItem = repos.find(item => route.query.repo === item.label);
const state = reactive({ const state = reactive({
...@@ -249,7 +250,11 @@ const handleUpdateSource = () => { ...@@ -249,7 +250,11 @@ const handleUpdateSource = () => {
}) })
Object.assign(data.value[index], { source: storeSource }); Object.assign(data.value[index], { source: storeSource });
} }
const handleHideInitLoading = () => {
initLoading.value = false;
}
const handleMessage = (event) => { const handleMessage = (event) => {
if (initLoading.value) handleHideInitLoading();
if (event.data === markedEnd) { if (event.data === markedEnd) {
asking.value = false; asking.value = false;
handleUpdateSource(); handleUpdateSource();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册