|
@@ -169,7 +169,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { nextTick, onMounted, provide, ref,watchEffect,watch } from "vue";
|
|
|
+import { nextTick, onMounted, provide, ref,watchEffect,watch } from "vue";
|
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
|
import useAppStore from "@/store/modules/app";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
@@ -328,6 +328,17 @@ function toggleSideBar() {
|
|
|
const logingName = ref("");
|
|
|
onMounted(() => {
|
|
|
logingName.value = Cookies.get("username");
|
|
|
+ // console.log('onMt',editableTabsValue.value);
|
|
|
+ // console.log('type',typeof editableTabsValue.value);
|
|
|
+
|
|
|
+ nextTick(()=>{ // 要放在对响应式数据修改之后
|
|
|
+ if(typeof editableTabsValue.value == 'number'){
|
|
|
+ setTimeout(() => {
|
|
|
+ iframeSize(editableTabsValue.value)
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
// console.log('router',router)
|
|
|
});
|
|
@@ -625,7 +636,10 @@ const addFileTab = (data) => {
|
|
|
if (par.id == thisPane.id) {
|
|
|
par.show = true
|
|
|
editableTabsValue.value = par.id// 标签跳转
|
|
|
- // iframeSize(par.id)
|
|
|
+ setTimeout(() => {
|
|
|
+
|
|
|
+ iframeSize(par.id)
|
|
|
+ }, 1000);
|
|
|
}else{
|
|
|
par.show = false
|
|
|
}
|
|
@@ -645,7 +659,10 @@ const addFileTab = (data) => {
|
|
|
par.show = true
|
|
|
thisData.docId = "";
|
|
|
editableTabsValue.value = par.id// 新建时标签跳转
|
|
|
- // iframeSize(par.id)
|
|
|
+ setTimeout(() => {
|
|
|
+
|
|
|
+ iframeSize(par.id)
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
}else{
|
|
|
par.show = false
|
|
@@ -770,7 +787,6 @@ const iframeSize = (id)=>{
|
|
|
const outIframe = document.getElementById("iframe" + id);
|
|
|
const inIframe =
|
|
|
outIframe.contentDocument.getElementsByTagName("iframe")[0];
|
|
|
- setTimeout(() => {
|
|
|
console.log('outIframe',outIframe.parentElement);
|
|
|
console.error(outIframe.parentElement);
|
|
|
inIframe.style.height = outIframe.style.height =
|
|
@@ -780,7 +796,6 @@ const iframeSize = (id)=>{
|
|
|
|
|
|
// console.log('dom',outIframe.parentElement.offsetWidth);
|
|
|
// console.log('inIframe',inIframe);
|
|
|
- }, 500);
|
|
|
}
|
|
|
// 监听和保存标签信息
|
|
|
const setTabLocal = (data)=>{
|