app添加工作经历开发
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user