Skip to content

Commit

Permalink
[feat]fix auto merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Of-qinhai committed Jan 15, 2025
2 parents c2f5125 + e5df4a4 commit 2ce11b9
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 48 deletions.
61 changes: 28 additions & 33 deletions src/components/community/modules/BaseModelGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import { debounce } from 'lodash-es'
import type { VirtualListInst } from 'naive-ui'
defineOptions({
name: 'BaseModelGrid'
})
Expand Down Expand Up @@ -79,7 +78,7 @@
const handleScroll = (e: Event) => {
const target = e.target as HTMLElement
const scrollTop = target.scrollTop
scrollState.value.showBackToTop = scrollTop > 500
const scrollBottom = scrollTop + target.clientHeight
Expand All @@ -93,8 +92,6 @@
emit('scroll', e)
}
const windowWidth = ref(window.innerWidth)
const handleWindowResize = debounce(() => {
Expand All @@ -103,7 +100,7 @@
onMounted(() => {
const observer = new IntersectionObserver(
(entries) => {
entries => {
if (entries[0].isIntersecting) {
emit('loadMore')
}
Expand Down Expand Up @@ -156,8 +153,8 @@
if (width >= 1890) return 340 // 7列
if (width >= 1650) return 320 // 6列
if (width >= 1440) return 300 // 5列
if (width >= 992) return 280 // 4列
if (width >= 768) return 260 // 3列
if (width >= 992) return 280 // 4列
if (width >= 768) return 260 // 3列
return 240 // 2列
})
Expand All @@ -184,7 +181,6 @@
scrollState.value.showBackToTop = false
}
)
</script>

<template>
Expand Down Expand Up @@ -303,35 +299,34 @@
}
}
.grid-container {
position: relative;
height: auto;
display: flex;
flex-direction: column;
width: 100%;
margin: 0 auto;
max-width: 2000px;
padding-bottom: 100px;
padding-right: 6px;
flex: 1;
}
.grid-container {
position: relative;
height: auto;
display: flex;
flex-direction: column;
width: 100%;
margin: 0 auto;
max-width: 2000px;
padding-bottom: 100px;
padding-right: 6px;
flex: 1;
}
:deep(.n-virtual-list::-webkit-scrollbar) {
width: 6px;
position: absolute;
right: 0;
}
:deep(.n-virtual-list::-webkit-scrollbar) {
width: 6px;
position: absolute;
right: 0;
}
:deep(.n-virtual-list::-webkit-scrollbar-track) {
background: transparent;
}
:deep(.n-virtual-list::-webkit-scrollbar-track) {
background: transparent;
}
:deep(.n-virtual-list::-webkit-scrollbar-thumb) {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
:deep(.n-virtual-list::-webkit-scrollbar-thumb) {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
:deep(.n-virtual-list::-webkit-scrollbar-thumb:hover) {
background-color: rgba(255, 255, 255, 0.5);
Expand Down
16 changes: 7 additions & 9 deletions src/views/btnPublish/dialogModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,22 +279,20 @@
acActiveIndex.value = i
break
}
if (e.cover_urls && !e.imageDone) {
e.imageError = true
useToaster.error(`Please wait until the image is uploaded for version ${i + 1}`)
acActiveIndex.value = i
break
}
// if (e.cover_urls && !e.imageDone) {
// e.imageError = true
// useToaster.error(`Please wait until the image is uploaded for version ${i + 1}`)
// acActiveIndex.value = i
// break
// }
if (!e.sign) {
e.filePathError = true
useToaster.error(`Please enter the file path for version ${i + 1}`)
acActiveIndex.value = i
break
}
}
return tempData.versions.every(
(e: any) => e.version && e.base_model && e.sign && !(e.cover_urls && !e.imageDone)
)
return tempData.versions.every((e: any) => e.version && e.base_model && e.sign)
}
const fnProgress = (p: number, i: number) => {
formData.value.versions[i].progress = p
Expand Down
12 changes: 6 additions & 6 deletions src/views/btnPublish/dialogWorkflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@
acActiveIndex.value = i
break
}
if (e.cover_urls && !e.imageDone) {
e.imageError = true
useToaster.error(`Please wait until the image is uploaded for version ${i + 1}`)
acActiveIndex.value = i
break
}
// if (e.cover_urls && !e.imageDone) {
// e.imageError = true
// useToaster.error(`Please wait until the image is uploaded for version ${i + 1}`)
// acActiveIndex.value = i
// break
// }
if (!e.sign) {
e.filePathError = true
useToaster.error(`Please enter the file path for version ${i + 1}`)
Expand Down

0 comments on commit 2ce11b9

Please sign in to comment.