forked from github/dataease
fix: iframe嵌入式使用模版新建错误
This commit is contained in:
parent
4066c3bcee
commit
88688f84f2
@ -157,6 +157,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -426,16 +427,28 @@ const apply = () => {
|
|||||||
templateData.type === 'dataV'
|
templateData.type === 'dataV'
|
||||||
? '#/dvCanvas?opt=create&createType=template'
|
? '#/dvCanvas?opt=create&createType=template'
|
||||||
: '#/dashboard?opt=create&createType=template'
|
: '#/dashboard?opt=create&createType=template'
|
||||||
|
let newWindow = null
|
||||||
if (state.pid) {
|
if (state.pid) {
|
||||||
window.open(baseUrl + `&pid=${state.pid}`, '_blank')
|
newWindow = window.open(baseUrl + `&pid=${state.pid}`, '_blank')
|
||||||
} else {
|
} else {
|
||||||
window.open(baseUrl, '_blank')
|
newWindow = window.open(baseUrl, '_blank')
|
||||||
}
|
}
|
||||||
|
initOpenHandler(newWindow)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
state.loading = false
|
state.loading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const openHandler = ref(null)
|
||||||
|
const initOpenHandler = newWindow => {
|
||||||
|
if (openHandler?.value) {
|
||||||
|
const pm = {
|
||||||
|
methodName: 'initOpenHandler',
|
||||||
|
args: newWindow
|
||||||
|
}
|
||||||
|
openHandler.value.invokeMethod(pm)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const initTemplateShow = () => {
|
const initTemplateShow = () => {
|
||||||
let tempHasResult = false
|
let tempHasResult = false
|
||||||
|
Loading…
Reference in New Issue
Block a user