瀏覽代碼

fix(ChildPageDisplay): 仅在工具存在url时渲染iframe

避免在工具无有效url时渲染无效iframe,防止出现空加载或错误页面
lsc 5 天之前
父節點
當前提交
5f0d07cb8c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/views/Editor/Canvas/ChildPageDisplay.vue

+ 1 - 1
src/views/Editor/Canvas/ChildPageDisplay.vue

@@ -22,7 +22,7 @@
       <div class="question-area">
       <div class="question-area">
         <template v-for="(tool, index) in toolsArray" :key="tool.tool_id">
         <template v-for="(tool, index) in toolsArray" :key="tool.tool_id">
           <iframe
           <iframe
-          v-if="index === selectedToolIndex"
+          v-if="index === selectedToolIndex && tool.url"
           :src="tool.url + '&isSet=2' + '&timestamp=' + new Date().getTime()"
           :src="tool.url + '&isSet=2' + '&timestamp=' + new Date().getTime()"
           frameborder="0"></iframe>
           frameborder="0"></iframe>
         </template>
         </template>