fix(short-drama-agent-front): 统一全屏布局与问题处理交互
This commit is contained in:
1 parent
db91a4b871
commit
cc27d463e0
25 files changed
+838
-316
No files matched your search
@@ -1,11 +1,14 @@
|
||||
import { DOMWrapper, flushPromises, type VueWrapper } from '@vue/test-utils'
|
||||
import { NSelect } from 'naive-ui'
|
||||
|
||||
/** 工作区工具弹窗通过真实 Teleport 挂到 body,测试从外层读取,不禁用 Teleport 掩盖挂载问题。 */
|
||||
/**
|
||||
* 从真实 Teleport 内容读取工作区工具容器,兼容宽弹窗和全屏抽屉。
|
||||
* @returns 已打开的工具容器包装器
|
||||
*/
|
||||
export function drawerPanel() {
|
||||
const body = document.querySelector<HTMLElement>('.workspace-tools-body')
|
||||
const modal = body?.closest<HTMLElement>('.app-dialog')
|
||||
if (!modal) throw new Error('工作区工具弹窗未打开')
|
||||
const modal = body?.closest<HTMLElement>('.app-dialog, .app-drawer')
|
||||
if (!modal) throw new Error('工作区工具容器未打开')
|
||||
return new DOMWrapper(modal)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user