|
@@ -1898,7 +1898,7 @@ const handleHomeworkSubmit = async () => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
iframeBody = iframeElement.contentWindow.document.body as HTMLElement
|
|
iframeBody = iframeElement.contentWindow.document.body as HTMLElement
|
|
|
- iframehtml = iframeElement.contentWindow.document.getElementsByTagName("html")[0] as HTMLElement
|
|
|
|
|
|
|
+ iframehtml = iframeElement.contentWindow.document.getElementsByTagName('html')[0] as HTMLElement
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
message.error(lang.ssFailedGetIframeBody)
|
|
message.error(lang.ssFailedGetIframeBody)
|
|
@@ -1908,7 +1908,7 @@ const handleHomeworkSubmit = async () => {
|
|
|
try {
|
|
try {
|
|
|
const a = iframeBody.getElementsByTagName('img')
|
|
const a = iframeBody.getElementsByTagName('img')
|
|
|
const b = iframeBody.getElementsByTagName('video')
|
|
const b = iframeBody.getElementsByTagName('video')
|
|
|
- //const c = iframeBody.getElementsByTagName('canvas')
|
|
|
|
|
|
|
+ // const c = iframeBody.getElementsByTagName('canvas')
|
|
|
iframeBody.style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
iframeBody.style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
|
iframehtml.style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
iframehtml.style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
|
for (let i = 0;i < a.length;i++) {
|
|
for (let i = 0;i < a.length;i++) {
|
|
@@ -2096,8 +2096,8 @@ const handleHomeworkSubmit = async () => {
|
|
|
iframeElement.contentWindow.document &&
|
|
iframeElement.contentWindow.document &&
|
|
|
iframeElement.contentWindow.document.body
|
|
iframeElement.contentWindow.document.body
|
|
|
) {
|
|
) {
|
|
|
- iframeElement.contentWindow.document.body.style.width = '100vw'
|
|
|
|
|
- iframeElement.contentWindow.document.body.style.height = '100vh'
|
|
|
|
|
|
|
+ iframeElement.contentWindow.document.body.style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
|
|
|
+ iframeElement.contentWindow.document.getElementsByTagName('html')[0].style.cssText += 'width:100%;height:100%;position:absolute;top:0;left:0;'
|
|
|
try {
|
|
try {
|
|
|
isSubmitting.value = true
|
|
isSubmitting.value = true
|
|
|
|
|
|