askbot-dragon 1.3.48 → 1.3.50
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 +1 -1
- package/src/components/previewDoc.vue +17 -15
package/package.json
CHANGED
|
@@ -152,25 +152,27 @@ export default {
|
|
|
152
152
|
}
|
|
153
153
|
return
|
|
154
154
|
} else {
|
|
155
|
-
// let a = document.createElement('a')
|
|
156
|
-
// a.href = res.data
|
|
157
|
-
// a.download = (this.title) + fileType
|
|
158
|
-
// a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
159
|
-
Toast('请稍后...');
|
|
160
155
|
// setTimeout(() =>{
|
|
161
156
|
// window.open(res.data,'下载', 'noopener')
|
|
162
157
|
// }, 2000)
|
|
163
158
|
// window.open(res.data,'下载', 'noopener')
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
if(isMobile()) {
|
|
160
|
+
const iframe = document.createElement("iframe");
|
|
161
|
+
iframe.setAttribute("hidden", "hidden");
|
|
162
|
+
iframe.onload = () => {
|
|
163
|
+
if (iframe) {
|
|
164
|
+
console.log("iframe onload....")
|
|
165
|
+
iframe.setAttribute('src', 'about:blank');
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
document.body.insertBefore(iframe, null);
|
|
169
|
+
iframe.setAttribute("src", res.data);
|
|
170
|
+
} else {
|
|
171
|
+
let a = document.createElement('a')
|
|
172
|
+
a.href = res.data
|
|
173
|
+
a.download = (this.title) + fileType
|
|
174
|
+
a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
|
|
175
|
+
}
|
|
174
176
|
this.close()
|
|
175
177
|
}
|
|
176
178
|
}
|