1 line
29 KiB
Plaintext
1 line
29 KiB
Plaintext
{"version":3,"file":"s-uploader.js","sources":["../../../../../../src/sheep/components/s-uploader/s-uploader.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtdXBsb2FkZXIvcy11cGxvYWRlci52dWU"],"sourcesContent":["<!-- 文件上传,基于 upload-file 和 upload-image 实现 -->\r\n<template>\r\n <view class=\"uni-file-picker\">\r\n <view v-if=\"title\" class=\"uni-file-picker__header\">\r\n <text class=\"file-title\">{{ title }}</text>\r\n <text class=\"file-count\">{{ filesList.length }}/{{ limitLength }}</text>\r\n </view>\r\n <view v-if=\"subtitle\" class=\"file-subtitle\">\r\n <view>{{ subtitle }}</view>\r\n </view>\r\n <upload-image\r\n v-if=\"fileMediatype === 'image' && showType === 'grid'\"\r\n :readonly=\"readonly\"\r\n :image-styles=\"imageStyles\"\r\n :files-list=\"url\"\r\n :limit=\"limitLength\"\r\n :disablePreview=\"disablePreview\"\r\n :delIcon=\"delIcon\"\r\n @uploadFiles=\"uploadFiles\"\r\n @choose=\"choose\"\r\n @delFile=\"delFile\"\r\n >\r\n <slot>\r\n <view class=\"is-add\">\r\n <image :src=\"imgsrc\" class=\"add-icon\"></image>\r\n </view>\r\n </slot>\r\n </upload-image>\r\n <upload-file\r\n v-if=\"fileMediatype !== 'image' || showType !== 'grid'\"\r\n :readonly=\"readonly\"\r\n :list-styles=\"listStyles\"\r\n :files-list=\"filesList\"\r\n :showType=\"showType\"\r\n :delIcon=\"delIcon\"\r\n @uploadFiles=\"uploadFiles\"\r\n @choose=\"choose\"\r\n @delFile=\"delFile\"\r\n >\r\n <slot><button type=\"primary\" size=\"mini\">选择文件</button></slot>\r\n </upload-file>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport { chooseAndUploadFile, uploadCloudFiles } from './choose-and-upload-file.js'\r\nimport {\r\n get_file_ext,\r\n get_extname,\r\n get_files_and_is_max,\r\n get_file_info,\r\n get_file_data,\r\n} from './utils.js'\r\nimport uploadImage from './upload-image.vue'\r\nimport uploadFile from './upload-file.vue'\r\nimport sheep from '@/sheep'\r\nlet fileInput = null\r\n/**\r\n * FilePicker 文件选择上传\r\n * @description 文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间\r\n * @tutorial https://ext.dcloud.net.cn/plugin?id=4079\r\n * @property {Object|Array}\tvalue\t组件数据,通常用来回显 ,类型由return-type属性决定\r\n * @property {String|Array}\turl\t url数据\r\n * @property {Boolean}\tdisabled = [true|false]\t组件禁用\r\n * \t@value true \t禁用\r\n * \t@value false \t取消禁用\r\n * @property {Boolean}\treadonly = [true|false]\t组件只读,不可选择,不显示进度,不显示删除按钮\r\n * \t@value true \t只读\r\n * \t@value false \t取消只读\r\n * @property {Boolean}\tdisable-preview = [true|false]\t禁用图片预览,仅 mode:grid 时生效\r\n * \t@value true \t禁用图片预览\r\n * \t@value false \t取消禁用图片预览\r\n * @property {Boolean}\tdel-icon = [true|false]\t是否显示删除按钮\r\n * \t@value true \t显示删除按钮\r\n * \t@value false \t不显示删除按钮\r\n * @property {Boolean}\tauto-upload = [true|false]\t是否自动上传,值为true则只触发@select,可自行上传\r\n * \t@value true \t自动上传\r\n * \t@value false \t取消自动上传\r\n * @property {Number|String}\tlimit\t最大选择个数 ,h5 会自动忽略多选的部分\r\n * @property {String}\ttitle\t组件标题,右侧显示上传计数\r\n * @property {String}\tmode = [list|grid]\t选择文件后的文件列表样式\r\n * \t@value list \t列表显示\r\n * \t@value grid \t宫格显示\r\n * @property {String}\tfile-mediatype = [image|video|all]\t选择文件类型\r\n * \t@value image\t只选择图片\r\n * \t@value video\t只选择视频\r\n * \t@value all\t\t选择所有文件\r\n * @property {Array}\tfile-extname\t选择文件后缀,根据 file-mediatype 属性而不同\r\n * @property {Object}\tlist-style\tmode:list 时的样式\r\n * @property {Object}\timage-styles\t选择文件后缀,根据 file-mediatype 属性而不同\r\n * @event {Function} select \t选择文件后触发\r\n * @event {Function} progress 文件上传时触发\r\n * @event {Function} success \t上传成功触发\r\n * @event {Function} fail \t\t上传失败触发\r\n * @event {Function} delete \t文件从列表移除时触发\r\n */\r\nexport default {\r\n name: 'sUploader',\r\n components: {\r\n uploadImage,\r\n uploadFile,\r\n },\r\n options: {\r\n virtualHost: true,\r\n },\r\n emits: ['select', 'success', 'fail', 'progress', 'delete', 'update:modelValue', 'update:url'],\r\n props: {\r\n modelValue: {\r\n type: [Array, Object],\r\n default() {\r\n return []\r\n },\r\n },\r\n url: {\r\n type: [Array, String],\r\n default() {\r\n return []\r\n },\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n disablePreview: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n delIcon: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n // 自动上传\r\n autoUpload: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n // 最大选择个数 ,h5只能限制单选或是多选\r\n limit: {\r\n type: [Number, String],\r\n default: 9,\r\n },\r\n // 列表样式 grid | list | list-card\r\n mode: {\r\n type: String,\r\n default: 'grid',\r\n },\r\n // 选择文件类型 image/video/all\r\n fileMediatype: {\r\n type: String,\r\n default: 'image',\r\n },\r\n // 文件类型筛选\r\n fileExtname: {\r\n type: [Array, String],\r\n default() {\r\n return []\r\n },\r\n },\r\n title: {\r\n type: String,\r\n default: '',\r\n },\r\n listStyles: {\r\n type: Object,\r\n default() {\r\n return {\r\n // 是否显示边框\r\n border: true,\r\n // 是否显示分隔线\r\n dividline: true,\r\n // 线条样式\r\n borderStyle: {},\r\n }\r\n },\r\n },\r\n imageStyles: {\r\n type: Object,\r\n default() {\r\n return {\r\n width: 'auto',\r\n height: 'auto',\r\n }\r\n },\r\n },\r\n readonly: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n sizeType: {\r\n type: Array,\r\n default() {\r\n return ['original', 'compressed']\r\n },\r\n },\r\n driver: {\r\n type: String,\r\n default: 'local', // local=本地 | oss | unicloud\r\n },\r\n subtitle: {\r\n type: String,\r\n default: '',\r\n },\r\n },\r\n data() {\r\n return {\r\n files: [],\r\n localValue: [],\r\n imgsrc: sheep.$url.static('/static/img/shop/upload-camera.png'),\r\n }\r\n },\r\n watch: {\r\n modelValue: {\r\n handler(newVal, oldVal) {\r\n this.setValue(newVal, oldVal)\r\n },\r\n immediate: true,\r\n },\r\n },\r\n computed: {\r\n returnType() {\r\n if (this.limit > 1) {\r\n return 'array'\r\n }\r\n return 'object'\r\n },\r\n filesList() {\r\n let files = []\r\n this.files.forEach((v) => {\r\n files.push(v)\r\n })\r\n return files\r\n },\r\n showType() {\r\n if (this.fileMediatype === 'image') {\r\n return this.mode\r\n }\r\n return 'list'\r\n },\r\n limitLength() {\r\n if (this.returnType === 'object') {\r\n return 1\r\n }\r\n if (!this.limit) {\r\n return 1\r\n }\r\n if (this.limit >= 9) {\r\n return 9\r\n }\r\n return this.limit\r\n },\r\n },\r\n created() {\r\n if (this.driver === 'local') {\r\n uniCloud.chooseAndUploadFile = chooseAndUploadFile\r\n }\r\n this.form = this.getForm('uniForms')\r\n this.formItem = this.getForm('uniFormsItem')\r\n if (this.form && this.formItem) {\r\n if (this.formItem.name) {\r\n this.rename = this.formItem.name\r\n this.form.inputChildrens.push(this)\r\n }\r\n }\r\n },\r\n methods: {\r\n /**\r\n * 公开用户使用,清空文件\r\n * @param {Object} index\r\n */\r\n clearFiles(index) {\r\n if (index !== 0 && !index) {\r\n this.files = []\r\n this.$nextTick(() => {\r\n this.setEmit()\r\n })\r\n } else {\r\n this.files.splice(index, 1)\r\n }\r\n this.$nextTick(() => {\r\n this.setEmit()\r\n })\r\n },\r\n /**\r\n * 公开用户使用,继续上传\r\n */\r\n upload() {\r\n let files = []\r\n this.files.forEach((v, index) => {\r\n if (v.status === 'ready' || v.status === 'error') {\r\n files.push(Object.assign({}, v))\r\n }\r\n })\r\n return this.uploadFiles(files)\r\n },\r\n async setValue(newVal, oldVal) {\r\n const newData = async (v) => {\r\n const reg = /cloud:\\/\\/([\\w.]+\\/?)\\S*/\r\n let url = ''\r\n if (v.fileID) {\r\n url = v.fileID\r\n } else {\r\n url = v.url\r\n }\r\n if (reg.test(url)) {\r\n v.fileID = url\r\n v.url = await this.getTempFileURL(url)\r\n }\r\n if (v.url) v.path = v.url\r\n return v\r\n }\r\n if (this.returnType === 'object') {\r\n if (newVal) {\r\n await newData(newVal)\r\n } else {\r\n newVal = {}\r\n }\r\n } else {\r\n if (!newVal) newVal = []\r\n for (let i = 0; i < newVal.length; i++) {\r\n let v = newVal[i]\r\n await newData(v)\r\n }\r\n }\r\n this.localValue = newVal\r\n if (this.form && this.formItem && !this.is_reset) {\r\n this.is_reset = false\r\n this.formItem.setValue(this.localValue)\r\n }\r\n let filesData = Object.keys(newVal).length > 0 ? newVal : []\r\n this.files = [].concat(filesData)\r\n },\r\n\r\n /**\r\n * 选择文件\r\n */\r\n choose() {\r\n if (this.disabled) return\r\n if (\r\n this.files.length >= Number(this.limitLength) &&\r\n this.showType !== 'grid' &&\r\n this.returnType === 'array'\r\n ) {\r\n uni.showToast({\r\n title: `您最多选择 ${this.limitLength} 个文件`,\r\n icon: 'none',\r\n })\r\n return\r\n }\r\n this.chooseFiles()\r\n },\r\n\r\n /**\r\n * 选择文件并上传\r\n */\r\n chooseFiles() {\r\n const _extname = get_extname(this.fileExtname)\r\n // 获取后缀\r\n uniCloud\r\n .chooseAndUploadFile({\r\n type: this.fileMediatype,\r\n compressed: false,\r\n sizeType: this.sizeType,\r\n // TODO 如果为空,video 有问题\r\n extension: _extname.length > 0 ? _extname : undefined,\r\n count: this.limitLength - this.files.length, //默认9\r\n onChooseFile: this.chooseFileCallback,\r\n onUploadProgress: (progressEvent) => {\r\n this.setProgress(progressEvent, progressEvent.index)\r\n },\r\n })\r\n .then((result) => {\r\n this.setSuccessAndError(result.tempFiles)\r\n })\r\n .catch((err) => {\r\n console.log('选择失败', err)\r\n })\r\n },\r\n\r\n /**\r\n * 选择文件回调\r\n * @param {Object} res\r\n */\r\n async chooseFileCallback(res) {\r\n const _extname = get_extname(this.fileExtname)\r\n const is_one =\r\n (Number(this.limitLength) === 1 && this.disablePreview && !this.disabled) ||\r\n this.returnType === 'object'\r\n // 如果这有一个文件 ,需要清空本地缓存数据\r\n if (is_one) {\r\n this.files = []\r\n }\r\n\r\n let { filePaths, files } = get_files_and_is_max(res, _extname)\r\n if (!(_extname && _extname.length > 0)) {\r\n filePaths = res.tempFilePaths\r\n files = res.tempFiles\r\n }\r\n\r\n let currentData = []\r\n for (let i = 0; i < files.length; i++) {\r\n if (this.limitLength - this.files.length <= 0) break\r\n files[i].uuid = Date.now()\r\n let filedata = await get_file_data(files[i], this.fileMediatype)\r\n filedata.progress = 0\r\n filedata.status = 'ready'\r\n this.files.push(filedata)\r\n currentData.push({\r\n ...filedata,\r\n file: files[i],\r\n })\r\n }\r\n this.$emit('select', {\r\n tempFiles: currentData,\r\n tempFilePaths: filePaths,\r\n })\r\n res.tempFiles = files\r\n // 停止自动上传\r\n if (!this.autoUpload) {\r\n res.tempFiles = []\r\n }\r\n },\r\n\r\n /**\r\n * 批传\r\n * @param {Object} e\r\n */\r\n uploadFiles(files) {\r\n files = [].concat(files)\r\n return uploadCloudFiles\r\n .call(this, files, 5, (res) => {\r\n this.setProgress(res, res.index, true)\r\n })\r\n .then((result) => {\r\n this.setSuccessAndError(result)\r\n return result\r\n })\r\n .catch((err) => {\r\n console.log(err)\r\n })\r\n },\r\n\r\n /**\r\n * 成功或失败\r\n */\r\n async setSuccessAndError(res, fn) {\r\n let successData = []\r\n let errorData = []\r\n let tempFilePath = []\r\n let errorTempFilePath = []\r\n for (let i = 0; i < res.length; i++) {\r\n const item = res[i]\r\n const index = item.uuid ? this.files.findIndex((p) => p.uuid === item.uuid) : item.index\r\n\r\n if (index === -1 || !this.files) break\r\n if (item.errMsg === 'request:fail') {\r\n this.files[index].url = item.path\r\n this.files[index].status = 'error'\r\n this.files[index].errMsg = item.errMsg\r\n // this.files[index].progress = -1\r\n errorData.push(this.files[index])\r\n errorTempFilePath.push(this.files[index].url)\r\n } else {\r\n this.files[index].errMsg = ''\r\n this.files[index].fileID = item.url\r\n const reg = /cloud:\\/\\/([\\w.]+\\/?)\\S*/\r\n if (reg.test(item.url)) {\r\n this.files[index].url = await this.getTempFileURL(item.url)\r\n } else {\r\n this.files[index].url = item.url\r\n }\r\n\r\n this.files[index].status = 'success'\r\n this.files[index].progress += 1\r\n successData.push(this.files[index])\r\n tempFilePath.push(this.files[index].fileID)\r\n }\r\n }\r\n\r\n if (successData.length > 0) {\r\n this.setEmit()\r\n // 状态改变返回\r\n this.$emit('success', {\r\n tempFiles: this.backObject(successData),\r\n tempFilePaths: tempFilePath,\r\n })\r\n }\r\n\r\n if (errorData.length > 0) {\r\n this.$emit('fail', {\r\n tempFiles: this.backObject(errorData),\r\n tempFilePaths: errorTempFilePath,\r\n })\r\n }\r\n },\r\n\r\n /**\r\n * 获取进度\r\n * @param {Object} progressEvent\r\n * @param {Object} index\r\n * @param {Object} type\r\n */\r\n setProgress(progressEvent, index, type) {\r\n const fileLenth = this.files.length\r\n const percentNum = (index / fileLenth) * 100\r\n const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)\r\n let idx = index\r\n if (!type) {\r\n idx = this.files.findIndex((p) => p.uuid === progressEvent.tempFile.uuid)\r\n }\r\n if (idx === -1 || !this.files[idx]) return\r\n // fix by mehaotian 100 就会消失,-1 是为了让进度条消失\r\n this.files[idx].progress = percentCompleted - 1\r\n // 上传中\r\n this.$emit('progress', {\r\n index: idx,\r\n progress: parseInt(percentCompleted),\r\n tempFile: this.files[idx],\r\n })\r\n },\r\n\r\n /**\r\n * 删除文件\r\n * @param {Object} index\r\n */\r\n delFile(index) {\r\n this.$emit('delete', {\r\n tempFile: this.files[index],\r\n tempFilePath: this.files[index].url,\r\n })\r\n this.files.splice(index, 1)\r\n this.$nextTick(() => {\r\n this.setEmit()\r\n })\r\n },\r\n\r\n /**\r\n * 获取文件名和后缀\r\n * @param {Object} name\r\n */\r\n getFileExt(name) {\r\n const last_len = name.lastIndexOf('.')\r\n const len = name.length\r\n return {\r\n name: name.substring(0, last_len),\r\n ext: name.substring(last_len + 1, len),\r\n }\r\n },\r\n\r\n /**\r\n * 处理返回事件\r\n */\r\n setEmit() {\r\n let data = []\r\n let updateUrl = []\r\n if (this.returnType === 'object') {\r\n data = this.backObject(this.files)[0]\r\n this.localValue = data ? data : null\r\n updateUrl = data ? data.url : ''\r\n } else {\r\n data = this.backObject(this.files)\r\n if (!this.localValue) {\r\n this.localValue = []\r\n }\r\n this.localValue = [...data]\r\n if (this.localValue.length > 0) {\r\n this.localValue.forEach((item) => {\r\n updateUrl.push(item.url)\r\n })\r\n }\r\n }\r\n this.$emit('update:modelValue', this.localValue)\r\n this.$emit('update:url', updateUrl)\r\n },\r\n\r\n /**\r\n * 处理返回参数\r\n * @param {Object} files\r\n */\r\n backObject(files) {\r\n let newFilesData = []\r\n files.forEach((v) => {\r\n newFilesData.push({\r\n extname: v.extname,\r\n fileType: v.fileType,\r\n image: v.image,\r\n name: v.name,\r\n path: v.path,\r\n size: v.size,\r\n fileID: v.fileID,\r\n url: v.url,\r\n })\r\n })\r\n return newFilesData\r\n },\r\n async getTempFileURL(fileList) {\r\n fileList = {\r\n fileList: [].concat(fileList),\r\n }\r\n const urls = await uniCloud.getTempFileURL(fileList)\r\n return urls.fileList[0].tempFileURL || ''\r\n },\r\n /**\r\n * 获取父元素实例\r\n */\r\n getForm(name = 'uniForms') {\r\n let parent = this.$parent\r\n let parentName = parent.$options.name\r\n while (parentName !== name) {\r\n parent = parent.$parent\r\n if (!parent) return false\r\n parentName = parent.$options.name\r\n }\r\n return parent\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.uni-file-picker {\r\n /* #ifndef APP-NVUE */\r\n box-sizing: border-box;\r\n overflow: hidden;\r\n /* width: 100%; */\r\n /* #endif */\r\n /* flex: 1; */\r\n position: relative;\r\n}\r\n\r\n.uni-file-picker__header {\r\n padding-top: 5px;\r\n padding-bottom: 10px;\r\n /* #ifndef APP-NVUE */\r\n display: flex;\r\n /* #endif */\r\n justify-content: space-between;\r\n}\r\n\r\n.file-title {\r\n font-size: 14px;\r\n color: #333;\r\n}\r\n\r\n.file-count {\r\n font-size: 14px;\r\n color: #999;\r\n}\r\n\r\n.is-add {\r\n /* #ifndef APP-NVUE */\r\n display: flex;\r\n /* #endif */\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n.add-icon {\r\n width: 57rpx;\r\n height: 49rpx;\r\n}\r\n.file-subtitle {\r\n position: absolute;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n bottom: 0;\r\n width: 140rpx;\r\n height: 36rpx;\r\n z-index: 1;\r\n display: flex;\r\n justify-content: center;\r\n color: #fff;\r\n font-weight: 500;\r\n background: rgba(#000, 0.3);\r\n font-size: 24rpx;\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-uploader/s-uploader.vue'\nwx.createComponent(Component)"],"names":["sheep","uniCloud","chooseAndUploadFile","uni","get_extname","get_files_and_is_max","get_file_data","uploadCloudFiles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAK,cAAe,MAAW;AAC/B,MAAK,aAAc,MAAW;AA0C9B,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,aAAa;AAAA,EACd;AAAA,EACD,OAAO,CAAC,UAAU,WAAW,QAAQ,YAAY,UAAU,qBAAqB,YAAY;AAAA,EAC5F,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM,CAAC,OAAO,MAAM;AAAA,MACpB,UAAU;AACR,eAAO,CAAC;AAAA,MACT;AAAA,IACF;AAAA,IACD,KAAK;AAAA,MACH,MAAM,CAAC,OAAO,MAAM;AAAA,MACpB,UAAU;AACR,eA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