askbot-dragon 1.3.49 → 1.3.51
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
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
if (decodeURIComponent(url) != url) {
|
|
123
123
|
url = decodeURIComponent(url)
|
|
124
124
|
}
|
|
125
|
-
|
|
125
|
+
const fileType = url.substring(url.lastIndexOf('.'));
|
|
126
126
|
this.$http.post('/knowledge-api/temporary-certificate/or-origin?expired=10', url, {
|
|
127
127
|
headers:{
|
|
128
128
|
"Content-Type": "application/json",
|
|
@@ -165,14 +165,14 @@ export default {
|
|
|
165
165
|
iframe.setAttribute('src', 'about:blank');
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
+
document.body.insertBefore(iframe, null);
|
|
169
|
+
iframe.setAttribute("src", res.data);
|
|
168
170
|
} else {
|
|
169
171
|
let a = document.createElement('a')
|
|
170
172
|
a.href = res.data
|
|
171
173
|
a.download = (this.title) + fileType
|
|
172
174
|
a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
173
175
|
}
|
|
174
|
-
document.body.insertBefore(iframe, null);
|
|
175
|
-
iframe.setAttribute("src", res.data);
|
|
176
176
|
this.close()
|
|
177
177
|
}
|
|
178
178
|
}
|