aaa
This commit is contained in:
@@ -642,7 +642,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="PurchasingRequisitionAdd">
|
||||
import { reactive, ref, onMounted, computed, watch } from 'vue'
|
||||
import { reactive, ref, onMounted, computed, watch, nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { addObj, tempStore } from '/@/api/finance/purchasingrequisition';
|
||||
import { getTree } from '/@/api/finance/purchasingcategory';
|
||||
@@ -1333,6 +1333,20 @@ watch(() => categoryTreeData.value, () => {
|
||||
|
||||
// 初始化
|
||||
onMounted(async () => {
|
||||
// 检测是否在 iframe 中,如果是,则修改 #app 的 overflow 样式以支持滚动
|
||||
if (window.parent !== window) {
|
||||
nextTick(() => {
|
||||
const app = document.getElementById('app');
|
||||
if (app) {
|
||||
app.style.overflow = 'auto';
|
||||
app.style.height = 'auto';
|
||||
app.style.minHeight = '100%';
|
||||
// 添加一个类名标记,方便样式控制
|
||||
app.classList.add('iframe-mode');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
getCategoryTreeData(),
|
||||
getFundSourceDict(),
|
||||
@@ -1382,3 +1396,12 @@ onMounted(async () => {
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 当页面在 iframe 中时,允许 #app 滚动 */
|
||||
#app.iframe-mode {
|
||||
overflow: auto !important;
|
||||
height: auto !important;
|
||||
min-height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user