@lambo-design/upload-file 1.0.0-beta.6 → 1.0.0-beta.8
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 +3 -3
- package/src/index.vue +6 -5
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.8",
|
|
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/core": "^4.7.1-beta.
|
|
16
|
-
"@lambo-design/shared": "^1.0.0-beta.
|
|
15
|
+
"@lambo-design/core": "^4.7.1-beta.47",
|
|
16
|
+
"@lambo-design/shared": "^1.0.0-beta.38"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {}
|
|
19
19
|
}
|
package/src/index.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="upload-file-box">
|
|
3
3
|
<div class="upload-btn-box">
|
|
4
|
-
<Button :size="buttonSize" icon="md-
|
|
4
|
+
<Button :size="buttonSize" icon="md-add" type="primary" :loading="loading"
|
|
5
5
|
@click="UploadFile()" ghost v-if="uploadBtn">
|
|
6
|
-
<span v-if="!loading"
|
|
7
|
-
<span v-else
|
|
6
|
+
<span v-if="!loading">上传附件</span>
|
|
7
|
+
<span v-else>正在上传...</span>
|
|
8
8
|
</Button>
|
|
9
9
|
<a v-if="!uploadBtn" @click="UploadFile()">
|
|
10
10
|
<Icon type="md-add"></Icon>
|
|
@@ -66,7 +66,7 @@ export default {
|
|
|
66
66
|
uploadBtn: {
|
|
67
67
|
type: Boolean,
|
|
68
68
|
required: false,
|
|
69
|
-
default:
|
|
69
|
+
default: true
|
|
70
70
|
},
|
|
71
71
|
//是否展示文件列表
|
|
72
72
|
showFileList: {
|
|
@@ -123,6 +123,7 @@ export default {
|
|
|
123
123
|
methods: {
|
|
124
124
|
UploadFile: function () {
|
|
125
125
|
this.$refs.uploadInput.click();
|
|
126
|
+
this.loading=true;
|
|
126
127
|
},
|
|
127
128
|
readFile: function (e, num) {
|
|
128
129
|
let self = this;
|
|
@@ -146,7 +147,7 @@ export default {
|
|
|
146
147
|
self.attachmentFile.fileType = self.attachmentFile.fileName.name.substring(self.attachmentFile.fileName.name.lastIndexOf(".") + 1);
|
|
147
148
|
|
|
148
149
|
}
|
|
149
|
-
self.loading = true;
|
|
150
|
+
// self.loading = true;
|
|
150
151
|
self.loadtoServer();
|
|
151
152
|
},
|
|
152
153
|
loadtoServer: function () {
|