| | |
| | | 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"> |
| | | <uploader-btn ref="button" :attrs="attrs">
|
| | | <i class="el-icon-upload2" style="font-size:18px; color:#0088ff"></i>
|
| | | 上传
|
| | | </uploader-btn>
|
| | |
| | | UploaderList
|
| | | },
|
| | | props: {
|
| | | acptTypes: {
|
| | | type: String,
|
| | | default: ''
|
| | | },
|
| | | tip: {
|
| | | type: Boolean,
|
| | | default: false
|
| | |
| | | type: String,
|
| | | default: "/data/api-f/file/upload" //"//192.168.20.10:3000/upload"
|
| | | },
|
| | | attrs: {
|
| | | type: Object,
|
| | | // default () {
|
| | | // return {
|
| | |
|
| | | // }
|
| | | // }
|
| | | }
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | fileName: "",
|
| | | fileMd5: "",
|
| | | attrs: {
|
| | | accept: 'image/*'
|
| | | },
|
| | | // attrs: {
|
| | | // accept: 'image/*'
|
| | | // },
|
| | | statusText: {
|
| | | success: '上传成功',
|
| | | error: '上传失败',
|
| | |
| | | },
|
| | | mounted() {
|
| | | this.$nextTick(() => {
|
| | | console.log(this.acptTypes)
|
| | | window.uploader = this.$refs.uploader.uploader
|
| | | })
|
| | | }
|
| | |
| | |
|
| | | <style lang="scss">
|
| | | .file-uploader {
|
| | | .el-input__suffix,.el-input__suffix-inner{
|
| | | .el-input__suffix,
|
| | | .el-input__suffix-inner {
|
| | | outline: none!important;
|
| | | }
|
| | | .el-tooltip.focusing{
|