1 line
6.8 KiB
JSON
1 line
6.8 KiB
JSON
|
{"remainingRequest":"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":["//\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'\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",{"version":3,"sources":["EditorImage.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"EditorImage.vue","sourceRoot":"src/components/Tinymce/components","sourcesContent":["<template>\n <div class=\"upload-container\">\n <el-button :style=\"{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 :s
|