1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| <template>
| <view>
| <u-upload :action="action" :file-list="fileList" :max-count="count" :header="header" ref="uploadRef"></u-upload>
| </view>
| </template>
|
| <script>
| export default {
| name:"MsiUpload",
| props: {
| action: {type: String,required: true},
| count: {type: Number,default: 1},
| },
| data() {
| return {
| header: {Authorization: ''}
| };
| },
| onLoad(){
| this.header.Authorization = 'Bearer ' + uni.getStorageSync('token');
| },
| methods: {
| submit() {
| this.$refs.uploadRef.submit();
| }
| }
| }
| </script>
|
| <style>
|
| </style>
|
|