1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/e3301cbedcc1952b58b2e73fb83...

1 line
9.3 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\\components\\Tinymce\\components\\EditorImage.vue?vue&type=script&lang=js&","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\components\\Tinymce\\components\\EditorImage.vue","mtime":1622443089431},{"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":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n// import { getToken } from 'api/qiniu'\nexport default {\n name: 'EditorSlideUpload',\n props: {\n color: {\n type: String,\n default: '#1890ff'\n }\n },\n data: function data() {\n return {\n dialogVisible: false,\n listObj: {},\n fileList: []\n };\n },\n methods: {\n checkAllSuccess: function checkAllSuccess() {\n var _this = this;\n\n return Object.keys(this.listObj).every(function (item) {\n return _this.listObj[item].hasSuccess;\n });\n },\n handleSubmit: function handleSubmit() {\n var _this2 = this;\n\n var arr = Object.keys(this.listObj).map(function (v) {\n return _this2.listObj[v];\n });\n\n if (!this.checkAllSuccess()) {\n this.$message('Please wait for all images to be uploaded successfully. If there is a network problem, please refresh the page and upload again!');\n return;\n }\n\n this.$emit('successCBK', arr);\n this.listObj = {};\n this.fileList = [];\n this.dialogVisible = false;\n },\n handleSuccess: function handleSuccess(response, file) {\n var uid = file.uid;\n var objKeyArr = Object.keys(this.listObj);\n\n for (var i = 0, len = objKeyArr.length; i < len; i++) {\n if (this.listObj[objKeyArr[i]].uid === uid) {\n this.listObj[objKeyArr[i]].url = response.files.file;\n this.listObj[objKeyArr[i]].hasSuccess = true;\n return;\n }\n }\n },\n handleRemove: function handleRemove(file) {\n var uid = file.uid;\n var objKeyArr = Object.keys(this.listObj);\n\n for (var i = 0, len = objKeyArr.length; i < len; i++) {\n if (this.listObj[objKeyArr[i]].uid === uid) {\n delete this.listObj[objKeyArr[i]];\n return;\n }\n }\n },\n beforeUpload: function beforeUpload(file) {\n var _self = this;\n\n var _URL = window.URL || window.webkitURL;\n\n var fileName = file.uid;\n this.listObj[fileName] = {};\n return new Promise(function (resolve, reject) {\n var img = new Image();\n img.src = _URL.createObjectURL(file);\n\n img.onload = function () {\n _self.listObj[fileName] = {\n hasSuccess: false,\n uid: file.uid,\n width: this.width,\n height: this.height\n };\n };\n\n resolve(true);\n });\n }\n }\n};",{"version":3,"sources":["EditorImage.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;AAEA,eAAA;AACA,EAAA,IAAA,EAAA,mBADA;AAEA,EAAA,KAAA,EAAA;AACA,IAAA,KAAA,EAAA;AACA,MAAA,IAAA,EAAA,MADA;AAEA,MAAA,OAAA,EAAA;AAFA;AADA,GAFA;AAQA,EAAA,IARA,kBAQA;AACA,WAAA;AACA,MAAA,aAAA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"{background:color,borderColor:color}\" icon=\"el-icon-upload\" size=\"mini\" type=\"primary\" @click=\" dialogVisible=true\">\n upload\n </el-button>\n <el-dialog :visible.sync=\"dialogVisible\">\n <el-upload\n :multiple=\"true\"\n :file-list=\"fileList\"\n :show-file-list=\"true\"\n :on-remove=\"handleRemove\"\n :on-success=\"handleSuccess\"\n :before-upload=\"beforeUpload\"\n class=\"editor-slide-upload\"\n action=\"https://httpbin.org/post\"\n list-type=\"picture-card\"\n >\n <el-button size=\"small\" type=\"primary\">\n Click upload\n </el-button>\n </el-upload>\n <el-button @click=\"dialogVisible = false\">\n Cancel\n </el-button>\n <el-button type=\"primary\" @click=\"handleSubmit\">\n Confirm\n </el-button>\n </el-dialog>\n </div>\n</template>\n\n<script>\n// import { getToken } from 'api/qiniu'\n\nexport default {\n name: 'EditorSlideUpload',\n props: {\n color: {\n type: String,\n default: '#1890ff'\n }\n },\n data() {\n return {\n dialogVisible: false,\n listObj: {},\n fileList: []\n }\n },\n methods: {\n checkAllSuccess() {\n return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess)\n },\n handleSubmit() {\n const arr = Object.keys(this.listObj).map(v => this.listObj[v])\n if (!this.checkAllSuccess()) {\n this.$message('Please wait for all images to be uploaded successfully. If there is a network problem, please refresh the page and upload again!')\n return\n }\n this.$emit('successCBK', arr)\n this.listObj = {}\n this.fileList = []\n this.dialogVisible = false\n },\n handleSuccess(response, file) {\n const uid = file.uid\n const objKeyArr = Object.keys(this.listObj)\n for (let i = 0, len = objKeyArr.length; i < len; i++) {\n if (this.listObj[objKeyArr[i]].uid === uid) {\n this.listObj[objKeyArr[i]].url = response.files.file\n this.listObj[objKeyArr[i]].hasSuccess = true\n return\n }\n }\n },\n handleRemove(file) {\n const uid = file.uid\n const objKeyArr = Object.keys(this.listObj)\n for (let i = 0, len = objKeyArr.length; i < len; i++) {\n if (this.listObj[objKeyArr[i]].uid === uid) {\n delete this.listObj[objKeyArr[i]]\n return\n }\n }\n },\n beforeUpload(file) {\n const _self = this\n const _URL = window.URL || window.webkitURL\n const fileName = file.uid\n this.listObj[fileName] = {}\n return new Promise((resolve, reject) => {\n const img = new Image()\n img.src = _URL.createObjectURL(file)\n img.onload = function() {\n _self.listObj[fileName] = { hasSuccess: false, uid: file.uid, width: this.width, height: this.height }\n }\n resolve(true)\n })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.editor-slide-upload {\n margin-bottom: 20px;\n ::v-deep .el-upload--picture-card {\n width: 100%;\n }\n}\n</style>\n"],"sourceRoot":"src/components/Tinymce/components"}]}