@smallwei/avue 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/avue.js +11 -11
- package/lib/avue.min.js +3 -3
- package/package.json +1 -1
package/lib/avue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Avue.js v2.9.
|
|
2
|
+
* Avue.js v2.9.1
|
|
3
3
|
* (c) 2017-2022 Smallwei
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*
|
|
@@ -1022,7 +1022,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var glob
|
|
|
1022
1022
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1023
1023
|
|
|
1024
1024
|
"use strict";
|
|
1025
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _core_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var _core_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var _core_common_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/common/locale */ \"./packages/core/common/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/qiniu/ */ \"./src/plugin/qiniu/index.js\");\n/* harmony import */ var plugin_ali___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/ali/ */ \"./src/plugin/ali/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_10__);\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getFileUrl(home) {\n var uri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return uri.match(/(^http:\\/\\/|^https:\\/\\/|^\\/\\/|data:image\\/)/) ? uri : home + uri;\n}\n\n;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"upload\",\n mixins: [Object(_core_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(_core_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), _core_common_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data: function data() {\n return {\n res: '',\n loading: false,\n text: [],\n file: {},\n menu: false,\n reload: Math.random()\n };\n },\n props: {\n data: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n onRemove: Function,\n showFileList: {\n type: Boolean,\n \"default\": true\n },\n oss: {\n type: String\n },\n limit: {\n type: Number,\n \"default\": 10\n },\n headers: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n accept: {\n type: [String, Array],\n \"default\": \"\"\n },\n canvasOption: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n fileSize: {\n type: Number\n },\n dragFile: {\n type: Boolean,\n \"default\": false\n },\n drag: {\n type: Boolean,\n \"default\": false\n },\n loadText: {\n type: String,\n \"default\": \"文件上传中,请稍等\"\n },\n action: {\n type: String,\n \"default\": \"\"\n },\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n httpRequest: Function\n },\n computed: {\n isMultiple: function isMultiple() {\n return this.isArray || this.isString || this.stringMode;\n },\n acceptList: function acceptList() {\n if (Array.isArray(this.accept)) {\n return this.accept.join(',');\n }\n\n return this.accept;\n },\n homeUrl: function homeUrl() {\n return this.propsHttp.home || '';\n },\n getIsVideo: function getIsVideo() {\n if (global_variable__WEBPACK_IMPORTED_MODULE_9__[\"typeList\"].video.test(this.imgUrl)) {\n return 'video';\n }\n\n return 'img';\n },\n fileName: function fileName() {\n return this.propsHttp.fileName || 'file';\n },\n isAliOss: function isAliOss() {\n return this.oss === \"ali\";\n },\n isQiniuOss: function isQiniuOss() {\n return this.oss === \"qiniu\";\n },\n isPictureImg: function isPictureImg() {\n return this.listType === \"picture-img\";\n },\n //单个头像图片\n imgUrl: function imgUrl() {\n if (!this.validatenull(this.text)) {\n return getFileUrl(this.homeUrl, this.text[0]);\n }\n },\n fileList: function fileList() {\n var _this = this;\n\n var list = [];\n (this.text || []).forEach(function (ele, index) {\n if (ele) {\n var name; //处理单个url链接取最后为label\n\n if (_this.isMultiple) {\n var i = ele.lastIndexOf('/');\n name = ele.substring(i + 1);\n }\n\n list.push({\n uid: index + '',\n status: 'done',\n isImage: ele.isImage || global_variable__WEBPACK_IMPORTED_MODULE_9__[\"typeList\"].img.test(ele[_this.valueKey]),\n name: _this.isMultiple ? name : ele[_this.labelKey],\n url: getFileUrl(_this.homeUrl, _this.isMultiple ? ele : ele[_this.valueKey])\n });\n }\n });\n return list;\n }\n },\n mounted: function mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n setSort: function setSort() {\n var _this2 = this;\n\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs('Sortable');\n return;\n }\n\n var el = this.$el.querySelectorAll('.avue-upload > ul')[0];\n window.Sortable.create(el, {\n animation: 100,\n onEnd: function onEnd(evt) {\n var targetRow = _this2.text.splice(evt.oldIndex, 1)[0];\n\n _this2.text.splice(evt.newIndex, 0, targetRow);\n\n _this2.reload = Math.random();\n\n _this2.$nextTick(function () {\n return _this2.setSort();\n });\n }\n });\n },\n handleSuccess: function handleSuccess(file) {\n if (this.isPictureImg) {\n this.text.splice(0, 1, file[this.urlKey]);\n } else if (this.isMultiple) {\n this.text.push(file[this.urlKey]);\n } else {\n var obj = {};\n obj[this.labelKey] = file[this.nameKey];\n obj[this.valueKey] = file[this.urlKey];\n this.text.push(obj);\n }\n },\n handleRemove: function handleRemove(file, fileList) {\n this.onRemove && this.onRemove(file, fileList);\n this[\"delete\"](file);\n },\n handleError: function handleError(error) {\n this.uploadError && this.uploadError(error, this.column);\n },\n \"delete\": function _delete(file) {\n var _this3 = this;\n\n (this.text || []).forEach(function (ele, index) {\n if ((_this3.isMultiple ? ele : ele[_this3.valueKey]) === file.url.replace(_this3.homeUrl, '')) {\n _this3.text.splice(index, 1);\n }\n });\n },\n show: function show(data) {\n this.loading = false;\n this.handleSuccess(data || this.res);\n },\n hide: function hide(msg) {\n this.loading = false;\n this.handleError(msg);\n },\n handleFileChange: function handleFileChange(file, fileList) {\n fileList.splice(fileList.length - 1, 1);\n },\n httpUpload: function httpUpload(config) {\n var _this4 = this;\n\n if (typeof this.httpRequest === \"function\") {\n this.httpRequest(config);\n return;\n }\n\n this.loading = true;\n var file = config.file;\n var fileSize = file.size / 1024;\n this.file = config.file;\n\n if (!this.validatenull(fileSize) && fileSize > this.fileSize) {\n this.hide(\"文件太大不符合\");\n return;\n }\n\n var headers = Object.assign(this.headers, {\n \"Content-Type\": \"multipart/form-data\"\n }); //oss配置属性\n\n var oss_config = {};\n var client = {};\n var param = new FormData();\n\n var done = function done() {\n var callback = function callback(newFile) {\n var url = _this4.action; //附加属性\n\n for (var o in _this4.data) {\n param.append(o, _this4.data[o]);\n }\n\n var uploadfile = newFile || file;\n param.append(_this4.fileName, uploadfile); //七牛云oss存储\n\n if (_this4.isQiniuOss) {\n if (!window.CryptoJS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"CryptoJS\");\n\n _this4.hide();\n\n return;\n }\n\n oss_config = _this4.$AVUE.qiniu;\n var token = Object(plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__[\"getToken\"])(oss_config.AK, oss_config.SK, {\n scope: oss_config.scope,\n deadline: new Date().getTime() + oss_config.deadline * 3600\n });\n param.append(\"token\", token);\n url = oss_config.bucket;\n } else if (_this4.isAliOss) {\n if (!window.OSS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"AliOSS\");\n\n _this4.hide();\n\n return;\n }\n\n oss_config = _this4.$AVUE.ali;\n client = Object(plugin_ali___WEBPACK_IMPORTED_MODULE_7__[\"getClient\"])(oss_config);\n }\n\n (function () {\n if (_this4.isAliOss) {\n return client.put(uploadfile.name, uploadfile, {\n headers: _this4.headers\n });\n } else {\n return axios__WEBPACK_IMPORTED_MODULE_10___default.a.post(url, param, {\n headers: headers\n });\n }\n })().then(function (res) {\n _this4.res = {};\n\n if (_this4.isQiniuOss) {\n res.data.key = oss_config.url + res.data.key;\n }\n\n if (_this4.isAliOss) {\n _this4.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(res, _this4.resKey);\n } else {\n _this4.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(res.data, _this4.resKey);\n }\n\n if (typeof _this4.uploadAfter === \"function\") _this4.uploadAfter(_this4.res, _this4.show, function () {\n _this4.loading = false;\n }, _this4.column);else _this4.show(_this4.res);\n })[\"catch\"](function (error) {\n if (typeof _this4.uploadAfter === \"function\") _this4.uploadAfter(error, _this4.hide, function () {\n _this4.loading = false;\n }, _this4.column);else _this4.hide(error);\n });\n };\n\n if (typeof _this4.uploadBefore === \"function\") _this4.uploadBefore(_this4.file, callback, function () {\n _this4.loading = false;\n }, _this4.column);else callback();\n }; //是否开启水印\n\n\n if (!this.validatenull(this.canvasOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"detailImg\"])(file, this.canvasOption).then(function (res) {\n file = res;\n done();\n });\n } else {\n done();\n }\n },\n handleExceed: function handleExceed(files, fileList) {\n this.uploadExceed && this.uploadExceed(this.limit, files, fileList, this.column);\n },\n handlePreview: function handlePreview(file) {\n var _this5 = this;\n\n var callback = function callback() {\n var url = file.url;\n\n var list = _this5.fileList.map(function (ele) {\n return Object.assign(ele, {\n type: _this5.typeList.video.test(ele.url) ? 'video' : ''\n });\n });\n\n var index = _this5.fileList.findIndex(function (ele) {\n return ele.url === url;\n });\n\n _this5.$ImagePreview(list, index);\n };\n\n if (typeof this.uploadPreview === \"function\") {\n this.uploadPreview(file, this.column, callback);\n } else {\n callback();\n }\n },\n handleDelete: function handleDelete(file) {\n var _this6 = this;\n\n this.beforeRemove(file).then(function () {\n _this6.text = [];\n _this6.menu = false;\n })[\"catch\"](function () {});\n },\n beforeRemove: function beforeRemove(file) {\n if (typeof this.uploadDelete === \"function\") {\n return this.uploadDelete(file, this.column);\n } else {\n return Promise.resolve();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
|
|
1025
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/create */ \"./src/core/create.js\");\n/* harmony import */ var _core_common_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../core/common/props.js */ \"./packages/core/common/props.js\");\n/* harmony import */ var _core_common_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../core/common/event.js */ \"./packages/core/common/event.js\");\n/* harmony import */ var _core_common_locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../core/common/locale */ \"./packages/core/common/locale.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/qiniu/ */ \"./src/plugin/qiniu/index.js\");\n/* harmony import */ var plugin_ali___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/ali/ */ \"./src/plugin/ali/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var global_variable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! global/variable */ \"./src/global/variable.js\");\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n\nfunction getFileUrl(home) {\n var uri = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return uri.match(/(^http:\\/\\/|^https:\\/\\/|^\\/\\/|data:image\\/)/) ? uri : home + uri;\n}\n\n;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(core_create__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n name: \"upload\",\n mixins: [Object(_core_common_props_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(_core_common_event_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), _core_common_locale__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n data: function data() {\n return {\n res: '',\n loading: false,\n text: [],\n file: {},\n menu: false,\n reload: Math.random()\n };\n },\n props: {\n data: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n onRemove: Function,\n showFileList: {\n type: Boolean,\n \"default\": true\n },\n oss: {\n type: String\n },\n limit: {\n type: Number,\n \"default\": 10\n },\n headers: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n accept: {\n type: [String, Array],\n \"default\": \"\"\n },\n canvasOption: {\n type: Object,\n \"default\": function _default() {\n return {};\n }\n },\n fileSize: {\n type: Number\n },\n dragFile: {\n type: Boolean,\n \"default\": false\n },\n drag: {\n type: Boolean,\n \"default\": false\n },\n loadText: {\n type: String,\n \"default\": \"文件上传中,请稍等\"\n },\n action: {\n type: String,\n \"default\": \"\"\n },\n uploadBefore: Function,\n uploadAfter: Function,\n uploadDelete: Function,\n uploadPreview: Function,\n uploadError: Function,\n uploadExceed: Function,\n httpRequest: Function\n },\n computed: {\n isMultiple: function isMultiple() {\n return this.isArray || this.isString || this.stringMode;\n },\n acceptList: function acceptList() {\n if (Array.isArray(this.accept)) {\n return this.accept.join(',');\n }\n\n return this.accept;\n },\n homeUrl: function homeUrl() {\n return this.propsHttp.home || '';\n },\n getIsVideo: function getIsVideo() {\n if (global_variable__WEBPACK_IMPORTED_MODULE_9__[\"typeList\"].video.test(this.imgUrl)) {\n return 'video';\n }\n\n return 'img';\n },\n fileName: function fileName() {\n return this.propsHttp.fileName || 'file';\n },\n isAliOss: function isAliOss() {\n return this.oss === \"ali\";\n },\n isQiniuOss: function isQiniuOss() {\n return this.oss === \"qiniu\";\n },\n isPictureImg: function isPictureImg() {\n return this.listType === \"picture-img\";\n },\n //单个头像图片\n imgUrl: function imgUrl() {\n if (!this.validatenull(this.text)) {\n return getFileUrl(this.homeUrl, this.text[0]);\n }\n },\n fileList: function fileList() {\n var _this = this;\n\n var list = [];\n (this.text || []).forEach(function (ele, index) {\n if (ele) {\n var name; //处理单个url链接取最后为label\n\n if (_this.isMultiple) {\n var i = ele.lastIndexOf('/');\n name = ele.substring(i + 1);\n }\n\n list.push({\n uid: index + '',\n status: 'done',\n isImage: ele.isImage || global_variable__WEBPACK_IMPORTED_MODULE_9__[\"typeList\"].img.test(ele[_this.valueKey]),\n name: _this.isMultiple ? name : ele[_this.labelKey],\n url: getFileUrl(_this.homeUrl, _this.isMultiple ? ele : ele[_this.valueKey])\n });\n }\n });\n return list;\n }\n },\n mounted: function mounted() {\n if (this.drag) {\n this.setSort();\n }\n },\n methods: {\n setSort: function setSort() {\n var _this2 = this;\n\n if (!window.Sortable) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs('Sortable');\n return;\n }\n\n var el = this.$el.querySelectorAll('.avue-upload > ul')[0];\n window.Sortable.create(el, {\n animation: 100,\n onEnd: function onEnd(evt) {\n var targetRow = _this2.text.splice(evt.oldIndex, 1)[0];\n\n _this2.text.splice(evt.newIndex, 0, targetRow);\n\n _this2.reload = Math.random();\n\n _this2.$nextTick(function () {\n return _this2.setSort();\n });\n }\n });\n },\n handleSuccess: function handleSuccess(file) {\n if (this.isPictureImg) {\n this.text.splice(0, 1, file[this.urlKey]);\n } else if (this.isMultiple) {\n this.text.push(file[this.urlKey]);\n } else {\n var obj = {};\n obj[this.labelKey] = file[this.nameKey];\n obj[this.valueKey] = file[this.urlKey];\n this.text.push(obj);\n }\n },\n handleRemove: function handleRemove(file, fileList) {\n this.onRemove && this.onRemove(file, fileList);\n this[\"delete\"](file);\n },\n handleError: function handleError(error) {\n this.uploadError && this.uploadError(error, this.column);\n },\n \"delete\": function _delete(file) {\n var _this3 = this;\n\n (this.text || []).forEach(function (ele, index) {\n if ((_this3.isMultiple ? ele : ele[_this3.valueKey]) === file.url.replace(_this3.homeUrl, '')) {\n _this3.text.splice(index, 1);\n }\n });\n },\n show: function show(data) {\n this.loading = false;\n this.handleSuccess(data || this.res);\n },\n hide: function hide(msg) {\n this.loading = false;\n this.handleError(msg);\n },\n handleFileChange: function handleFileChange(file, fileList) {\n fileList.splice(fileList.length - 1, 1);\n },\n httpUpload: function httpUpload(config) {\n var _this4 = this;\n\n if (typeof this.httpRequest === \"function\") {\n this.httpRequest(config);\n return;\n }\n\n this.loading = true;\n var file = config.file;\n var fileSize = file.size / 1024;\n this.file = config.file;\n\n if (!this.validatenull(fileSize) && fileSize > this.fileSize) {\n this.hide(\"文件太大不符合\");\n return;\n }\n\n var headers = Object.assign(this.headers, {\n \"Content-Type\": \"multipart/form-data\"\n }); //oss配置属性\n\n var oss_config = {};\n var client = {};\n var param = new FormData();\n\n var done = function done() {\n var callback = function callback(newFile) {\n var url = _this4.action; //附加属性\n\n for (var o in _this4.data) {\n param.append(o, _this4.data[o]);\n }\n\n var uploadfile = newFile || file;\n param.append(_this4.fileName, uploadfile); //七牛云oss存储\n\n if (_this4.isQiniuOss) {\n if (!window.CryptoJS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"CryptoJS\");\n\n _this4.hide();\n\n return;\n }\n\n oss_config = _this4.$AVUE.qiniu;\n var token = Object(plugin_qiniu___WEBPACK_IMPORTED_MODULE_6__[\"getToken\"])(oss_config.AK, oss_config.SK, {\n scope: oss_config.scope,\n deadline: new Date().getTime() + oss_config.deadline * 3600\n });\n param.append(\"token\", token);\n url = oss_config.bucket;\n } else if (_this4.isAliOss) {\n if (!window.OSS) {\n core_packages__WEBPACK_IMPORTED_MODULE_8__[\"default\"].logs(\"AliOSS\");\n\n _this4.hide();\n\n return;\n }\n\n oss_config = _this4.$AVUE.ali;\n client = Object(plugin_ali___WEBPACK_IMPORTED_MODULE_7__[\"getClient\"])(oss_config);\n }\n\n (function () {\n if (_this4.isAliOss) {\n return client.put(uploadfile.name, uploadfile, {\n headers: _this4.headers\n });\n } else {\n return _this4.$axios.post(url, param, {\n headers: headers\n });\n }\n })().then(function (res) {\n _this4.res = {};\n\n if (_this4.isQiniuOss) {\n res.data.key = oss_config.url + res.data.key;\n }\n\n if (_this4.isAliOss) {\n _this4.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(res, _this4.resKey);\n } else {\n _this4.res = Object(utils_util__WEBPACK_IMPORTED_MODULE_4__[\"getAsVal\"])(res.data, _this4.resKey);\n }\n\n if (typeof _this4.uploadAfter === \"function\") _this4.uploadAfter(_this4.res, _this4.show, function () {\n _this4.loading = false;\n }, _this4.column);else _this4.show(_this4.res);\n })[\"catch\"](function (error) {\n if (typeof _this4.uploadAfter === \"function\") _this4.uploadAfter(error, _this4.hide, function () {\n _this4.loading = false;\n }, _this4.column);else _this4.hide(error);\n });\n };\n\n if (typeof _this4.uploadBefore === \"function\") _this4.uploadBefore(_this4.file, callback, function () {\n _this4.loading = false;\n }, _this4.column);else callback();\n }; //是否开启水印\n\n\n if (!this.validatenull(this.canvasOption)) {\n Object(plugin_canvas___WEBPACK_IMPORTED_MODULE_5__[\"detailImg\"])(file, this.canvasOption).then(function (res) {\n file = res;\n done();\n });\n } else {\n done();\n }\n },\n handleExceed: function handleExceed(files, fileList) {\n this.uploadExceed && this.uploadExceed(this.limit, files, fileList, this.column);\n },\n handlePreview: function handlePreview(file) {\n var _this5 = this;\n\n var callback = function callback() {\n var url = file.url;\n\n var list = _this5.fileList.map(function (ele) {\n return Object.assign(ele, {\n type: _this5.typeList.video.test(ele.url) ? 'video' : ''\n });\n });\n\n var index = _this5.fileList.findIndex(function (ele) {\n return ele.url === url;\n });\n\n _this5.$ImagePreview(list, index);\n };\n\n if (typeof this.uploadPreview === \"function\") {\n this.uploadPreview(file, this.column, callback);\n } else {\n callback();\n }\n },\n handleDelete: function handleDelete(file) {\n var _this6 = this;\n\n this.beforeRemove(file).then(function () {\n _this6.text = [];\n _this6.menu = false;\n })[\"catch\"](function () {});\n },\n beforeRemove: function beforeRemove(file) {\n if (typeof this.uploadDelete === \"function\") {\n return this.uploadDelete(file, this.column);\n } else {\n return Promise.resolve();\n }\n }\n }\n}));\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options");
|
|
1026
1026
|
|
|
1027
1027
|
/***/ }),
|
|
1028
1028
|
|
|
@@ -1995,9 +1995,9 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
1995
1995
|
|
|
1996
1996
|
/***/ }),
|
|
1997
1997
|
|
|
1998
|
-
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./packages/element-ui/upload/index.vue?vue&type=template&id=
|
|
1998
|
+
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd&":
|
|
1999
1999
|
/*!***********************************************************************************************************************************************************************************************************!*\
|
|
2000
|
-
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/upload/index.vue?vue&type=template&id=
|
|
2000
|
+
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd& ***!
|
|
2001
2001
|
\***********************************************************************************************************************************************************************************************************/
|
|
2002
2002
|
/*! exports provided: render, staticRenderFns */
|
|
2003
2003
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -4907,7 +4907,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
4907
4907
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4908
4908
|
|
|
4909
4909
|
"use strict";
|
|
4910
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
4910
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.vue?vue&type=template&id=6276cefd& */ \"./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd&\");\n/* harmony import */ var _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.vue?vue&type=script&lang=js& */ \"./packages/element-ui/upload/index.vue?vue&type=script&lang=js&\");\n/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n\nvar component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _index_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__[\"render\"],\n _index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"],\n false,\n null,\n null,\n null\n \n)\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?");
|
|
4911
4911
|
|
|
4912
4912
|
/***/ }),
|
|
4913
4913
|
|
|
@@ -4923,15 +4923,15 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
4923
4923
|
|
|
4924
4924
|
/***/ }),
|
|
4925
4925
|
|
|
4926
|
-
/***/ "./packages/element-ui/upload/index.vue?vue&type=template&id=
|
|
4926
|
+
/***/ "./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd&":
|
|
4927
4927
|
/*!*****************************************************************************!*\
|
|
4928
|
-
!*** ./packages/element-ui/upload/index.vue?vue&type=template&id=
|
|
4928
|
+
!*** ./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd& ***!
|
|
4929
4929
|
\*****************************************************************************/
|
|
4930
4930
|
/*! exports provided: render, staticRenderFns */
|
|
4931
4931
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4932
4932
|
|
|
4933
4933
|
"use strict";
|
|
4934
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
4934
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib??vue-loader-options!./index.vue?vue&type=template&id=6276cefd& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./packages/element-ui/upload/index.vue?vue&type=template&id=6276cefd&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_template_id_6276cefd___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://AVUE/./packages/element-ui/upload/index.vue?");
|
|
4935
4935
|
|
|
4936
4936
|
/***/ }),
|
|
4937
4937
|
|
|
@@ -5051,7 +5051,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5051
5051
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5052
5052
|
|
|
5053
5053
|
"use strict";
|
|
5054
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCascaderDic\", function() { return loadCascaderDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadDic\", function() { return loadDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadLocalDic\", function() { return loadLocalDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sendDic\", function() { return sendDic; });\n/* harmony import */ var
|
|
5054
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadCascaderDic\", function() { return loadCascaderDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadDic\", function() { return loadDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loadLocalDic\", function() { return loadLocalDic; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sendDic\", function() { return sendDic; });\n/* harmony import */ var utils_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! utils/validate */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n\n\nvar loadCascaderDic = function loadCascaderDic(columnOption) {\n var list = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return new Promise(function (resolve, reject) {\n var columnList = [];\n var result = [];\n var networkdic = {};\n columnOption.forEach(function (ele) {\n if (ele.parentProp) columnList.push(ele);\n });\n list.forEach(function (ele, index) {\n columnList.forEach(function (column) {\n if (column.hide !== true && column.dicFlag !== false) {\n result.push(new Promise(function (resolve) {\n if (Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(ele[column.parentProp])) {\n resolve({\n prop: column.prop,\n data: [],\n index: index\n });\n } else {\n if (column.dicUrl) {\n sendDic({\n url: \"\".concat(column.dicUrl.replace('{{key}}', ele[column.parentProp])),\n props: column.props,\n method: column.dicMethod,\n formatter: column.dicFormatter,\n query: column.dicQuery,\n form: ele\n }).then(function (res) {\n resolve({\n prop: column.prop,\n data: res,\n index: index\n });\n });\n }\n }\n }));\n }\n });\n });\n Promise.all(result).then(function (data) {\n data.forEach(function (ele) {\n if (Object(utils_validate__WEBPACK_IMPORTED_MODULE_0__[\"validatenull\"])(networkdic[ele.index])) networkdic[ele.index] = {};\n networkdic[ele.index][ele.prop] = ele.data;\n });\n resolve(networkdic);\n });\n });\n};\nvar loadDic = function loadDic(option) {\n var ajaxdic = []; // 发送ajax的字典\n\n return new Promise(function (resolve, reject) {\n var params = createdDic(option);\n ajaxdic = params.ajaxdic;\n handleDic(ajaxdic).then(function (res) {\n resolve(res);\n })[\"catch\"](function (err) {\n reject(err);\n });\n });\n};\nvar loadLocalDic = function loadLocalDic(option) {\n var locationdic = {};\n var alldic = option.dicData || {};\n option.column.forEach(function (ele) {\n if (ele.dicData) locationdic[ele.prop] = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"detailDic\"])(ele.dicData, ele.props, ele.dataType);\n });\n return Object.assign(alldic, locationdic);\n};\n\nfunction createdDic(option) {\n var column = option.column || [];\n var ajaxdic = [];\n var locationdic = {};\n var flagdic = [];\n column.forEach(function (ele) {\n var dicData = ele.dicData;\n var dicUrl = ele.dicUrl;\n var prop = ele.prop;\n var parentProp = ele.parentProp;\n flagdic = flagdic.concat(ele.cascader || []);\n\n if (Array.isArray(dicData)) {\n locationdic[prop] = dicData;\n }\n\n var result = ele.dicFlag === false || ele.lazy === true || flagdic.includes(prop);\n if (result) return;\n\n if (dicUrl && !parentProp) {\n ajaxdic.push({\n url: dicUrl,\n name: prop,\n method: ele.dicMethod,\n formatter: ele.dicFormatter,\n props: ele.props,\n dataType: ele.dataType,\n resKey: (ele.props || {}).res,\n query: ele.dicQuery || {}\n });\n }\n });\n return {\n ajaxdic: ajaxdic,\n locationdic: locationdic\n };\n} // 循环处理字典\n\n\nfunction handleDic(list) {\n var networkdic = {};\n var result = [];\n return new Promise(function (resolve) {\n list.forEach(function (ele) {\n result.push(new Promise(function (resolve) {\n sendDic(Object.assign(ele, {\n url: \"\".concat(ele.url.replace('{{key}}', ''))\n })).then(function (res) {\n res = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"detailDic\"])(res, ele.props, ele.dataType);\n resolve(res);\n })[\"catch\"](function () {\n resolve([]);\n });\n }));\n });\n Promise.all(result).then(function (data) {\n list.forEach(function (ele, index) {\n networkdic[ele.name] = data[index];\n });\n resolve(networkdic);\n });\n });\n} // ajax获取字典\n\n\nvar sendDic = function sendDic(params) {\n var url = params.url,\n query = params.query,\n method = params.method,\n resKey = params.resKey,\n props = params.props,\n formatter = params.formatter,\n _params$value = params.value,\n value = _params$value === void 0 ? '' : _params$value,\n column = params.column,\n _params$form = params.form,\n form = _params$form === void 0 ? {} : _params$form;\n\n if (column) {\n url = column.dicUrl;\n method = column.dicMethod;\n query = column.dicQuery || {};\n formatter = column.dicFormatter;\n props = column.props;\n }\n\n var key = 'key';\n url = url || '';\n var list = [];\n var data = {};\n list = url.match(/[^\\{\\}]+(?=\\})/g) || [];\n list.forEach(function (ele) {\n var eleKey = \"{{\".concat(ele, \"}}\");\n var eleValue = form[ele];\n if (ele === key) url = url.replace(eleKey, value);else url = url.replace(eleKey, eleValue);\n });\n\n if (method === 'post') {\n list = Object.keys(query);\n list.forEach(function (ele) {\n var eleKey = query[ele];\n\n if (typeof eleKey !== 'string') {\n data[ele] = eleKey;\n } else if (eleKey.match(/\\{{|}}/g)) {\n var eleValue = form[eleKey.replace(/\\{{|}}/g, '')];\n data[ele] = eleKey.replace(eleKey, eleKey.indexOf(key) !== -1 ? value : eleValue);\n } else {\n data[ele] = eleKey;\n }\n });\n }\n\n if (props) resKey = (props || {}).res || resKey;\n return new Promise(function (resolve) {\n var callback = function callback(res) {\n var list = [];\n\n if (typeof formatter === 'function') {\n list = formatter(res.data);\n } else {\n list = Object(utils_util__WEBPACK_IMPORTED_MODULE_1__[\"getObjValue\"])(res.data, resKey);\n }\n\n resolve(list);\n };\n\n if (method === 'post') {\n window.axios.post(url, data).then(function (res) {\n callback(res);\n })[\"catch\"](function () {\n return [resolve([])];\n });\n } else {\n window.axios.get(url, {\n params: query\n }).then(function (res) {\n callback(res);\n })[\"catch\"](function () {\n return [resolve([])];\n });\n }\n });\n};\n\n//# sourceURL=webpack://AVUE/./src/core/dic.js?");
|
|
5055
5055
|
|
|
5056
5056
|
/***/ }),
|
|
5057
5057
|
|
|
@@ -5099,7 +5099,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5099
5099
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5100
5100
|
|
|
5101
5101
|
"use strict";
|
|
5102
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ui_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/index */ \"./src/ui/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version */ \"./src/version.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var utils_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate.js */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! packages/core/directive/dialog-drag */ \"./packages/core/directive/dialog-drag.js\");\n/* harmony import */ var plugin_export___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/export/ */ \"./src/plugin/export/index.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n/* harmony import */ var _locale___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./locale/ */ \"./src/locale/index.js\");\n/* harmony import */ var plugin_screenshot___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! plugin/screenshot/ */ \"./src/plugin/screenshot/index.js\");\n/* harmony import */ var plugin_clipboard___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! plugin/clipboard/ */ \"./src/plugin/clipboard/index.js\");\n/* harmony import */ var plugin_print___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! plugin/print/ */ \"./src/plugin/print/index.js\");\n/* harmony import */ var plugin_nprogress___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! plugin/nprogress/ */ \"./src/plugin/nprogress/index.js\");\n/* harmony import */ var packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! packages/core/components/image-preview/ */ \"./packages/core/components/image-preview/index.js\");\n/* harmony import */ var packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! packages/core/components/dialog-form/ */ \"./packages/core/components/dialog-form/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! element-ui */ \"element-ui\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_17__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar prototypes = {\n $ImagePreview: packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n $DialogForm: packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n $Export: plugin_export___WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n $Print: plugin_print___WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n $Clipboard: plugin_clipboard___WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n $Log: plugin_logs___WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n $NProgress: plugin_nprogress___WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n $Screenshot: plugin_screenshot___WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n deepClone: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"deepClone\"],\n dataURLtoFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"dataURLtoFile\"],\n isJson: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isJson\"],\n setPx: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"setPx\"],\n vaildData: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"vaildData\"],\n sortArrys: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"sortArrys\"],\n findArray: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findArray\"],\n validatenull: utils_validate_js__WEBPACK_IMPORTED_MODULE_3__[\"validatenull\"],\n downFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"downFile\"],\n loadScript: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"loadScript\"],\n watermark: plugin_canvas___WEBPACK_IMPORTED_MODULE_7__[\"watermark\"],\n findObject: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findObject\"],\n randomId: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"randomId\"]\n};\nvar directive = {\n dialogDrag: packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n\nvar install = function install(Vue) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!element_ui__WEBPACK_IMPORTED_MODULE_17___default.a) {\n core_packages__WEBPACK_IMPORTED_MODULE_16__[\"default\"].logs('element-ui');\n return;\n }
|
|
5102
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ui_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/index */ \"./src/ui/index.js\");\n/* harmony import */ var _version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./version */ \"./src/version.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var utils_validate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! utils/validate.js */ \"./src/utils/validate.js\");\n/* harmony import */ var utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/util */ \"./src/utils/util.js\");\n/* harmony import */ var packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! packages/core/directive/dialog-drag */ \"./packages/core/directive/dialog-drag.js\");\n/* harmony import */ var plugin_export___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! plugin/export/ */ \"./src/plugin/export/index.js\");\n/* harmony import */ var plugin_canvas___WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! plugin/canvas/ */ \"./src/plugin/canvas/index.js\");\n/* harmony import */ var plugin_logs___WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! plugin/logs/ */ \"./src/plugin/logs/index.js\");\n/* harmony import */ var _locale___WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./locale/ */ \"./src/locale/index.js\");\n/* harmony import */ var plugin_screenshot___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! plugin/screenshot/ */ \"./src/plugin/screenshot/index.js\");\n/* harmony import */ var plugin_clipboard___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! plugin/clipboard/ */ \"./src/plugin/clipboard/index.js\");\n/* harmony import */ var plugin_print___WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! plugin/print/ */ \"./src/plugin/print/index.js\");\n/* harmony import */ var plugin_nprogress___WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! plugin/nprogress/ */ \"./src/plugin/nprogress/index.js\");\n/* harmony import */ var packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! packages/core/components/image-preview/ */ \"./packages/core/components/image-preview/index.js\");\n/* harmony import */ var packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! packages/core/components/dialog-form/ */ \"./packages/core/components/dialog-form/index.js\");\n/* harmony import */ var core_packages__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core/packages */ \"./src/core/packages.js\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! element-ui */ \"element-ui\");\n/* harmony import */ var element_ui__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(element_ui__WEBPACK_IMPORTED_MODULE_17__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar prototypes = {\n $ImagePreview: packages_core_components_image_preview___WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n $DialogForm: packages_core_components_dialog_form___WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n $Export: plugin_export___WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n $Print: plugin_print___WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n $Clipboard: plugin_clipboard___WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n $Log: plugin_logs___WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n $NProgress: plugin_nprogress___WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n $Screenshot: plugin_screenshot___WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n deepClone: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"deepClone\"],\n dataURLtoFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"dataURLtoFile\"],\n isJson: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"isJson\"],\n setPx: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"setPx\"],\n vaildData: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"vaildData\"],\n sortArrys: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"sortArrys\"],\n findArray: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findArray\"],\n validatenull: utils_validate_js__WEBPACK_IMPORTED_MODULE_3__[\"validatenull\"],\n downFile: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"downFile\"],\n loadScript: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"loadScript\"],\n watermark: plugin_canvas___WEBPACK_IMPORTED_MODULE_7__[\"watermark\"],\n findObject: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"findObject\"],\n randomId: utils_util__WEBPACK_IMPORTED_MODULE_4__[\"randomId\"]\n};\nvar directive = {\n dialogDrag: packages_core_directive_dialog_drag__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n\nvar install = function install(Vue) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!element_ui__WEBPACK_IMPORTED_MODULE_17___default.a) {\n core_packages__WEBPACK_IMPORTED_MODULE_16__[\"default\"].logs('element-ui');\n return;\n }\n\n if (opts.theme === 'dark') document.documentElement.className = 'avue-theme--dark';\n var defaultOption = {\n size: opts.size,\n calcHeight: opts.calcHeight || 0,\n menuType: opts.menuType || 'text',\n canvas: Object.assign({\n text: 'avuejs.com',\n fontFamily: 'microsoft yahei',\n color: '#999',\n fontSize: 16,\n opacity: 100,\n bottom: 10,\n right: 10,\n ratio: 1\n }, opts.canvas),\n qiniu: Object.assign({\n AK: '',\n SK: '',\n scope: '',\n url: '',\n bucket: 'https://upload.qiniup.com',\n deadline: 1\n }, opts.qiniu || {}),\n ali: Object.assign({\n region: '',\n endpoint: '',\n stsToken: '',\n accessKeyId: '',\n accessKeySecret: '',\n bucket: ''\n }, opts.ali || {})\n };\n Vue.prototype.$AVUE = Object.assign(opts, defaultOption);\n _ui_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(function (component) {\n Vue.component(component.name, component);\n });\n Object.keys(prototypes).forEach(function (key) {\n Vue.prototype[key] = prototypes[key];\n });\n Object.keys(directive).forEach(function (key) {\n Vue.directive(key, directive[key]);\n });\n _locale___WEBPACK_IMPORTED_MODULE_9__[\"default\"].use(opts.locale);\n _locale___WEBPACK_IMPORTED_MODULE_9__[\"default\"].i18n(opts.i18n);\n Vue.prototype.$axios = opts.axios || window.axios || axios__WEBPACK_IMPORTED_MODULE_2___default.a;\n window.axios = Vue.prototype.$axios;\n\n Vue.prototype.$uploadFun = function () {\n var column = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var safe = arguments.length > 1 ? arguments[1] : undefined;\n safe = safe || this;\n var list = ['uploadPreview', 'uploadBefore', 'uploadAfter', 'uploadDelete', 'uploadError', 'uploadExceed'];\n var result = {};\n\n if (column.type === 'upload') {\n list.forEach(function (ele) {\n if (!column[ele]) {\n result[ele] = safe[ele];\n }\n });\n } else {\n list.forEach(function (ele) {\n result[ele] = safe[ele];\n });\n }\n\n return result;\n };\n};\n\nif (typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n}\n\nvar Avue = Object.assign({\n version: _version__WEBPACK_IMPORTED_MODULE_1__[\"version\"],\n locale: _locale___WEBPACK_IMPORTED_MODULE_9__[\"default\"].locale,\n install: install\n}, _ui_index__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Avue);\n\n//# sourceURL=webpack://AVUE/./src/index.js?");
|
|
5103
5103
|
|
|
5104
5104
|
/***/ }),
|
|
5105
5105
|
|
|
@@ -5423,7 +5423,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
5423
5423
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
5424
5424
|
|
|
5425
5425
|
"use strict";
|
|
5426
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\nvar version = '2.9.
|
|
5426
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\nvar version = '2.9.1';\n\n//# sourceURL=webpack://AVUE/./src/version.js?");
|
|
5427
5427
|
|
|
5428
5428
|
/***/ }),
|
|
5429
5429
|
|