chore: images style

This commit is contained in:
jialin
2024-11-25 20:07:17 +08:00
parent 7fcd005f06
commit 5e0772fae9
12 changed files with 79 additions and 151 deletions
-3
View File
@@ -72,17 +72,14 @@ export const readStreamData = async (
callback: (data: any) => void
) => {
const { done, value } = await reader.read();
console.log('done====', done, value);
if (done) {
return;
}
let chunk = decoder.decode(value, { stream: true });
extractJSON(chunk).forEach((data) => {
console.log('data====', data);
callback?.(data);
});
// callback(chunk);
await readStreamData(reader, decoder, callback);
};