diff --git a/src/views/finance/purchasingrequisition/add.vue b/src/views/finance/purchasingrequisition/add.vue index ccba3e2..c28293d 100644 --- a/src/views/finance/purchasingrequisition/add.vue +++ b/src/views/finance/purchasingrequisition/add.vue @@ -1333,9 +1333,20 @@ watch(() => categoryTreeData.value, () => { // 初始化 onMounted(async () => { - // 检测是否在 iframe 中,如果是,则修改 #app 的 overflow 样式以支持滚动 + // 检测是否在 iframe 中,如果是,则修改相关元素的 overflow 样式以支持滚动 if (window.parent !== window) { nextTick(() => { + // 修改 html 和 body + document.documentElement.style.overflow = 'auto'; + document.documentElement.style.height = 'auto'; + document.body.style.overflow = 'auto'; + document.body.style.height = 'auto'; + + // 修改 html 和 body,添加类名 + document.documentElement.classList.add('iframe-mode'); + document.body.classList.add('iframe-mode'); + + // 修改 #app const app = document.getElementById('app'); if (app) { app.style.overflow = 'auto'; @@ -1397,11 +1408,25 @@ onMounted(async () => {