askbot-dragon 1.3.37 → 1.3.38

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.3.37",
3
+ "version": "1.3.38",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -137,11 +137,18 @@ export default {
137
137
  }
138
138
  return
139
139
  } else {
140
- let a = document.createElement('a')
141
- a.href = res.data
142
- a.download = (this.title) + fileType
143
- a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
144
- this.close()
140
+ // let a = document.createElement('a')
141
+ // a.href = res.data
142
+ // a.download = (this.title) + fileType
143
+ // a.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true, view: window }))
144
+
145
+ let oA = document.createElement('a');
146
+ oA.download = (this.title) + fileType; // 设置下载的文件名
147
+ oA.href = res.data;
148
+ document.body.appendChild(oA);
149
+ oA.click();
150
+ oA.remove();
151
+ // this.close()
145
152
  }
146
153
  }
147
154
  })