module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "/dist/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 62);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functioal component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 41:
/***/ (function(module, exports) {

module.exports = require("vuedraggable");

/***/ }),

/***/ 62:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/index.vue?vue&type=template&id=7ab0e71c&
var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c("div", { staticClass: "el-upload" }, [
    _c(
      "div",
      { staticClass: "el-upload__header" },
      [
        _vm._t("title"),
        _vm.showNum
          ? _c(
              "span",
              {
                staticClass: "el-upload__header-num",
                class: "el-upload__header-num--" + _vm.numPosition
              },
              [_vm._v(_vm._s("(" + _vm.value.length + "/" + _vm.limit + ")"))]
            )
          : _vm._e()
      ],
      2
    ),
    _vm.tipPosition === "top"
      ? _c(
          "div",
          { staticClass: "el-upload__tip el-upload__tip--top" },
          [_vm._t("tip")],
          2
        )
      : _vm._e(),
    _c(
      "div",
      {
        staticClass: "el-upload__body",
        class: { "el-upload__body--column": _vm.tipPosition === "bottom" }
      },
      [
        _c(_vm.type, {
          tag: "component",
          attrs: {
            uploadBtn: _vm.uploadBtn,
            "base-img": _vm.baseImg,
            disabled: _vm.disabled,
            "btn-text": _vm.btnText,
            "show-delete": _vm.showDelete,
            "del-position": _vm.delPosition,
            "show-edit": _vm.showEdit,
            "edit-text": _vm.editText,
            "default-img": _vm.value,
            action: _vm._action,
            "show-file-list": _vm.showFileList,
            height: _vm.height,
            width: _vm.width,
            size: _vm.size,
            accept: _vm.accept,
            "show-cropper": _vm.showCropper,
            limit: _vm.limit,
            "show-draggable": _vm.showDraggable,
            "cropper-text": _vm.cropperText,
            "before-upload": _vm.beforeUpload
          },
          on: { changeImgUrl: _vm.getChangeImgUrl, changeFile: _vm.changeFile }
        }),
        _vm.tipPosition !== "top"
          ? _c(
              "div",
              {
                staticClass: "el-upload__tip",
                class: "el-upload__tip--" + _vm.tipPosition
              },
              [_vm._t("tip")],
              2
            )
          : _vm._e()
      ],
      1
    )
  ])
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./packages/dd-upload/src/index.vue?vue&type=template&id=7ab0e71c&

// CONCATENATED MODULE: ./packages/dd-upload/src/mixin/uploadMixin.js
/* harmony default export */ var uploadMixin = ({
  props: {
    // 文字btn上传的形式
    uploadBtn: {
      type: Boolean,
      default: false
    },
    // 背景图片
    baseImg: {
      type: String,
      default: ''
    },
    // 图片是否可上传
    disabled: {
      type: Boolean,
      default: false
    },
    // 上传按钮文案
    btnText: {
      type: String,
      default: '上传图片'
    },
    // 图片删除按钮是否显示
    showDelete: {
      type: Boolean,
      default: true
    },
    // 删除按钮的位置 left-top right-top
    delPosition: {
      type: String,
      default: 'right-top'
    },
    // 编辑图片按钮是否显示
    showEdit: {
      type: Boolean,
      default: true
    },
    // 编辑图片按钮的文案
    editText: {
      type: String,
      default: '替换'
    },
    // 图片默认
    defaultImg: [Array, String],
    // 图片的上传地址
    action: {
      type: String
    },
    showFileList: {
      type: Boolean,
      default: true
    },
    // 图片的高
    height: {
      type: Number,
      default: 96
    },
    // 图片的宽
    width: {
      type: Number,
      default: 96
    },
    // 大小M 大小1024*1024*size
    size: {
      type: Number,
      default: 5
    },
    // 图片上传格式
    accept: {
      type: String,
      default: 'image/jpg, image/jpeg, image/png, image/gif'
    },
    // 图片剪切功能
    showCropper: {
      type: Boolean,
      default: false
    },
    // 图片剪裁的按钮文案
    cropperText: {
      type: String,
      default: '剪裁'
    },
    // 下面是批量上传特有
    // 批量上传图片是否打开
    multiple: {
      type: Boolean,
      default: false
    },
    // 批量上传图片最多上传的张数
    limit: {
      type: Number,
      default: 30
    },
    // 图片拖拽排序
    showDraggable: {
      type: Boolean,
      default: false
    },
    // 上传前🪝
    beforeUpload: {
      type: Function
    }
  },
  data: function data() {
    return {
      isShowCropper: false, // 显示图片剪切
      file: '' // 传给图片剪切图片地址
    };
  },

  methods: {
    // 校验是否可进行下一步
    isCheckout: function isCheckout(file) {
      if (typeof this.beforeUpload === 'function') {
        return this.beforeUpload(file);
      }
      if (file.size > this.size * 1024 * 1024) {
        this.$message.warning('\u56FE\u7247\u5C3A\u5BF8\u8FC7\u5927\uFF0C\u8BF7\u4E0A\u4F20\u5C0F\u4E8E' + this.size + 'M\u7684\u56FE\u7247');
        return false;
      } else {
        return true;
      }
    },

    // 图片fetch图片上传封装
    http: function http(fullUrl, params) {
      var _this = this;

      var body = params;
      return fetch(fullUrl, {
        headers: {
          uid: localStorage.getItem('userId'),
          token: localStorage.getItem('token'),
          terminal: 1
        },
        body: body,
        method: 'post'
      }).then(function (res) {
        return res.json();
      }).then(function (res) {
        if (res.code !== '1') {
          _this.$message.warning(res.msg);
          throw res;
        }
        return res.data;
      });
    }
  }
});
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/single.vue?vue&type=template&id=c252ac50&
var singlevue_type_template_id_c252ac50_render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    {
      staticClass: "el-upload-single",
      class: { "el-upload--disabled": _vm.disabled }
    },
    [
      _vm.imgUrl && !_vm.uploadBtn
        ? _c(
            "div",
            {
              staticClass: "el-upload-item",
              style: { width: _vm.width + "px", height: _vm.height + "px" }
            },
            [
              _c("img", {
                staticClass: "el-upload-item__img",
                attrs: { src: _vm.imgUrl }
              }),
              _c("div", { staticClass: "el-upload-item__hover" }, [
                _vm.showDelete && !_vm.disabled
                  ? _c(
                      "div",
                      {
                        staticClass: "el-upload-item__del",
                        class: "el-upload-item__del--" + _vm.delPosition,
                        on: { click: _vm.delImg }
                      },
                      [_c("i", { staticClass: "el-icon-close" })]
                    )
                  : _vm._e(),
                _c("div", { staticClass: "el-upload-item__btn" }, [
                  _vm.showEdit && !_vm.disabled
                    ? _c(
                        "div",
                        {
                          staticClass:
                            "el-upload-item__btn-text el-upload-item__btn-text--edit",
                          on: { click: _vm.editImg }
                        },
                        [
                          _vm._v(
                            "\n          " + _vm._s(_vm.editText) + "\n        "
                          )
                        ]
                      )
                    : _vm._e(),
                  _vm.showCropper && !_vm.disabled
                    ? _c(
                        "div",
                        {
                          staticClass:
                            "el-upload-item__btn-text el-upload-item__btn-text--cropper",
                          on: {
                            click: function($event) {
                              _vm.openCropperImg()
                            }
                          }
                        },
                        [
                          _vm._v(
                            "\n          " +
                              _vm._s(_vm.cropperText) +
                              "\n        "
                          )
                        ]
                      )
                    : _vm._e()
                ])
              ])
            ]
          )
        : _vm._e(),
      _vm.uploadBtn
        ? _c(
            "el-button",
            { attrs: { type: "text" }, on: { click: _vm.uploadTrigger } },
            [
              _vm._v(_vm._s(_vm.btnText) + "\n    "),
              _c("input", {
                ref: "fileInput",
                staticClass: "el-upload-btn__input",
                attrs: { type: "file", accept: _vm.accept },
                on: {
                  change: function($event) {
                    _vm.changeUpload($event)
                  },
                  click: function($event) {
                    $event.stopPropagation()
                  }
                }
              })
            ]
          )
        : _c(
            "div",
            {
              staticClass: "el-upload-btn",
              class: { "el-upload-btn--none": _vm.imgUrl },
              style: {
                width: _vm.width + "px",
                height: _vm.height + "px",
                "background-image": "url(" + _vm.baseImg + ")"
              },
              on: { click: _vm.uploadTrigger }
            },
            [
              _vm._t("default"),
              _c("i", { staticClass: "el-icon-plus text-20 text-primary" }),
              _c("span", { staticClass: "el-upload-btn__text" }, [
                _vm._v(_vm._s(_vm.btnText))
              ]),
              _c("input", {
                ref: "fileInput",
                staticClass: "el-upload-btn__input",
                attrs: { type: "file", accept: _vm.accept },
                on: {
                  change: function($event) {
                    _vm.changeUpload($event)
                  },
                  click: function($event) {
                    $event.stopPropagation()
                  }
                }
              })
            ],
            2
          ),
      _c("Cropper", {
        attrs: { visible: _vm.isShowCropper, file: _vm.file, size: _vm.size },
        on: {
          "update:visible": function($event) {
            _vm.isShowCropper = $event
          },
          cropUploadSuccess: _vm.uploadSuccess
        }
      })
    ],
    1
  )
}
var singlevue_type_template_id_c252ac50_staticRenderFns = []
singlevue_type_template_id_c252ac50_render._withStripped = true


// CONCATENATED MODULE: ./packages/dd-upload/src/single.vue?vue&type=template&id=c252ac50&

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/cropper.vue?vue&type=template&id=d2a44ea6&
var croppervue_type_template_id_d2a44ea6_render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "el-dialog",
    {
      attrs: {
        title: "图片剪切",
        visible: _vm.isShowDialog,
        "before-close": _vm.handleClose,
        submitHandle: _vm.confirm,
        width: "580px"
      },
      on: {
        "update:visible": function($event) {
          _vm.isShowDialog = $event
        }
      }
    },
    [
      _c("div", { staticClass: "el-cropper" }, [
        _c("div", { staticClass: "el-cropper-clipping" }, [
          _c("div", { staticClass: "el-cropper-clipping__picture" }, [
            _c("img", {
              staticClass: "el-cropper-clipping__picture-img",
              style: _vm.sourImgStyle,
              attrs: { src: _vm.sourImgUrl, draggable: "false" },
              on: {
                drag: _vm.preventDefault,
                dragstart: _vm.preventDefault,
                dragend: _vm.preventDefault,
                dragleave: _vm.preventDefault,
                dragover: _vm.preventDefault,
                dragenter: _vm.preventDefault,
                mousedown: _vm.startMoveImg,
                mousemove: _vm.moveImg,
                mouseup: _vm.createImg,
                mouseout: _vm.createImg
              }
            }),
            _c("div", {
              staticClass:
                "el-cropper-clipping__picture-shade el-cropper-clipping__picture-shade--left",
              style: _vm.shadeStyle
            }),
            _c("div", {
              staticClass:
                "el-cropper-clipping__picture-shade el-cropper-clipping__picture-shade--right",
              style: _vm.shadeStyle
            })
          ]),
          _c("div", { staticClass: "el-cropper-clipping__range" }, [
            _c("input", {
              directives: [
                {
                  name: "model",
                  rawName: "v-model",
                  value: _vm.scalingRatio,
                  expression: "scalingRatio"
                }
              ],
              staticClass: "el-cropper-clipping__range-input",
              attrs: { type: "range", step: 1, min: 0, max: 100 },
              domProps: { value: _vm.scalingRatio },
              on: {
                __r: function($event) {
                  _vm.scalingRatio = $event.target.value
                }
              }
            }),
            _c("span", { staticClass: "el-cropper-clipping__range-track" }),
            _c("i", {
              staticClass:
                "el-cropper-clipping__range-icon el-cropper-clipping__range-icon--plus",
              on: {
                click: function($event) {
                  _vm.zoomImg(-1)
                }
              }
            }),
            _c("i", {
              staticClass:
                "el-cropper-clipping__range-icon el-cropper-clipping__range-icon--minus",
              on: {
                click: function($event) {
                  _vm.zoomImg(-2)
                }
              }
            })
          ])
        ]),
        _c("div", { staticClass: "el-cropper-preview" }, [
          _c("div", { staticClass: "el-cropper-preview__title" }, [
            _vm._v("图片预览：")
          ]),
          _vm.createImgUrl !== ""
            ? _c("img", {
                style: _vm.previewImgStyle,
                attrs: { src: _vm.createImgUrl }
              })
            : _vm._e()
        ])
      ]),
      _c("canvas", {
        directives: [
          { name: "show", rawName: "v-show", value: false, expression: "false" }
        ],
        ref: "canvas"
      })
    ]
  )
}
var croppervue_type_template_id_d2a44ea6_staticRenderFns = []
croppervue_type_template_id_d2a44ea6_render._withStripped = true


// CONCATENATED MODULE: ./packages/dd-upload/src/cropper.vue?vue&type=template&id=d2a44ea6&

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/cropper.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/* harmony default export */ var croppervue_type_script_lang_js_ = ({
  data: function data() {
    return {
      isShowDialog: false,
      confirmCount: 0,
      // 源图片的路径
      sourImgUrl: '',
      sourceImg: null,
      // canvas画布上的图片和预览的图片
      createImgUrl: '',
      // 手动缩放比例
      scalingRatio: 0,
      // 原图在初始化后，在裁剪框中的缩放比例
      sourceZoomRadius: 0,
      // 需求比例
      nRatio: this.width / this.height,
      mouseDown: false,
      // 容器高度，宽度
      sourceImgContainer: {
        w: 300,
        h: 240,
        // 容器比例
        r: 1.25
      },
      // 遮罩信息
      shadeInfo: {
        w: 0,
        h: 0,
        x: 0,
        y: 0
      },
      // 剪裁图片源的信息
      sourImgInfo: {
        x: 0,
        y: 0,
        width: 0,
        height: 0,
        top: 0,
        left: 0,
        screenX: 0,
        screenY: 0,
        initWidth: 0,
        initHeight: 0,
        naturalWidth: 0,
        naturalHeight: 0
      }
    };
  },

  props: {
    visible: {
      type: Boolean,
      default: false
    },
    // 图片源
    file: {
      type: [File, String],
      default: null
    },
    maxFileSize: {
      type: Number,
      default: 3000000
    },
    // 用来计算需求所需裁剪的比例
    width: {
      type: Number,
      default: 400
    },
    height: {
      type: [Number, String],
      default: 400
    },
    size: {
      type: Number
    }
  },
  computed: {
    shadeStyle: function shadeStyle() {
      var _shadeInfo = this.shadeInfo,
          w = _shadeInfo.w,
          h = _shadeInfo.h;

      if (this.nRatio < this.sourceImgContainer.r) {
        // 两边遮挡
        h = this.sourceImgContainer.h;
        w = (this.sourceImgContainer.w - h * this.nRatio) / 2;
        this.shadeInfo.w = w;
      } else {
        // 上下遮挡
        w = this.sourceImgContainer.w;
        h = (this.sourceImgContainer.h - w / this.nRatio) / 2;
        this.shadeInfo.h = h;
      }
      this.shadeInfo.x = w;
      this.shadeInfo.y = h;
      w = w + 'px';
      h = h + 'px';
      return {
        width: w,
        height: h
      };
    },
    sourImgStyle: function sourImgStyle() {
      return {
        width: this.sourImgInfo.width + 'px',
        height: this.sourImgInfo.height + 'px',
        top: this.sourImgInfo.top + 'px',
        left: this.sourImgInfo.left + 'px'
      };
    },
    previewImgStyle: function previewImgStyle() {
      return {
        width: '150px',
        height: 150 / this.nRatio + 'px'
      };
    }
  },
  watch: {
    visible: function visible(newVal) {
      this.isShowDialog = newVal;
      if (newVal) {
        this.setSourceImg();
      } else {
        this.clearData();
      }
    },

    // 缩放比例控制原图显示大小
    scalingRatio: function scalingRatio(n, o) {
      var _this = this;

      this.sourImgInfo.width = this.sourImgInfo.initWidth * (Number(n) + 100) / 100;
      this.sourImgInfo.height = this.sourImgInfo.initHeight * (Number(n) + 100) / 100;
      var _sourImgInfo = this.sourImgInfo,
          top = _sourImgInfo.top,
          left = _sourImgInfo.left,
          width = _sourImgInfo.width,
          height = _sourImgInfo.height;

      var nTop = -height + this.sourceImgContainer.h - this.shadeInfo.h;
      this.sourImgInfo.top = top < nTop ? nTop : top;
      var nLeft = -width + this.sourceImgContainer.w - this.shadeInfo.w;
      this.sourImgInfo.left = left < nLeft ? nLeft : left;
      this.$nextTick(function () {
        if (_this.visible) {
          _this.createImg();
        }
      });
    }
  },
  methods: {
    // 设置源图片
    setSourceImg: function setSourceImg() {
      if (!this.file) {
        return;
      }
      // 图片上传成功后，再剪切时file是个字符串
      if (typeof this.file === 'string') {
        this.getImgFile(this.file);
      } else {
        this.readAsDataURLFun(this.file);
      }
    },

    // 读取file文件
    readAsDataURLFun: function readAsDataURLFun(file) {
      var _this2 = this;

      // 图片未上传成功时返回，显示图片
      var fr = new FileReader();
      fr.onload = function () {
        _this2.sourImgUrl = fr.result;
        _this2.startCrop();
      };
      // 给FileReader对象一个读取完成的方法,使用readAsDataURL会返回一个url,这个值就保存在事件对象的result里,img通过加载这个地址,完成图片的加载
      fr.readAsDataURL(file);
    },

    // 裁剪前的准备，初始化原图 预览图
    startCrop: function startCrop() {
      var _this3 = this;

      // 预加载图片
      var img = new Image();
      img.src = this.sourImgUrl;
      // 图片加载事件
      img.onload = function () {
        var sourceRadius = img.naturalWidth / img.naturalHeight;
        // 图片比例与需求比例作比较 因为容器已经根据需求比例加了遮罩
        // this.nRatio图片的剪切比例
        if (sourceRadius < _this3.nRatio) {
          _this3.sourImgInfo.width = _this3.sourceImgContainer.w - _this3.shadeInfo.w * 2;
          _this3.sourImgInfo.height = _this3.sourImgInfo.width / sourceRadius;
          _this3.sourceZoomRadius = _this3.sourImgInfo.width / img.naturalWidth;
        } else {
          _this3.sourImgInfo.height = _this3.sourceImgContainer.h - _this3.shadeInfo.h * 2;
          _this3.sourImgInfo.width = _this3.sourImgInfo.height * sourceRadius;
          _this3.sourceZoomRadius = _this3.sourImgInfo.height / img.naturalHeight;
        }
        // 初始化的时候图片在容器中居中显示
        _this3.sourImgInfo.left = (_this3.sourceImgContainer.w - _this3.sourImgInfo.width) / 2;
        _this3.sourImgInfo.top = (_this3.sourceImgContainer.h - _this3.sourImgInfo.height) / 2;
        _this3.sourImgInfo.x = _this3.sourImgInfo.left;
        _this3.sourImgInfo.y = _this3.sourImgInfo.top;
        // 用来做图片缩放的
        _this3.sourImgInfo.initWidth = _this3.sourImgInfo.width;
        _this3.sourImgInfo.initHeight = _this3.sourImgInfo.height;
        _this3.sourImgInfo.naturalWidth = img.naturalWidth;
        _this3.sourImgInfo.naturalHeight = img.naturalHeight;
        if (_this3.visible) {
          _this3.$nextTick(function () {
            _this3.createImg();
          });
        }
      };
      this.sourceImg = img;
    },
    preventDefault: function preventDefault(e) {
      e.preventDefault();
      return false;
    },

    // 开始移动前
    startMoveImg: function startMoveImg(e) {
      this.sourImgInfo.screenX = e.screenX;
      this.sourImgInfo.screenY = e.screenY;
      this.mouseDown = true;
    },

    // 移动过程中
    moveImg: function moveImg(e) {
      e.preventDefault();
      if (!this.mouseDown) {
        return;
      };
      var dX = (e.screenX - this.sourImgInfo.screenX) * 0.1;
      var dY = (e.screenY - this.sourImgInfo.screenY) * 0.1;
      var rX = this.sourImgInfo.left + dX;
      var rY = this.sourImgInfo.top + dY;
      // 右移
      if (dX > 0) {
        rX = rX > this.shadeInfo.w ? this.shadeInfo.w : rX;
      } else {
        // 左移
        var maxX = this.shadeInfo.w + 2 * (this.sourImgInfo.width - this.sourceImgContainer.w) / 2;
        rX = Math.abs(rX) > maxX ? -maxX : rX;
      }
      // 下移
      if (dY > 0) {
        rY = rY > this.shadeInfo.h ? this.shadeInfo.h : rY;
      } else {
        var maxY = this.shadeInfo.h + 2 * (this.sourImgInfo.height - this.sourceImgContainer.h) / 2;
        rY = Math.abs(rY) > maxY ? -maxY : rY;
      }
      this.sourImgInfo.top = rY;
      this.sourImgInfo.left = rX;
    },

    // 图片缩放
    zoomImg: function zoomImg(e) {
      if (e === -1 && Number(this.scalingRatio) > 0) {
        this.scalingRatio = Number(this.scalingRatio) - 1;
      }
      if (e === -2 && Number(this.scalingRatio) < 100) {
        this.scalingRatio = Number(this.scalingRatio) + 1;
      }
    },

    // 创建图片
    createImg: function createImg() {
      var _sourImgInfo2 = this.sourImgInfo,
          top = _sourImgInfo2.top,
          left = _sourImgInfo2.left,
          naturalWidth = _sourImgInfo2.naturalWidth,
          naturalHeight = _sourImgInfo2.naturalHeight;

      this.mouseDown = false;
      var canvas = this.$refs.canvas;
      var ctx = canvas.getContext('2d');
      var ratio = (Number(this.scalingRatio) + 100) / 100;
      var createImgWidth = {
        w: (this.sourceImgContainer.w - 2 * this.shadeInfo.w) / ratio / this.sourceZoomRadius,
        h: (this.sourceImgContainer.h - 2 * this.shadeInfo.h) / ratio / this.sourceZoomRadius,
        x: (this.shadeInfo.w - left) / ratio / this.sourceZoomRadius,
        y: (this.shadeInfo.h - top) / ratio / this.sourceZoomRadius
      };
      // 裁剪后的大小 与原图保持一致
      var canvasWidth = void 0;
      var canvasHeight = void 0;
      var sourceRadius = naturalWidth / naturalHeight;
      if (sourceRadius < this.nRatio) {
        canvasWidth = naturalWidth;
        canvasHeight = naturalWidth / this.nRatio;
      } else {
        canvasWidth = naturalHeight * this.nRatio;
        canvasHeight = naturalHeight;
      }
      // 设置画布大小
      canvas.width = canvasWidth;
      canvas.height = canvasHeight;
      // 清空画布
      ctx.clearRect(0, 0, canvas.width, canvas.height);
      ctx.drawImage(this.sourceImg, createImgWidth.x, createImgWidth.y, createImgWidth.w, createImgWidth.h, 0, 0, canvas.width, canvas.height);
      var size = this.data2blob(canvas.toDataURL('image/png')).size;
      if (size <= this.size * 1024 * 1024) {
        this.createImgUrl = canvas.toDataURL('image/png');
      } else {
        var quality = this.size / size * 1024 * 1024 * 0.64;
        this.createImgUrl = canvas.toDataURL('image/jpeg', quality);
      }
    },

    // 确认裁剪
    confirm: function confirm() {
      if (this.confirmCount > 0) {
        return;
      }
      this.confirmCount += 1;
      if (!this.sourImgUrl || !this.createImgUrl) {
        return;
      }
      var fmData = new FormData();
      var blob = this.data2blob(this.createImgUrl);
      if (blob) {
        fmData.append('file', blob);
        this.$emit('cropUploadSuccess', fmData);
        this.handleClose();
      }
    },

    // 数据转为bold
    data2blob: function data2blob(data) {
      data = data.split(',')[1];
      data = window.atob(data);
      var ia = new Uint8Array(data.length);
      for (var i = 0; i < data.length; i++) {
        ia[i] = data.charCodeAt(i);
      }
      // canvas.toDataURL 返回的默认格式就是 image/png
      return new Blob([ia], {
        type: 'image/png'
      });
    },

    // 把图片的url转为file的object
    getImgFile: function getImgFile(img) {
      var _this4 = this;

      var image = new Image();
      image.crossOrigin = 'Anonymous'; // 解决跨域问题
      image.src = img;
      image.onload = function () {
        var canvas = document.createElement('canvas');
        canvas.width = image.width;
        canvas.height = image.height;
        var context = canvas.getContext('2d');
        context.drawImage(image, 0, 0, image.width, image.height);
        var dataURL = canvas.toDataURL(); // 得到图片的base64编码数据
        var file = _this4.dataURLtoFile(dataURL);
        _this4.readAsDataURLFun(file);
      };
    },

    // base64转file
    dataURLtoFile: function dataURLtoFile(dataurl, filename) {
      var arr = dataurl.split(',');
      var mime = arr[0].match(/:(.*?);/)[1];
      var bstr = atob(arr[1]);
      var n = bstr.length;
      var u8arr = new Uint8Array(n);
      while (n--) {
        u8arr[n] = bstr.charCodeAt(n);
      }
      return new File([u8arr], filename, { type: mime });
    },
    handleClose: function handleClose() {
      this.$emit('update:visible', false);
    },
    clearData: function clearData() {
      this.sourImgUrl = '';
      this.createImgUrl = '';
      this.sourceZoomRadius = 0;
      this.scalingRatio = 0;
      this.confirmCount = 0;
    }
  }
});
// CONCATENATED MODULE: ./packages/dd-upload/src/cropper.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_croppervue_type_script_lang_js_ = (croppervue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/dd-upload/src/cropper.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_croppervue_type_script_lang_js_,
  croppervue_type_template_id_d2a44ea6_render,
  croppervue_type_template_id_d2a44ea6_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "packages/dd-upload/src/cropper.vue"
/* harmony default export */ var cropper = (component.exports);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/single.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//



/* harmony default export */ var singlevue_type_script_lang_js_ = ({
  mixins: [uploadMixin],
  data: function data() {
    return {
      imgUrl: this.defaultImg, // 图片地址
      isChangeOriginUrl: false, // 原图片是否更换
      originUrl: '' // 源图片地址
    };
  },

  watch: {
    defaultImg: function defaultImg(newVal) {
      this.imgUrl = newVal;
    }
  },
  components: {
    Cropper: cropper
  },
  methods: {
    // 图片更改
    changeUpload: function changeUpload(e) {
      var file = e.target.files[0];
      if (!this.isCheckout(file)) {
        return;
      }
      if (this.showCropper) {
        this.openCropperImg(file);
      } else {
        this.fileToFormData(file);
      }
    },

    // 触发图片上传
    uploadTrigger: function uploadTrigger() {
      if (this.disabled) {
        return;
      }
      this.$refs.fileInput.value = '';
      this.$refs.fileInput.click();
    },

    // 删除图片
    delImg: function delImg() {
      this.imgUrl = '';
      this.emitImgUrl();
    },

    // 替换图片
    editImg: function editImg() {
      this.changeOriginUrl(true);
      this.uploadTrigger();
    },

    // 显示图片剪裁功能
    openCropperImg: function openCropperImg(file) {
      this.changeOriginUrl(file);
      this.isShowCropper = true;
      this.file = file || this.originUrl;
    },

    // file转成formData格式
    fileToFormData: function fileToFormData(file) {
      var formData = new FormData();
      formData.append('file', file);
      this.uploadSuccess(formData);
    },

    // 图片上传api
    uploadSuccess: function uploadSuccess(file) {
      var _this = this;

      this.http(this.action, file).then(function (res) {
        _this.imgUrl = res.url;
        _this.emitImgUrl();
        _this.originUrl = _this.isChangeOriginUrl ? res.url : _this.originUrl;
      });
    },

    // 图片更改传出
    emitImgUrl: function emitImgUrl() {
      this.$emit('changeImgUrl', this.imgUrl);
    },

    // 是否更改原图片
    changeOriginUrl: function changeOriginUrl(val) {
      this.isChangeOriginUrl = val;
    }
  }
});
// CONCATENATED MODULE: ./packages/dd-upload/src/single.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_singlevue_type_script_lang_js_ = (singlevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dd-upload/src/single.vue





/* normalize component */

var single_component = Object(componentNormalizer["a" /* default */])(
  src_singlevue_type_script_lang_js_,
  singlevue_type_template_id_c252ac50_render,
  singlevue_type_template_id_c252ac50_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var single_api; }
single_component.options.__file = "packages/dd-upload/src/single.vue"
/* harmony default export */ var single = (single_component.exports);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/multiple.vue?vue&type=template&id=2646c9a0&
var multiplevue_type_template_id_2646c9a0_render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    {
      staticClass: "el-upload-multiple",
      class: { "el-upload--disabled": _vm.disabled }
    },
    [
      _c(
        "Draggable",
        _vm._b(
          {
            staticClass: "el-upload-list",
            on: { update: _vm.updateImgSort },
            model: {
              value: _vm.imgUrls,
              callback: function($$v) {
                _vm.imgUrls = $$v
              },
              expression: "imgUrls"
            }
          },
          "Draggable",
          { draggable: ".el-upload-item", disabled: _vm.showDraggable },
          false
        ),
        [
          _vm._l(_vm.imgUrls, function(url, index) {
            return _c(
              "div",
              {
                key: index,
                staticClass: "el-upload-list__item--space el-upload-item",
                style: { width: _vm.width + "px", height: _vm.height + "px" }
              },
              [
                _c("img", {
                  staticClass: "el-upload-item__img",
                  attrs: { src: url }
                }),
                _c("div", { staticClass: "el-upload-item__hover" }, [
                  _vm.showDelete && !_vm.disabled
                    ? _c(
                        "div",
                        {
                          staticClass: "el-upload-item__del",
                          class: "el-upload-item__del--" + _vm.delPosition,
                          on: {
                            click: function($event) {
                              _vm.delMultImg(index)
                            }
                          }
                        },
                        [_c("i", { staticClass: "el-icon-close" })]
                      )
                    : _vm._e(),
                  _c("div", { staticClass: "el-upload-item__btn" }, [
                    _vm.showEdit && !_vm.disabled
                      ? _c(
                          "div",
                          {
                            staticClass:
                              "el-upload-item__btn-text el-upload-item__btn-text--edit",
                            on: {
                              click: function($event) {
                                _vm.editMultImg(index)
                              }
                            }
                          },
                          [
                            _vm._v(
                              "\n          " +
                                _vm._s(_vm.editText) +
                                "\n        "
                            )
                          ]
                        )
                      : _vm._e(),
                    _vm.showCropper && !_vm.disabled
                      ? _c(
                          "div",
                          {
                            staticClass:
                              "el-upload-item__btn-text el-upload-item__btn-text--cropper",
                            on: {
                              click: function($event) {
                                _vm.cropperMultImg(index, url)
                              }
                            }
                          },
                          [
                            _vm._v(
                              "\n          " +
                                _vm._s(_vm.cropperText) +
                                "\n        "
                            )
                          ]
                        )
                      : _vm._e()
                  ])
                ])
              ]
            )
          }),
          _c(
            "div",
            {
              staticClass: "el-upload-btn",
              class: { "el-upload-btn--none": _vm.showUploadBtn },
              style: {
                width: _vm.width + "px",
                height: _vm.height + "px",
                "background-image": "url(" + _vm.baseImg + ")"
              },
              on: {
                click: function($event) {
                  _vm.uploadTrigger(-1)
                }
              }
            },
            [
              _c("i", { staticClass: "el-icon-plus text-20 text-primary" }),
              _c("span", { staticClass: "el-upload-btn__text" }, [
                _vm._v(_vm._s(_vm.btnText))
              ]),
              _c("input", {
                ref: "fileInput",
                staticClass: "el-upload-btn__input",
                attrs: {
                  type: "file",
                  accept: _vm.accept,
                  multiple: _vm.currentImgIndex === -1
                },
                on: {
                  change: function($event) {
                    $event.stopPropagation()
                    _vm.changeMultiUpload($event)
                  },
                  click: function($event) {
                    $event.stopPropagation()
                  }
                }
              })
            ]
          )
        ],
        2
      ),
      _c("Cropper", {
        attrs: { visible: _vm.isShowCropper, file: _vm.file },
        on: {
          "update:visible": function($event) {
            _vm.isShowCropper = $event
          },
          cropUploadSuccess: _vm.uploadSuccess
        }
      })
    ],
    1
  )
}
var multiplevue_type_template_id_2646c9a0_staticRenderFns = []
multiplevue_type_template_id_2646c9a0_render._withStripped = true


// CONCATENATED MODULE: ./packages/dd-upload/src/multiple.vue?vue&type=template&id=2646c9a0&

// EXTERNAL MODULE: external "vuedraggable"
var external_vuedraggable_ = __webpack_require__(41);
var external_vuedraggable_default = /*#__PURE__*/__webpack_require__.n(external_vuedraggable_);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/multiple.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var multiplevue_type_script_lang_js_ = ({
  mixins: [uploadMixin],
  data: function data() {
    return {
      imgUrls: this.defaultImg || [],
      files: [],
      currentImgIndex: -1, // 当前选中index 不等于-1时，为图片替换
      isChangeOriginUrl: false, // 原图片是否更换
      originUrl: [] // 原图地址
    };
  },

  computed: {
    showUploadBtn: function showUploadBtn() {
      // 已上传图片数量和最大图片数量是否相等，不相等上传图片按钮显示，否则隐藏
      return this.imgUrls.length >= this.limit;
    },
    imgUrlsLength: function imgUrlsLength() {
      return this.imgUrls.length;
    }
  },
  watch: {
    defaultImg: function defaultImg(newVal) {
      this.imgUrls = newVal || [];
    },
    imgUrlsLength: function imgUrlsLength(newVal) {
      if (!newVal) {
        this.files = [];
      }
    }
  },
  components: {
    Draggable: external_vuedraggable_default.a,
    Cropper: cropper
  },
  created: function created() {
    this.originUrl = JSON.parse(JSON.stringify(this.imgUrls));
  },

  methods: {
    // 图片上传
    changeMultiUpload: function changeMultiUpload(e) {
      var imgMaxNum = this.currentImgIndex === -1 ? Number(this.limit - this.imgUrls.length) : 1; // 图片还可以上传的图片数量
      var files = e.target.files;
      var formData = new FormData();
      var count = 0;
      var flag = true;
      while (count < imgMaxNum) {
        var file = files[count];
        if (file) {
          if (!this.isCheckout(file)) {
            flag = false;
            break;
          }
          formData.append('file', file);
          count += 1;
        } else {
          break;
        }
      }
      if (flag) {
        this.uploadSuccess(formData, files);
      }
    },

    // 上传接口api
    uploadSuccess: function uploadSuccess(file, files) {
      var _this = this;

      this.http(this.action, file).then(function (res) {
        var urls = res.list.map(function (e) {
          return e.raw;
        });
        // this.currentImgIndex不等于-1时表示替换图片
        if (_this.currentImgIndex === -1) {
          var _imgUrls, _originUrl, _files;

          (_imgUrls = _this.imgUrls).push.apply(_imgUrls, urls);
          (_originUrl = _this.originUrl).push.apply(_originUrl, urls);
          (_files = _this.files).push.apply(_files, files);
        } else {
          _this.imgUrls.splice(_this.currentImgIndex, 1, urls[0]);
          _this.files.splice(_this.currentImgIndex, 1, files[0]);
          _this.currentImgIndex = -1;
          if (_this.isChangeOriginUrl) {
            _this.originUrl.splice(_this.currentImgIndex, 1, urls[0]);
          }
        }
        _this.emitMultImgUrl(_this.currentImgIndex, urls);
      });
    },

    // 触发图片上传
    uploadTrigger: function uploadTrigger(restIndex) {
      var _this2 = this;

      if (this.disabled) {
        return;
      }
      // 初始化当前index，当不是编辑时
      if (restIndex === -1) {
        this.currentImgIndex = -1;
      }
      // 加nextTick原因是，编辑后,不能多张上传的问题
      this.$nextTick(function () {
        _this2.$refs.fileInput.value = '';
        _this2.$refs.fileInput.click();
      });
    },

    // 删除
    delMultImg: function delMultImg(index) {
      this.imgUrls.splice(index, 1);
      this.originUrl.splice(index, 1);
      this.files.splice(index, 1);
      this.emitMultImgUrl(index);
    },

    // 替换图片
    editMultImg: function editMultImg(index) {
      this.isChangeOriginUrl = true;
      this.currentImgIndex = index;
      this.uploadTrigger();
    },

    // 图片剪裁
    cropperMultImg: function cropperMultImg(index, url) {
      this.isChangeOriginUrl = false;
      this.currentImgIndex = index;
      this.isShowCropper = true;
      this.file = this.originUrl[index];
    },

    // 改变图片顺序
    updateImgSort: function updateImgSort() {
      this.emitMultImgUrl();
    },

    // 图片更改传出
    emitMultImgUrl: function emitMultImgUrl(index, changeImgUrl) {
      // 返回值图片列表 更改的index 被更改的urls
      this.$emit('changeImgUrl', this.imgUrls, index, changeImgUrl);
      this.$emit('changeFile', this.files);
    }
  }
});
// CONCATENATED MODULE: ./packages/dd-upload/src/multiple.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_multiplevue_type_script_lang_js_ = (multiplevue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dd-upload/src/multiple.vue





/* normalize component */

var multiple_component = Object(componentNormalizer["a" /* default */])(
  src_multiplevue_type_script_lang_js_,
  multiplevue_type_template_id_2646c9a0_render,
  multiplevue_type_template_id_2646c9a0_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var multiple_api; }
multiple_component.options.__file = "packages/dd-upload/src/multiple.vue"
/* harmony default export */ var multiple = (multiple_component.exports);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dd-upload/src/index.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




/* harmony default export */ var srcvue_type_script_lang_js_ = ({
  name: 'ElUpload',
  mixins: [uploadMixin],
  props: {
    // 使用v-model的原理value接收值，input返回改变的值
    value: [Array, String, Object],
    // 提示文案位置
    tipPosition: {
      type: String,
      default: 'bottom'
    },
    // 下面是批量上传图片特有
    // 批量上传图片是否打开
    multiple: {
      type: Boolean,
      default: false
    },
    // 已上传图片数量/最多上传张数,是否显示
    showNum: {
      type: Boolean,
      default: false
    },
    // 图片上传数量显示位置top-left top-right
    numPosition: {
      type: String,
      default: 'top-left'
    }
  },
  computed: {
    type: function type() {
      return this.multiple ? 'multiple' : 'single';
    },
    _action: function _action() {
      return this.action || window.location.origin + (this.multiple ? '/v2/file/file/batchUploadImg' : '/v2/file/file/uploadImg');
    }
  },
  components: {
    single: single,
    multiple: multiple
  },
  methods: {
    getChangeImgUrl: function getChangeImgUrl(urls) {
      this.$emit('input', urls);
      this.$emit('change', urls);
    },
    changeFile: function changeFile(files) {
      this.$emit('changeFile', files);
    }
  }
});
// CONCATENATED MODULE: ./packages/dd-upload/src/index.vue?vue&type=script&lang=js&
 /* harmony default export */ var dd_upload_srcvue_type_script_lang_js_ = (srcvue_type_script_lang_js_); 
// CONCATENATED MODULE: ./packages/dd-upload/src/index.vue





/* normalize component */

var src_component = Object(componentNormalizer["a" /* default */])(
  dd_upload_srcvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var src_api; }
src_component.options.__file = "packages/dd-upload/src/index.vue"
/* harmony default export */ var src = (src_component.exports);
// CONCATENATED MODULE: ./packages/dd-upload/index.js


/* istanbul ignore next */
src.install = function (Vue) {
  Vue.component(src.name, src);
};

/* harmony default export */ var dd_upload = __webpack_exports__["default"] = (src);

/***/ })

/******/ });