askbot-dragon 1.3.47 → 1.3.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -156,12 +156,22 @@ export default {
|
|
|
156
156
|
// a.href = res.data
|
|
157
157
|
// a.download = (this.title) + fileType
|
|
158
158
|
// a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
159
|
-
this.close()
|
|
160
159
|
Toast('请稍后...');
|
|
161
160
|
// setTimeout(() =>{
|
|
162
161
|
// window.open(res.data,'下载', 'noopener')
|
|
163
162
|
// }, 2000)
|
|
164
|
-
window.open(res.data,'下载', 'noopener')
|
|
163
|
+
// window.open(res.data,'下载', 'noopener')
|
|
164
|
+
const iframe = document.createElement("iframe");
|
|
165
|
+
iframe.setAttribute("hidden", "hidden");
|
|
166
|
+
iframe.onload = () => {
|
|
167
|
+
if (iframe) {
|
|
168
|
+
console.log("iframe onload....")
|
|
169
|
+
iframe.setAttribute('src', 'about:blank');
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
document.body.insertBefore(iframe, null);
|
|
173
|
+
iframe.setAttribute("src", res.data);
|
|
174
|
+
this.close()
|
|
165
175
|
}
|
|
166
176
|
}
|
|
167
177
|
})
|