app添加工作经历开发

This commit is contained in:
冯辉
2025-10-13 16:01:49 +08:00
parent 3d7cb0c561
commit 3d2c26650c
12 changed files with 840 additions and 74 deletions

View File

@@ -107,7 +107,7 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
return await baseDB.db.add(massageName.value, payload);
}
async function getStearm(text, fileUrls = [], progress) {
async function getStearm(text, fileUrls = [], progress, options = {}) {
return new Promise((resolve, reject) => {
try {
@@ -163,6 +163,11 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
...newMsg
};
progress && progress();
// 调用外部传入的onDataReceived回调
if (options.onDataReceived) {
options.onDataReceived(data, newMsg, index);
}
}
function onError(error) {
@@ -177,6 +182,10 @@ const useChatGroupDBStore = defineStore("messageGroup", () => {
toggleTyping(false);
window.removeEventListener("unload", handleUnload);
handleUnload();
// 调用外部传入的onComplete回调
if (options.onComplete) {
options.onComplete();
}
resolve();
}