1 |
- {"version":3,"sources":["webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?a5d1","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?cf1c","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?1983","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?9e80","uni-app:///uview-ui/components/u-upload/u-upload.vue","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?bc04","webpack:///D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-upload/u-upload.vue?2140"],"names":[],"mappings":"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","file":"uview-ui/components/u-upload/u-upload.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./u-upload.vue?vue&type=template&id=0d33af60&scoped=true&\"\nvar renderjs\nimport script from \"./u-upload.vue?vue&type=script&lang=js&\"\nexport * from \"./u-upload.vue?vue&type=script&lang=js&\"\nimport style0 from \"./u-upload.vue?vue&type=style&index=0&id=0d33af60&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\runtime\\\\componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0d33af60\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"uview-ui/components/u-upload/u-upload.vue\"\nexport default component.exports","export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-upload.vue?vue&type=template&id=0d33af60&scoped=true&\"","var components\ntry {\n components = {\n uIcon: function() {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-icon/u-icon\" */ \"@/uview-ui/components/u-icon/u-icon.vue\"\n )\n },\n uLineProgress: function() {\n return import(\n /* webpackChunkName: \"uview-ui/components/u-line-progress/u-line-progress\" */ \"@/uview-ui/components/u-line-progress/u-line-progress.vue\"\n )\n }\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.showUploadList ? _vm.$u.addUnit(_vm.width) : null\n var g1 = _vm.showUploadList ? _vm.$u.addUnit(_vm.height) : null\n var g2 =\n !_vm.disabled && _vm.maxCount > _vm.lists.length && !_vm.customBtn\n ? _vm.$u.addUnit(_vm.width)\n : null\n var g3 =\n !_vm.disabled && _vm.maxCount > _vm.lists.length && !_vm.customBtn\n ? _vm.$u.addUnit(_vm.height)\n : null\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n g1: g1,\n g2: g2,\n g3: g3\n }\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-upload.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-upload.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"u-upload\" v-if=\"!disabled\">\r\n\t\t<view\r\n\t\t\tv-if=\"showUploadList\"\r\n\t\t\tclass=\"u-list-item u-preview-wrap\"\r\n\t\t\tv-for=\"(item, index) in lists\"\r\n\t\t\t:key=\"index\"\r\n\t\t\t:style=\"{\r\n\t\t\t\twidth: $u.addUnit(width),\r\n\t\t\t\theight: $u.addUnit(height)\r\n\t\t\t}\"\r\n\t\t>\r\n\t\t\t<view\r\n\t\t\t\tv-if=\"deletable\"\r\n\t\t\t\tclass=\"u-delete-icon\"\r\n\t\t\t\t@tap.stop=\"deleteItem(index)\"\r\n\t\t\t\t:style=\"{\r\n\t\t\t\t\tbackground: delBgColor\r\n\t\t\t\t}\"\r\n\t\t\t>\r\n\t\t\t\t<u-icon class=\"u-icon\" :name=\"delIcon\" size=\"20\" :color=\"delColor\"></u-icon>\r\n\t\t\t</view>\r\n\t\t\t<u-line-progress\r\n\t\t\t\tv-if=\"showProgress && item.progress > 0 && !item.error\"\r\n\t\t\t\t:show-percent=\"false\"\r\n\t\t\t\theight=\"16\"\r\n\t\t\t\tclass=\"u-progress\"\r\n\t\t\t\t:percent=\"item.progress\"\r\n\t\t\t></u-line-progress>\r\n\t\t\t<view @tap.stop=\"retry(index)\" v-if=\"item.error\" class=\"u-error-btn\">点击重试</view>\r\n\t\t\t<image @tap.stop=\"doPreviewImage(item.url || item.path, index)\" class=\"u-preview-image\" v-if=\"!item.isImage\" :src=\"item.url || item.path\" :mode=\"imageMode\"></image>\r\n\t\t</view>\r\n\t\t<slot name=\"file\" :file=\"lists\"></slot>\r\n\t\t<view style=\"display: inline-block;\" @tap=\"selectFile\" v-if=\"maxCount > lists.length\">\r\n\t\t\t<slot name=\"addBtn\"></slot>\r\n\t\t\t<view\r\n\t\t\t\tv-if=\"!customBtn\"\r\n\t\t\t\tclass=\"u-list-item u-add-wrap\"\r\n\t\t\t\thover-class=\"u-add-wrap__hover\"\r\n\t\t\t\thover-stay-time=\"150\"\r\n\t\t\t\t:style=\"{\r\n\t\t\t\t\twidth: $u.addUnit(width),\r\n\t\t\t\t\theight: $u.addUnit(height)\r\n\t\t\t\t}\"\r\n\t\t\t>\r\n\t\t\t\t<u-icon name=\"plus\" class=\"u-add-btn\" size=\"40\"></u-icon>\r\n\t\t\t\t<view class=\"u-add-tips\">{{ uploadText }}</view>\r\n\t\t\t</view>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n/**\r\n * upload 图片上传\r\n * @description 该组件用于上传图片场景\r\n * @tutorial https://www.uviewui.com/components/upload.html\r\n * @property {String} action 服务器上传地址\r\n * @property {String Number} max-count 最大选择图片的数量(默认99)\r\n * @property {Boolean} custom-btn 如果需要自定义选择图片的按钮,设置为true(默认false)\r\n * @property {Boolean} show-progress 是否显示进度条(默认true)\r\n * @property {Boolean} disabled 是否启用(显示/移仓)组件(默认false)\r\n * @property {String} image-mode 预览图片等显示模式,可选值为uni的image的mode属性值(默认aspectFill)\r\n * @property {String} del-icon 右上角删除图标名称,只能为uView内置图标\r\n * @property {String} del-bg-color 右上角关闭按钮的背景颜色\r\n * @property {String | Number} index 在各个回调事件中的最后一个参数返回,用于区别是哪一个组件的事件\r\n * @property {String} del-color 右上角关闭按钮图标的颜色\r\n * @property {Object} header 上传携带的头信息,对象形式\r\n * @property {Object} form-data 上传额外携带的参数\r\n * @property {String} name 上传文件的字段名,供后端获取使用(默认file)\r\n * @property {Array<String>} size-type original 原图,compressed 压缩图,默认二者都有(默认['original', 'compressed'])\r\n * @property {Array<String>} source-type 选择图片的来源,album-从相册选图,camera-使用相机,默认二者都有(默认['album', 'camera'])\r\n * @property {Boolean} preview-full-image\t是否可以通过uni.previewImage预览已选择的图片(默认true)\r\n * @property {Boolean} multiple\t是否开启图片多选,部分安卓机型不支持(默认true)\r\n * @property {Boolean} deletable 是否显示删除图片的按钮(默认true)\r\n * @property {String Number} max-size 选择单个文件的最大大小,单位B(byte),默认不限制(默认Number.MAX_VALUE)\r\n * @property {Array<Object>} file-list 默认显示的图片列表,数组元素为对象,必须提供url属性\r\n * @property {Boolean} upload-text 选择图片按钮的提示文字(默认“选择图片”)\r\n * @property {Boolean} auto-upload 选择完图片是否自动上传,见上方说明(默认true)\r\n * @property {Boolean} show-tips 特殊情况下是否自动提示toast,见上方说明(默认true)\r\n * @property {Boolean} show-upload-list 是否显示组件内部的图片预览(默认true)\r\n * @event {Function} on-oversize 图片大小超出最大允许大小\r\n * @event {Function} on-preview 全屏预览图片时触发\r\n * @event {Function} on-remove 移除图片时触发\r\n * @event {Function} on-success 图片上传成功时触发\r\n * @event {Function} on-change 图片上传后,无论成功或者失败都会触发\r\n * @event {Function} on-error 图片上传失败时触发\r\n * @event {Function} on-progress 图片上传过程中的进度变化过程触发\r\n * @event {Function} on-uploaded 所有图片上传完毕触发\r\n * @event {Function} on-choose-complete 每次选择图片后触发,只是让外部可以得知每次选择后,内部的文件列表\r\n * @example <u-upload :action=\"action\" :file-list=\"fileList\" ></u-upload>\r\n */\r\nexport default {\r\n\tname: 'u-upload',\r\n\tprops: {\r\n\t\t//是否显示组件自带的图片预览功能\r\n\t\tshowUploadList: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 后端地址\r\n\t\taction: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\t// 最大上传数量\r\n\t\tmaxCount: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: 52\r\n\t\t},\r\n\t\t// 是否显示进度条\r\n\t\tshowProgress: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否启用\r\n\t\tdisabled: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t// 预览上传的图片时的裁剪模式,和image组件mode属性一致\r\n\t\timageMode: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'aspectFill'\r\n\t\t},\r\n\t\t// 头部信息\r\n\t\theader: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn {};\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 额外携带的参数\r\n\t\tformData: {\r\n\t\t\ttype: Object,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn {};\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 上传的文件字段名\r\n\t\tname: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'file'\r\n\t\t},\r\n\t\t// 所选的图片的尺寸, 可选值为original compressed\r\n\t\tsizeType: {\r\n\t\t\ttype: Array,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn ['original', 'compressed'];\r\n\t\t\t}\r\n\t\t},\r\n\t\tsourceType: {\r\n\t\t\ttype: Array,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn ['album', 'camera'];\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 是否在点击预览图后展示全屏图片预览\r\n\t\tpreviewFullImage: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否开启图片多选,部分安卓机型不支持\r\n\t\tmultiple: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否展示删除按钮\r\n\t\tdeletable: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 文件大小限制,单位为byte\r\n\t\tmaxSize: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: Number.MAX_VALUE\r\n\t\t},\r\n\t\t// 显示已上传的文件列表\r\n\t\tfileList: {\r\n\t\t\ttype: Array,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 上传区域的提示文字\r\n\t\tuploadText: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '选择图片'\r\n\t\t},\r\n\t\t// 是否自动上传\r\n\t\tautoUpload: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否显示toast消息提示\r\n\t\tshowTips: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 是否通过slot自定义传入选择图标的按钮\r\n\t\tcustomBtn: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\t// 内部预览图片区域和选择图片按钮的区域宽度\r\n\t\twidth: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: 200\r\n\t\t},\r\n\t\t// 内部预览图片区域和选择图片按钮的区域高度\r\n\t\theight: {\r\n\t\t\ttype: [String, Number],\r\n\t\t\tdefault: 200\r\n\t\t},\r\n\t\t// 右上角关闭按钮的背景颜色\r\n\t\tdelBgColor: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '#fa3534'\r\n\t\t},\r\n\t\t// 右上角关闭按钮的叉号图标的颜色\r\n\t\tdelColor: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: '#ffffff'\r\n\t\t},\r\n\t\t// 右上角删除图标名称,只能为uView内置图标\r\n\t\tdelIcon: {\r\n\t\t\ttype: String,\r\n\t\t\tdefault: 'close'\r\n\t\t},\r\n\t\t// 如果上传后的返回值为json字符串,是否自动转json\r\n\t\ttoJson: {\r\n\t\t\ttype: Boolean,\r\n\t\t\tdefault: true\r\n\t\t},\r\n\t\t// 上传前的钩子,每个文件上传前都会执行\r\n\t\tbeforeUpload: {\r\n\t\t\ttype: Function,\r\n\t\t\tdefault: null\r\n\t\t},\r\n\t\t// 移除文件前的钩子\r\n\t\tbeforeRemove: {\r\n\t\t\ttype: Function,\r\n\t\t\tdefault: null\r\n\t\t},\r\n\t\t// 允许上传的图片后缀\r\n\t\tlimitType:{\r\n\t\t\ttype: Array,\r\n\t\t\tdefault() {\r\n\t\t\t\treturn ['png', 'jpg', 'jpeg', 'webp', 'gif'];\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 在各个回调事件中的最后一个参数返回,用于区别是哪一个组件的事件\r\n\t\tindex: {\r\n\t\t\ttype: [Number, String],\r\n\t\t\tdefault: ''\r\n\t\t}\r\n\t},\r\n\tmounted() {},\r\n\tdata() {\r\n\t\treturn {\r\n\t\t\tlists: [],\r\n\t\t\tisInCount: true,\r\n\t\t\tuploading: false\r\n\t\t};\r\n\t},\r\n\twatch: {\r\n\t\tfileList: {\r\n\t\t\timmediate: true,\r\n\t\t\thandler(val) {\r\n\t\t\t\tval.map(value => {\r\n\t\t\t\t\t// 首先检查内部是否已经添加过这张图片,因为外部绑定了一个对象给fileList的话(对象引用),进行修改外部fileList\r\n\t\t\t\t\t// 时,会触发watch,导致重新把原来的图片再次添加到this.lists\r\n\t\t\t\t\t// 数组的some方法意思是,只要数组元素有任意一个元素条件符合,就返回true,而另一个数组的every方法的意思是数组所有元素都符合条件才返回true\r\n\t\t\t\t\tlet tmp = this.lists.some(val => {\r\n\t\t\t\t\t\treturn val.url == value.url;\r\n\t\t\t\t\t})\r\n\t\t\t\t\t// 如果内部没有这个图片(tmp为false),则添加到内部\r\n\t\t\t\t\t!tmp && this.lists.push({ url: value.url, error: false, progress: 100 });\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 监听lists的变化,发出事件\r\n\t\tlists(n) {\r\n\t\t\tthis.$emit('on-list-change', n, this.index);\r\n\t\t}\r\n\t},\r\n\tmethods: {\r\n\t\t// 清除列表\r\n\t\tclear() {\r\n\t\t\tthis.lists = [];\r\n\t\t},\r\n\t\t// 重新上传队列中上传失败的所有文件\r\n\t\treUpload() {\r\n\t\t\tthis.uploadFile();\r\n\t\t},\r\n\t\t// 选择图片\r\n\t\tselectFile() {\r\n\t\t\tif (this.disabled) return;\r\n\t\t\tconst { name = '', maxCount, multiple, maxSize, sizeType, lists, camera, compressed, maxDuration, sourceType } = this;\r\n\t\t\tlet chooseFile = null;\r\n\t\t\tconst newMaxCount = maxCount - lists.length;\r\n\t\t\t// 设置为只选择图片的时候使用 chooseImage 来实现\r\n\t\t\tchooseFile = new Promise((resolve, reject) => {\r\n\t\t\t\tuni.chooseImage({\r\n\t\t\t\t\tcount: multiple ? (newMaxCount > 9 ? 9 : newMaxCount) : 1,\r\n\t\t\t\t\tsourceType: sourceType,\r\n\t\t\t\t\tsizeType,\r\n\t\t\t\t\tsuccess: resolve,\r\n\t\t\t\t\tfail: reject\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tchooseFile\r\n\t\t\t\t.then(res => {\r\n\t\t\t\t\tlet file = null;\r\n\t\t\t\t\tlet listOldLength = this.lists.length;\r\n\t\t\t\t\tres.tempFiles.map((val, index) => {\r\n\t\t\t\t\t\t// 检查文件后缀是否允许,如果不在this.limitType内,就会返回false\r\n\t\t\t\t\t\tif(!this.checkFileExt(val)) return ;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// 如果是非多选,index大于等于1或者超出最大限制数量时,不处理\r\n\t\t\t\t\t\tif (!multiple && index >= 1) return;\r\n\t\t\t\t\t\tif (val.size > maxSize) {\r\n\t\t\t\t\t\t\tthis.$emit('on-oversize', val, this.lists, this.index);\r\n\t\t\t\t\t\t\tthis.showToast('超出允许的文件大小');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (maxCount <= lists.length) {\r\n\t\t\t\t\t\t\t\tthis.$emit('on-exceed', val, this.lists, this.index);\r\n\t\t\t\t\t\t\t\tthis.showToast('超出最大允许的文件个数');\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tlists.push({\r\n\t\t\t\t\t\t\t\turl: val.path,\r\n\t\t\t\t\t\t\t\tprogress: 0,\r\n\t\t\t\t\t\t\t\terror: false,\r\n\t\t\t\t\t\t\t\tfile: val\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\t// 每次图片选择完,抛出一个事件,并将当前内部选择的图片数组抛出去\r\n\t\t\t\t\tthis.$emit('on-choose-complete', this.lists, this.index);\r\n\t\t\t\t\tif (this.autoUpload) this.uploadFile(listOldLength);\r\n\t\t\t\t})\r\n\t\t\t\t.catch(error => {\r\n\t\t\t\t\tthis.$emit('on-choose-fail', error);\r\n\t\t\t\t});\r\n\t\t},\r\n\t\t// 提示用户消息\r\n\t\tshowToast(message, force = false) {\r\n\t\t\tif (this.showTips || force) {\r\n\t\t\t\tuni.showToast({\r\n\t\t\t\t\ttitle: message,\r\n\t\t\t\t\ticon: 'none'\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 该方法供用户通过ref调用,手动上传\r\n\t\tupload() {\r\n\t\t\tthis.uploadFile();\r\n\t\t},\r\n\t\t// 对失败的图片重新上传\r\n\t\tretry(index) {\r\n\t\t\tthis.lists[index].progress = 0;\r\n\t\t\tthis.lists[index].error = false;\r\n\t\t\tthis.lists[index].response = null;\r\n\t\t\tuni.showLoading({\r\n\t\t\t\ttitle: '重新上传'\r\n\t\t\t});\r\n\t\t\tthis.uploadFile(index);\r\n\t\t},\r\n\t\t// 上传图片\r\n\t\tasync uploadFile(index = 0) {\r\n\t\t\tif (this.disabled) return;\r\n\t\t\tif (this.uploading) return;\r\n\t\t\t// 全部上传完成\r\n\t\t\tif (index >= this.lists.length) {\r\n\t\t\t\tthis.$emit('on-uploaded', this.lists, this.index);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// 检查是否是已上传或者正在上传中\r\n\t\t\tif (this.lists[index].progress == 100) {\r\n\t\t\t\tif (this.autoUpload == false) this.uploadFile(index + 1);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// 执行before-upload钩子\r\n\t\t\tif(this.beforeUpload && typeof(this.beforeUpload) === 'function') {\r\n\t\t\t\t// 执行回调,同时传入索引和文件列表当作参数\r\n\t\t\t\t// 在微信,支付宝等环境(H5正常),会导致父组件定义的customBack()函数体中的this变成子组件的this\r\n\t\t\t\t// 通过bind()方法,绑定父组件的this,让this.customBack()的this为父组件的上下文\r\n\t\t\t\t// 因为upload组件可能会被嵌套在其他组件内,比如u-form,这时this.$parent其实为u-form的this,\r\n\t\t\t\t// 非页面的this,所以这里需要往上历遍,一直寻找到最顶端的$parent,这里用了this.$u.$parent.call(this)\r\n\t\t\t\t// 明白意思即可,无需纠结this.$u.$parent.call(this)的细节\r\n\t\t\t\tlet beforeResponse = this.beforeUpload.bind(this.$u.$parent.call(this))(index, this.lists);\r\n\t\t\t\t// 判断是否返回了promise\r\n\t\t\t\tif (!!beforeResponse && typeof beforeResponse.then === 'function') {\r\n\t\t\t\t\tawait beforeResponse.then(res => {\r\n\t\t\t\t\t\t// promise返回成功,不进行动作,继续上传\r\n\t\t\t\t\t}).catch(err => {\r\n\t\t\t\t\t\t// 进入catch回调的话,继续下一张\r\n\t\t\t\t\t\treturn this.uploadFile(index + 1);\r\n\t\t\t\t\t})\r\n\t\t\t\t} else if(beforeResponse === false) {\r\n\t\t\t\t\t// 如果返回false,继续下一张图片的上传\r\n\t\t\t\t\treturn this.uploadFile(index + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 此处为返回\"true\"的情形,这里不写代码,就跳过此处,继续执行当前的上传逻辑\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 检查上传地址\r\n\t\t\tif (!this.action) {\r\n\t\t\t\tthis.showToast('请配置上传地址', true);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.lists[index].error = false;\r\n\t\t\tthis.uploading = true;\r\n\t\t\t// 创建上传对象\r\n\t\t\tconst task = uni.uploadFile({\r\n\t\t\t\turl: this.action,\r\n\t\t\t\tfilePath: this.lists[index].url,\r\n\t\t\t\tname: this.name,\r\n\t\t\t\tformData: this.formData,\r\n\t\t\t\theader: this.header,\r\n\t\t\t\tsuccess: res => {\r\n\t\t\t\t\t// 判断是否json字符串,将其转为json格式\r\n\t\t\t\t\tlet data = this.toJson && this.$u.test.jsonString(res.data) ? JSON.parse(res.data) : res.data;\r\n\t\t\t\t\tif (![200, 201, 204].includes(res.statusCode)) {\r\n\t\t\t\t\t\tthis.uploadError(index, data);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// 上传成功\r\n\t\t\t\t\t\tthis.lists[index].response = data;\r\n\t\t\t\t\t\tthis.lists[index].progress = 100;\r\n\t\t\t\t\t\tthis.lists[index].error = false;\r\n\t\t\t\t\t\tthis.$emit('on-success', data, index, this.lists, this.index);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tfail: e => {\r\n\t\t\t\t\tthis.uploadError(index, e);\r\n\t\t\t\t},\r\n\t\t\t\tcomplete: res => {\r\n\t\t\t\t\tuni.hideLoading();\r\n\t\t\t\t\tthis.uploading = false;\r\n\t\t\t\t\tthis.uploadFile(index + 1);\r\n\t\t\t\t\tthis.$emit('on-change', res, index, this.lists, this.index);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\ttask.onProgressUpdate(res => {\r\n\t\t\t\tif (res.progress > 0) {\r\n\t\t\t\t\tthis.lists[index].progress = res.progress;\r\n\t\t\t\t\tthis.$emit('on-progress', res, index, this.lists, this.index);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 上传失败\r\n\t\tuploadError(index, err) {\r\n\t\t\tthis.lists[index].progress = 0;\r\n\t\t\tthis.lists[index].error = true;\r\n\t\t\tthis.lists[index].response = null;\r\n\t\t\tthis.$emit('on-error', err, index, this.lists, this.index);\r\n\t\t\tthis.showToast('上传失败,请重试');\r\n\t\t},\r\n\t\t// 删除一个图片\r\n\t\tdeleteItem(index) {\r\n\t\t\tuni.showModal({\r\n\t\t\t\ttitle: '提示',\r\n\t\t\t\tcontent: '您确定要删除此项吗?',\r\n\t\t\t\tsuccess: async (res) => {\r\n\t\t\t\t\tif (res.confirm) {\r\n\t\t\t\t\t\t// 先检查是否有定义before-remove移除前钩子\r\n\t\t\t\t\t\t// 执行before-remove钩子\r\n\t\t\t\t\t\tif(this.beforeRemove && typeof(this.beforeRemove) === 'function') {\r\n\t\t\t\t\t\t\t// 此处钩子执行 原理同before-remove参数,见上方注释\r\n\t\t\t\t\t\t\tlet beforeResponse = this.beforeRemove.bind(this.$u.$parent.call(this))(index, this.lists);\r\n\t\t\t\t\t\t\t// 判断是否返回了promise\r\n\t\t\t\t\t\t\tif (!!beforeResponse && typeof beforeResponse.then === 'function') {\r\n\t\t\t\t\t\t\t\tawait beforeResponse.then(res => {\r\n\t\t\t\t\t\t\t\t\t// promise返回成功,不进行动作,继续上传\r\n\t\t\t\t\t\t\t\t\tthis.handlerDeleteItem(index);\r\n\t\t\t\t\t\t\t\t}).catch(err => {\r\n\t\t\t\t\t\t\t\t\t// 如果进入promise的reject,终止删除操作\r\n\t\t\t\t\t\t\t\t\tthis.showToast('已终止移除');\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t} else if(beforeResponse === false) {\r\n\t\t\t\t\t\t\t\t// 返回false,终止删除\r\n\t\t\t\t\t\t\t\tthis.showToast('已终止移除');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// 如果返回true,执行删除操作\r\n\t\t\t\t\t\t\t\tthis.handlerDeleteItem(index);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// 如果不存在before-remove钩子,\r\n\t\t\t\t\t\t\tthis.handlerDeleteItem(index);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 执行移除图片的动作,上方代码只是判断是否可以移除\r\n\t\thandlerDeleteItem(index) {\r\n\t\t\t// 如果文件正在上传中,终止上传任务,进度在0 < progress < 100则意味着正在上传\r\n\t\t\tif (this.lists[index].process < 100 && this.lists[index].process > 0) {\r\n\t\t\t\ttypeof this.lists[index].uploadTask != 'undefined' && this.lists[index].uploadTask.abort();\r\n\t\t\t}\r\n\t\t\tthis.lists.splice(index, 1);\r\n\t\t\tthis.$forceUpdate();\r\n\t\t\tthis.$emit('on-remove', index, this.lists, this.index);\r\n\t\t\tthis.showToast('移除成功');\r\n\t\t},\r\n\t\t// 用户通过ref手动的形式,移除一张图片\r\n\t\tremove(index) {\r\n\t\t\t// 判断索引的合法范围\r\n\t\t\tif (index >= 0 && index < this.lists.length) {\r\n\t\t\t\tthis.lists.splice(index, 1);\r\n\t\t\t\tthis.$emit('on-list-change', this.lists, this.index);\r\n\t\t\t}\r\n\t\t},\r\n\t\t// 预览图片\r\n\t\tdoPreviewImage(url, index) {\r\n\t\t\tif (!this.previewFullImage) return;\r\n\t\t\tconst images = this.lists.map(item => item.url || item.path);\r\n\t\t\tuni.previewImage({\r\n\t\t\t\turls: images,\r\n\t\t\t\tcurrent: url,\r\n\t\t\t\tsuccess: () => {\r\n\t\t\t\t\tthis.$emit('on-preview', url, this.lists, this.index);\r\n\t\t\t\t},\r\n\t\t\t\tfail: () => {\r\n\t\t\t\t\tuni.showToast({\r\n\t\t\t\t\t\ttitle: '预览图片失败',\r\n\t\t\t\t\t\ticon: 'none'\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\t\t// 判断文件后缀是否允许\r\n\t\tcheckFileExt(file) {\r\n\t\t\t// 检查是否在允许的后缀中\r\n\t\t\tlet noArrowExt = false;\r\n\t\t\t// 获取后缀名\r\n\t\t\tlet fileExt = '';\r\n\t\t\tconst reg = /.+\\./;\r\n\t\t\t// 如果是H5,需要从name中判断\r\n\t\t\t// #ifdef H5\r\n\t\t\tfileExt = file.name.replace(reg, \"\").toLowerCase();\r\n\t\t\t// #endif\r\n\t\t\t// 非H5,需要从path中读取后缀\r\n\t\t\t// #ifndef H5\r\n\t\t\tfileExt = file.path.replace(reg, \"\").toLowerCase();\r\n\t\t\t// #endif\r\n\t\t\t// 使用数组的some方法,只要符合limitType中的一个,就返回true\r\n\t\t\tnoArrowExt = this.limitType.some(ext => {\r\n\t\t\t\t// 转为小写\r\n\t\t\t\treturn ext.toLowerCase() === fileExt;\r\n\t\t\t})\r\n\t\t\tif(!noArrowExt) this.showToast(`不允许选择${fileExt}格式的文件`);\r\n\t\t\treturn noArrowExt;\r\n\t\t}\r\n\t}\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n@import '../../libs/css/style.components.scss';\r\n\r\n.u-upload {\r\n\t@include vue-flex;\r\n\tflex-wrap: wrap;\r\n\talign-items: center;\r\n}\r\n\r\n.u-list-item {\r\n\twidth: 200rpx;\r\n\theight: 200rpx;\r\n\toverflow: hidden;\r\n\tmargin: 10rpx;\r\n\tbackground: rgb(244, 245, 246);\r\n\tposition: relative;\r\n\tborder-radius: 10rpx;\r\n\t/* #ifndef APP-NVUE */\r\n\tdisplay: flex;\r\n\t/* #endif */\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.u-preview-wrap {\r\n\tborder: 1px solid rgb(235, 236, 238);\r\n}\r\n\r\n.u-add-wrap {\r\n\tflex-direction: column;\r\n\tcolor: $u-content-color;\r\n\tfont-size: 26rpx;\r\n}\r\n\r\n.u-add-tips {\r\n\tmargin-top: 20rpx;\r\n\tline-height: 40rpx;\r\n}\r\n\r\n.u-add-wrap__hover {\r\n\tbackground-color: rgb(235, 236, 238);\r\n}\r\n\r\n.u-preview-image {\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder-radius: 10rpx;\r\n}\r\n\r\n.u-delete-icon {\r\n\tposition: absolute;\r\n\ttop: 10rpx;\r\n\tright: 10rpx;\r\n\tz-index: 10;\r\n\tbackground-color: $u-type-error;\r\n\tborder-radius: 100rpx;\r\n\twidth: 44rpx;\r\n\theight: 44rpx;\r\n\t@include vue-flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.u-icon {\r\n\t@include vue-flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n}\r\n\r\n.u-progress {\r\n\tposition: absolute;\r\n\tbottom: 10rpx;\r\n\tleft: 8rpx;\r\n\tright: 8rpx;\r\n\tz-index: 9;\r\n\twidth: auto;\r\n}\r\n\r\n.u-error-btn {\r\n\tcolor: #ffffff;\r\n\tbackground-color: $u-type-error;\r\n\tfont-size: 20rpx;\r\n\tpadding: 4px 0;\r\n\ttext-align: center;\r\n\tposition: absolute;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\tright: 0;\r\n\tz-index: 9;\r\n\tline-height: 1;\r\n}\r\n</style>\r\n","import mod from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-upload.vue?vue&type=style&index=0&id=0d33af60&lang=scss&scoped=true&\"; export default mod; export * from \"-!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--8-oneOf-1-0!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-1!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-2!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--8-oneOf-1-3!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\sass-loader\\\\dist\\\\cjs.js??ref--8-oneOf-1-4!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--8-oneOf-1-5!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!E:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./u-upload.vue?vue&type=style&index=0&id=0d33af60&lang=scss&scoped=true&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1631763038691\n var cssReload = require(\"E:/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"../../\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}
|