{"remainingRequest":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\oss\\oss-upload.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\src\\views\\modules\\oss\\oss-upload.vue","mtime":1581948666000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\babel.config.js","mtime":1581948662000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\HTC\\program\\善行少年\\security-enterprise-admin\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import 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'], \"/sys/oss/upload?token=\").concat(Cookies.get('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 this.num++;\n },\n // 上传成功\n successHandle: function successHandle(res, file, fileList) {\n var _this = this;\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: function onClose() {\n _this.visible = false;\n _this.$emit('refreshDataList');\n }\n });\n }\n }\n }\n};",{"version":3,"names":["Cookies","data","visible","url","num","fileList","methods","init","concat","window","SITE_CONFIG","get","beforeUploadHandle","file","type","$message","error","$t","successHandle","res","_this","code","msg","message","duration","onClose","$emit"],"sources":["src/views/modules/oss/oss-upload.vue"],"sourcesContent":["\r\n\r\n\r\n"],"mappings":"AAkBA,OAAAA,OAAA;AACA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,OAAA;MACAC,GAAA;MACAC,GAAA;MACAC,QAAA;IACA;EACA;EACAC,OAAA;IACAC,IAAA,WAAAA,KAAA;MACA,KAAAL,OAAA;MACA,KAAAC,GAAA,MAAAK,MAAA,CAAAC,MAAA,CAAAC,WAAA,sCAAAF,MAAA,CAAAR,OAAA,CAAAW,GAAA;MACA,KAAAP,GAAA;MACA,KAAAC,QAAA;IACA;IACA;IACAO,kBAAA,WAAAA,mBAAAC,IAAA;MACA,IAAAA,IAAA,CAAAC,IAAA,oBAAAD,IAAA,CAAAC,IAAA,qBAAAD,IAAA,CAAAC,IAAA,oBAAAD,IAAA,CAAAC,IAAA;QACA,KAAAC,QAAA,CAAAC,KAAA,MAAAC,EAAA;UAAA;QAAA;QACA;MACA;MACA,KAAAb,GAAA;IACA;IACA;IACAc,aAAA,WAAAA,cAAAC,GAAA,EAAAN,IAAA,EAAAR,QAAA;MAAA,IAAAe,KAAA;MACA,IAAAD,GAAA,CAAAE,IAAA;QACA,YAAAN,QAAA,CAAAC,KAAA,CAAAG,GAAA,CAAAG,GAAA;MACA;MACA,KAAAjB,QAAA,GAAAA,QAAA;MACA,KAAAD,GAAA;MACA,SAAAA,GAAA;QACA,KAAAW,QAAA;UACAQ,OAAA,OAAAN,EAAA;UACAH,IAAA;UACAU,QAAA;UACAC,OAAA,WAAAA,QAAA;YACAL,KAAA,CAAAlB,OAAA;YACAkB,KAAA,CAAAM,KAAA;UACA;QACA;MACA;IACA;EACA;AACA","ignoreList":[]}]}