Browse Source

[edit][修复中断弹框问题]

zhangwei 2 years ago
parent
commit
bf1124cfaa
1 changed files with 17 additions and 11 deletions
  1. 17 11
      src/view/content/tool_box/index.vue

+ 17 - 11
src/view/content/tool_box/index.vue

@@ -107,13 +107,13 @@ const clickHead = () => {
 const clickContinue = () => {
     if (state.checkbox) {
         setChromeStorage({ fullCheck: JSON.stringify({ fullCheck: 1 }) })
-        // 全屏
-        if (state.handle_type == '全屏') {
-            handleFull()
-        } else {
-            handleFixed()
-        }
     }
+    if (state.handle_type == '全屏') {
+        handleFull()
+    } else {
+        handleFixed()
+    }
+    state.show_alert = false
 }
 onMounted(() => {
     if (props.pre_view) {
@@ -152,9 +152,9 @@ const getDetail = () => {
             iframe.onload = function () {
                 state.status = ''
             }
-            setTimeout(()=>{
+            setTimeout(() => {
                 state.iframe_url = state.detail.originUrl
-            },1000)
+            }, 1000)
         } else {
             let iframe = dom_iframe.value
             state.detail.originUrl = 'https://www.bilibili.com'
@@ -164,10 +164,10 @@ const getDetail = () => {
             iframe.onload = function () {
                 state.status = ''
             }
-            setTimeout(()=>{
+            setTimeout(() => {
                 state.iframe_url = state.detail.originUrl
-            },1000)
-            
+            }, 1000)
+
         }
     })
 }
@@ -223,6 +223,12 @@ const handleFixed = () => {
     // 操作全屏dom
     let dom = document.querySelector('#denet-tool-box-fixed')
     dom.style.display = 'block'
+    dom.style.cssText = `
+        width: 505px;
+        height: 544px;
+        position: fixed;
+        right: 10px;
+        top: 10px;`
     state.show_btn = false
     sendEventInfo({
         event_type: 'ToolBox_To_Fixed',