@@ -115,16 +115,17 @@ const bgProgress = computed(() =>
115115)
116116const detailProgress = computed (() => {
117117 if (! props .fileSize ) return []
118- const t = props .readProgress .flatMap ((progress , i , arr ) =>
119- progress
120- .map (p => ({
118+ const t = props .readProgress
119+ .filter (e => e .length )
120+ .flatMap ((progress , i , arr ) =>
121+ progress .map (p => ({
121122 width: ((p [1 ] - p [0 ]) / props .fileSize ) * 100 ,
122123 left: (p [0 ] / props .fileSize ) * 100 ,
123124 top: isShow .value ? i * 12 : 0 ,
124125 background: oklchToRgb (0.8 , 0.18 , lerp (0 , 360 , i / arr .length )),
125- }))
126- . filter ( e => e . width >= 1 ),
127- )
126+ })),
127+ )
128+ . filter ( e => e . width >= 1 )
128129 t .sort ((a , b ) => a .left - b .left )
129130 return t .map (e => ({
130131 width: e .width + ' %' ,
@@ -221,13 +222,15 @@ async function clickHandler(event: MouseEvent) {
221222 border-radius : 6px ;
222223}
223224.details > div :first-child {
224- border-radius : 6px 0 0 6px ;
225+ border-top-left-radius : 6px ;
226+ border-bottom-left-radius : 6px ;
225227}
226228.details.open > div :first-child {
227229 border-radius : 6px ;
228230}
229231.details > div :last-child {
230- border-radius : 0 6px 6px 0 ;
232+ border-top-right-radius : 6px ;
233+ border-bottom-right-radius : 6px ;
231234}
232235.details.open > div :last-child {
233236 border-radius : 6px ;
0 commit comments