|
|
@@ -20,10 +20,12 @@
|
|
|
|
|
|
<div class="child-page-body" v-if="toolsJson?.url === toolsArray[selectedToolIndex]?.url">
|
|
|
<div class="question-area">
|
|
|
- <iframe
|
|
|
- ref="iframeRef"
|
|
|
- :src="toolsJson?.url + '&isSet=2' + '×tamp=' + new Date().getTime()"
|
|
|
+ <template v-for="(tool, index) in toolsArray" :key="tool.tool_id">
|
|
|
+ <iframe
|
|
|
+ v-if="index === selectedToolIndex"
|
|
|
+ :src="tool.url + '&isSet=2' + '×tamp=' + new Date().getTime()"
|
|
|
frameborder="0"></iframe>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
|
|
|
<div class="side-panel" v-if="!toolsJson.isSet">
|
|
|
@@ -55,7 +57,6 @@ const toolsArray = childPageToolsArray.value
|
|
|
const selectedToolIndex = ref(0)
|
|
|
const agentid2 = ref('f86aa63c-b7b7-4d03-9b37-b59f116d36f3')// 生成内容
|
|
|
const loading = ref(true)
|
|
|
-const iframeRef = ref<HTMLIFrameElement>()
|
|
|
|
|
|
|
|
|
const toolsJson = computed(() => {
|
|
|
@@ -68,9 +69,6 @@ const formatHint = (str: string, count: number) => {
|
|
|
|
|
|
const selectTool = (index: number) => {
|
|
|
selectedToolIndex.value = index
|
|
|
- if (iframeRef.value) {
|
|
|
- iframeRef.value.contentWindow?.location.reload()
|
|
|
- }
|
|
|
console.log('👶 选中工具:', toolsArray[index])
|
|
|
}
|
|
|
|