@lambo-design/upload-file 1.0.0-beta.17 → 1.0.0-beta.18
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/CHANGELOG.md +7 -0
- package/package.json +3 -3
- package/src/index.vue +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [1.0.0-beta.18](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/upload-file@1.0.0-beta.17...@lambo-design/upload-file@1.0.0-beta.18) (2024-06-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ✨ Features | 新功能
|
|
6
|
+
|
|
7
|
+
* **upload-file:** 限制文件上传数量limitFileNum属性优化 ([cc5f7e1](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/cc5f7e1848e2eabde43087d822d6769cd70fe53b))
|
|
8
|
+
|
|
2
9
|
## [1.0.0-beta.17](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/upload-file@1.0.0-beta.16...@lambo-design/upload-file@1.0.0-beta.17) (2024-06-04)
|
|
3
10
|
|
|
4
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/upload-file",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"axios": "^0.24.0",
|
|
14
14
|
"axios-cache-plugin": "^0.1.0",
|
|
15
|
-
"@lambo-design/
|
|
16
|
-
"@lambo-design/
|
|
15
|
+
"@lambo-design/core": "^4.7.1-beta.139",
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.183"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"release": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
|
package/src/index.vue
CHANGED
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
},
|
|
160
160
|
methods: {
|
|
161
161
|
UploadFile: function () {
|
|
162
|
-
if (this.limitFileNum !== 0 && this.resultList.length
|
|
162
|
+
if (this.limitFileNum !== 0 && this.resultList.length >= this.limitFileNum) {
|
|
163
163
|
alert('最多只能上传' + this.limitFileNum + '个文件');
|
|
164
164
|
} else {
|
|
165
165
|
this.$refs.uploadInput.click();
|
|
@@ -203,7 +203,7 @@ export default {
|
|
|
203
203
|
let resultList = [];
|
|
204
204
|
const uploadUrl = self.ossServerContext + self.ossFilePutUrl;
|
|
205
205
|
const downloadUrl = self.ossServerContext + self.ossFileGetUrl;
|
|
206
|
-
ajax.post(uploadUrl, formData, {
|
|
206
|
+
ajax.post(uploadUrl, formData, {payload: true}).then(response => {
|
|
207
207
|
if (response.data.code === 1) {
|
|
208
208
|
const result = response.data.data;
|
|
209
209
|
self.loading = false;
|