fix(mobile): 待审批时自动弹出并审批后收回面板
This commit is contained in:
parent
eba36c46da
commit
e3bf67d25d
@ -824,6 +824,9 @@ export const taskPollingMethods = {
|
||||
if (this.rightWidth < this.minPanelWidth) {
|
||||
this.rightWidth = this.minPanelWidth;
|
||||
}
|
||||
if (this.isMobileViewport && this.activeMobileOverlay !== 'approval') {
|
||||
this.openMobileOverlay('approval');
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
@ -837,6 +840,9 @@ export const taskPollingMethods = {
|
||||
);
|
||||
if (!this.pendingToolApprovals.length) {
|
||||
this.rightCollapsed = true;
|
||||
if (this.isMobileViewport && this.activeMobileOverlay === 'approval') {
|
||||
this.closeMobileOverlay();
|
||||
}
|
||||
}
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
@ -689,6 +689,9 @@ export const uiMethods = {
|
||||
async fetchPendingToolApprovals() {
|
||||
if (!this.currentConversationId) {
|
||||
this.pendingToolApprovals = [];
|
||||
if (this.isMobileViewport && this.activeMobileOverlay === 'approval') {
|
||||
this.closeMobileOverlay();
|
||||
}
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@ -706,6 +709,11 @@ export const uiMethods = {
|
||||
if (this.rightWidth < this.minPanelWidth) {
|
||||
this.rightWidth = this.minPanelWidth;
|
||||
}
|
||||
if (this.isMobileViewport && this.activeMobileOverlay !== 'approval') {
|
||||
this.openMobileOverlay('approval');
|
||||
}
|
||||
} else if (this.isMobileViewport && this.activeMobileOverlay === 'approval') {
|
||||
this.closeMobileOverlay();
|
||||
}
|
||||
} catch (_error) {
|
||||
// ignore
|
||||
@ -740,6 +748,9 @@ export const uiMethods = {
|
||||
);
|
||||
if (!this.pendingToolApprovals.length) {
|
||||
this.rightCollapsed = true;
|
||||
if (this.isMobileViewport && this.activeMobileOverlay === 'approval') {
|
||||
this.closeMobileOverlay();
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
const msg = error instanceof Error ? error.message : String(error || '审批失败');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user