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>
|
||||
<XpackComponent ref="openHandler" jsname="L2NvbXBvbmVudC9lbWJlZGRlZC1pZnJhbWUvT3BlbkhhbmRsZXI=" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -426,16 +427,28 @@ const apply = () => {
|
||||
templateData.type === 'dataV'
|
||||
? '#/dvCanvas?opt=create&createType=template'
|
||||
: '#/dashboard?opt=create&createType=template'
|
||||
let newWindow = null
|
||||
if (state.pid) {
|
||||
window.open(baseUrl + `&pid=${state.pid}`, '_blank')
|
||||
newWindow = window.open(baseUrl + `&pid=${state.pid}`, '_blank')
|
||||
} else {
|
||||
window.open(baseUrl, '_blank')
|
||||
newWindow = window.open(baseUrl, '_blank')
|
||||
}
|
||||
initOpenHandler(newWindow)
|
||||
})
|
||||
.catch(() => {
|
||||
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 = () => {
|
||||
let tempHasResult = false
|
||||
|
Loading…
Reference in New Issue
Block a user