refactor: 重新启用返回按钮功能,确保在场景监控和场景编辑页面中可以返回到父级 iframe 的场景卡片
This commit is contained in:
parent
5c5d04197e
commit
74cbcc6227
@ -350,9 +350,9 @@ const contextMenuState = ref<ContextMenuState>(contextMenuManager.getState());
|
||||
//#endregion
|
||||
|
||||
// 返回到父级 iframe 的场景卡片
|
||||
// const backToCards = () => {
|
||||
// window.parent?.postMessage({ type: 'scene_return_to_cards' }, '*');
|
||||
// };
|
||||
const backToCards = () => {
|
||||
window.parent?.postMessage({ type: 'scene_return_to_cards' }, '*');
|
||||
};
|
||||
|
||||
//#region 右键菜单处理
|
||||
/**
|
||||
@ -418,7 +418,7 @@ const handleGlobalKeydown = (event: KeyboardEvent) => {
|
||||
<a-flex justify="space-between" align="center">
|
||||
<a-typography-text class="title">{{ title }}--{{ isMonitorMode ? '场景监控' : '场景仿真' }}</a-typography-text>
|
||||
<a-space align="center">
|
||||
<!-- <a-button @click="backToCards"> 返回 </a-button> -->
|
||||
<a-button @click="backToCards"> 返回 </a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSaveViewState"> 保存比例 </a-button>
|
||||
</a-space>
|
||||
</a-flex>
|
||||
|
@ -179,10 +179,10 @@ const handleAutoSaveAndRestoreViewState = async () => {
|
||||
|
||||
await autoSaveAndRestoreViewState(editor.value, props.id);
|
||||
};
|
||||
// // 返回到父级 iframe 的场景卡片
|
||||
// const backToCards = () => {
|
||||
// window.parent?.postMessage({ type: 'scene_return_to_cards' }, '*');
|
||||
// };
|
||||
// 返回到父级 iframe 的场景卡片
|
||||
const backToCards = () => {
|
||||
window.parent?.postMessage({ type: 'scene_return_to_cards' }, '*');
|
||||
};
|
||||
|
||||
// 处理自动生成库位确认
|
||||
const handleAutoCreateStorageConfirm = (actionPoints: any[]) => {
|
||||
@ -204,7 +204,7 @@ const handleAutoCreateStorageCancel = () => {
|
||||
<a-flex justify="space-between" align="center">
|
||||
<a-typography-text class="title">{{ title }} --场景编辑</a-typography-text>
|
||||
<a-space align="center">
|
||||
<!-- <a-button @click="backToCards"> 返回 </a-button> -->
|
||||
<a-button @click="backToCards"> 返回 </a-button>
|
||||
<a-button type="primary" :loading="isSaving" @click="handleSaveViewState"> 保存比例 </a-button>
|
||||
<a-button v-if="editable" class="warning" @click="editable = false">
|
||||
<i class="icon exit size-18 mr-8" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user