| | |
| | | ref="uploader"
|
| | | :options="options"
|
| | | :file-status-text="statusText"
|
| | | :attrs="attrs"
|
| | | class="uploader-single"
|
| | | @file-added="onFileAdded"
|
| | | @complete="onComplete"
|
| | |
| | | <uploader
|
| | | v-else
|
| | | ref="uploader"
|
| | | :attrs="attrs"
|
| | | :options="options"
|
| | | :file-status-text="statusText"
|
| | | class="uploader-example"
|
| | |
| | | @complete="onComplete"
|
| | | @close="closeHandle"
|
| | | >
|
| | | <uploader-btn ref="button" :attrs="attrs">
|
| | | <uploader-btn ref="button" :sourceType="sourceType">
|
| | | <i class="el-icon-upload2" style="font-size:18px; color:#0088ff"></i>
|
| | | 上传
|
| | | </uploader-btn>
|
| | |
| | | UploaderList
|
| | | },
|
| | | props: {
|
| | | acptTypes: {
|
| | | type: String,
|
| | | default: ''
|
| | | sourceType: {
|
| | | type: Number,
|
| | | },
|
| | | tip: {
|
| | | type: Boolean,
|
| | |
| | | },
|
| | | attrs: {
|
| | | type: Object,
|
| | | // default () {
|
| | | // return {
|
| | | default () {
|
| | | return {
|
| | |
|
| | | // }
|
| | | // }
|
| | | }
|
| | | }
|
| | | }
|
| | | },
|
| | | data() {
|
| | |
| | | }
|
| | | },
|
| | | computeMD5Success(md5, file) {
|
| | | // 将自定义参数直接加载uploader实例的opts上
|
| | | // if (this.$route.path.indexOf("VideoManage") >= 0) {
|
| | | // Object.assign(this.uploader.opts, {
|
| | | // query: {
|
| | | // stackId: this.DataStackPool.selectedDir.id
|
| | | // // ...this.params,
|
| | | // }
|
| | | // })
|
| | | // }
|
| | | //将自定义参数直接加载uploader实例的opts上
|
| | | if (location.href.indexOf("dataStack") >= 0) {
|
| | | Object.assign(this.uploader.opts, {
|
| | |
| | | },
|
| | | mounted() {
|
| | | this.$nextTick(() => {
|
| | | console.log(this.acptTypes)
|
| | | console.log(this.sourceType)
|
| | | window.uploader = this.$refs.uploader.uploader
|
| | | })
|
| | | }
|