1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\oss\\oss-upload.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\views\\modules\\oss\\oss-upload.vue","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport Cookies from 'js-cookie';\nexport default {\n data: function data() {\n return {\n visible: false,\n url: '',\n num: 0,\n fileList: []\n };\n },\n methods: {\n init: function init() {\n this.visible = true;\n this.url = \"\".concat(window.SITE_CONFIG['apiURL'], \"/oss/file/upload?access_token=\").concat(Cookies.get('access_token'));\n this.num = 0;\n this.fileList = [];\n },\n // 上传之前\n beforeUploadHandle: function beforeUploadHandle(file) {\n if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {\n this.$message.error(this.$t('upload.tip', {\n 'format': 'jpg、png、gif'\n }));\n return false;\n }\n\n this.num++;\n },\n // 上传成功\n successHandle: function successHandle(res, file, fileList) {\n var _this = this;\n\n if (res.code !== 0) {\n return this.$message.error(res.msg);\n }\n\n this.fileList = fileList;\n this.num--;\n\n if (this.num === 0) {\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: function onClose() {\n _this.visible = false;\n\n _this.$emit('refreshDataList');\n }\n });\n }\n }\n }\n};",{"version":3,"sources":["oss-upload.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,OAAA,OAAA,MAAA,WAAA;AACA,eAAA;AACA,EAAA,IADA,kBACA;AACA,WAAA;AACA,MAAA,OAAA,EAAA,KADA;AAEA,MAAA,GAAA,EAAA,EAFA;AAGA,MAAA,GAAA,EAAA,CAHA;AAIA,MAAA,QAAA,EAAA;AAJA,KAAA;AAMA,GARA;AASA,EAAA,OAAA,EAAA;AACA,IAAA,IADA,kBACA;AACA,WAAA,OAAA,GAAA,IAAA;AACA,WAAA,GAAA,aAAA,MAAA,CAAA,WAAA,CAAA,QAAA,CAAA,2CAAA,OAAA,CAAA,GAAA,CAAA,cAAA,CAAA;AACA,WAAA,GAAA,GAAA,CAAA;AACA,WAAA,QAAA,GAAA,EAAA;AACA,KANA;AAOA;AACA,IAAA,kBARA,8BAQA,IARA,EAQA;AACA,UAAA,IAAA,CAAA,IAAA,KAAA,WAAA,IAAA,IAAA,CAAA,IAAA,KAAA,YAAA,IAAA,IAAA,CAAA,IAAA,KAAA,WAAA,IAAA,IAAA,CAAA,IAAA,KAAA,WAAA,EAAA;AACA,aAAA,QAAA,CAAA,KAAA,CAAA,KAAA,EAAA,CAAA,YAAA,EAAA;AAAA,oBAAA;AAAA,SAAA,CAAA;AACA,eAAA,KAAA;AACA;;AACA,WAAA,GAAA;AACA,KAdA;AAeA;AACA,IAAA,aAhBA,yBAgBA,GAhBA,EAgBA,IAhBA,EAgBA,QAhBA,EAgBA;AAAA;;AACA,UAAA,GAAA,CAAA,IAAA,KAAA,CAAA,EAAA;AACA,eAAA,KAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,GAAA,CAAA;AACA;;AACA,WAAA,QAAA,GAAA,QAAA;AACA,WAAA,GAAA;;AACA,UAAA,KAAA,GAAA,KAAA,CAAA,EAAA;AACA,aAAA,QAAA,CAAA;AACA,UAAA,OAAA,EAAA,KAAA,EAAA,CAAA,gBAAA,CADA;AAEA,UAAA,IAAA,EAAA,SAFA;AAGA,UAAA,QAAA,EAAA,GAHA;AAIA,UAAA,OAAA,EAAA,mBAAA;AACA,YAAA,KAAA,CAAA,OAAA,GAAA,KAAA;;AACA,YAAA,KAAA,CAAA,KAAA,CAAA,iBAAA;AACA;AAPA,SAAA;AASA;AACA;AAjCA;AATA,CAAA","sourcesContent":["<template>\n <el-dialog :visible.sync=\"visible\" :title=\"$t('oss.upload')\" :close-on-click-modal=\"false\" :close-on-press-escape=\"false\">\n <el-upload\n :action=\"url\"\n :file-list=\"fileList\"\n drag\n multiple\n :before-upload=\"beforeUploadHandle\"\n :on-success=\"successHandle\"\n class=\"text-center\">\n <i class=\"el-icon-upload\"></i>\n <div class=\"el-upload__text\" v-html=\"$t('upload.text')\"></div>\n <div class=\"el-upload__tip\" slot=\"tip\">{{ $t('upload.tip', { 'format': 'jpg、png、gif' }) }}</div>\n </el-upload>\n </el-dialog>\n</template>\n\n<script>\nimport Cookies from 'js-cookie'\nexport default {\n data () {\n return {\n visible: false,\n url: '',\n num: 0,\n fileList: []\n }\n },\n methods: {\n init () {\n this.visible = true\n this.url = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?access_token=${Cookies.get('access_token')}`\n this.num = 0\n this.fileList = []\n },\n // 上传之前\n beforeUploadHandle (file) {\n if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif') {\n this.$message.error(this.$t('upload.tip', { 'format': 'jpg、png、gif' }))\n return false\n }\n this.num++\n },\n // 上传成功\n successHandle (res, file, fileList) {\n if (res.code !== 0) {\n return this.$message.error(res.msg)\n }\n this.fileList = fileList\n this.num--\n if (this.num === 0) {\n this.$message({\n message: this.$t('prompt.success'),\n type: 'success',\n duration: 500,\n onClose: () => {\n this.visible = false\n this.$emit('refreshDataList')\n }\n })\n }\n }\n }\n}\n</script>\n"],"sourceRoot":"src/views/modules/oss"}]} |