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