(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["Medmeeting"] = factory();
	else
		root["Medmeeting"] = factory();
})(this, (function() {
return /******/ (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;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// 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 = "/";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 263);
/******/ })
/************************************************************************/
/******/ ({

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

/* globals __VUE_SSR_CONTEXT__ */

// this module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle

module.exports = function normalizeComponent (
  rawScriptExports,
  compiledTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */
) {
  var esModule
  var scriptExports = rawScriptExports = rawScriptExports || {}

  // ES6 modules interop
  var type = typeof rawScriptExports.default
  if (type === 'object' || type === 'function') {
    esModule = rawScriptExports
    scriptExports = rawScriptExports.default
  }

  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

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

  // scopedId
  if (scopeId) {
    options._scopeId = 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 = injectStyles
  }

  if (hook) {
    var functional = options.functional
    var existing = functional
      ? options.render
      : options.beforeCreate
    if (!functional) {
      // inject component registration as beforeCreate hook
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    } else {
      // register for functioal component in vue file
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return existing(h, context)
      }
    }
  }

  return {
    esModule: esModule,
    exports: scriptExports,
    options: options
  }
}


/***/ }),

/***/ 124:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

exports.default = {
  data: function data() {
    return {
      url: 'https://api.medmeeting.com',
      dialogVisible: false,
      dialogImageUrl: '',
      pic_list: []
    };
  },

  props: {
    value: Array,
    size: String, //图片大小的限制 ‘300Kb 3MB ’
    multi: Number //最多上传的图片数量
  },
  watch: {
    value: {
      handler: function handler(v) {
        this.pic_list = v;
      },

      immediate: true
    }
  },
  methods: {
    update: function update(file, fileList) {},
    onSuccess: function onSuccess(response, file, fileList) {
      this.pic_list = fileList.map((function (item) {
        if (item.response) {
          return { url: item.response.extra.absQiniuImgHash, status: item.status, name: item.name, size: item.size, uid: item.uid };
        }
        return { url: item.url, status: item.status, name: item.name, size: item.size, uid: item.uid };
      }));
      this.$emit('input', this.pic_list);
    },
    onError: function onError() {
      this.$message.error('上传失败');
    },
    beforeAvatarUpload: function beforeAvatarUpload(file) {
      if (this.multi && this.pic_list.length >= this.multi) {
        this.$message.error('\u6700\u591A\u53EA\u80FD\u4E0A\u4F20' + this.multi + '\u5F20\u56FE\u7247\uFF01');
        this.$emit('input', this.pic_list);
        this.onOff = true;
        return false;
      }
      var isJPG = file.type === 'image/jpeg';
      var isPNG = file.type === 'image/png';

      var size = this.size ? this.size : '2MB';
      var sizeLowerCase = size.toLowerCase();
      var isrightsize = false;

      if (sizeLowerCase.indexOf('kb') !== -1) {
        isrightsize = file.size / 1024 <= Number(sizeLowerCase.substr(0, sizeLowerCase.indexOf('kb')));
      }
      if (sizeLowerCase.indexOf('mb') !== -1) {
        isrightsize = file.size / 1024 / 1024 <= Number(sizeLowerCase.substr(0, sizeLowerCase.indexOf('mb')));
      }

      if (!isJPG && !isPNG) {
        this.$message.error('图片只能是 JPG或者 PNG 格式!');
        this.onOff = true;
      }
      if (!isrightsize) {
        this.$message.error('\u56FE\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ' + size + '!');
        this.onOff = true;
      }
      return (isJPG || isPNG) && isrightsize;
    },
    handlePictureCardPreview: function handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    handleRemove: function handleRemove(item, item2) {
      if (!this.onOff) {
        this.pic_list.splice(this.pic_list.findIndex((function (i) {
          if (item.response) {
            return i.url === item.response.extra.absQiniuImgHash;
          }
          return i.url === item.url;
        })), 1);
        this.$emit('input', this.pic_list);
      }
      this.onOff = false;
    }
  }
};
module.exports = exports['default'];

/***/ }),

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

// removed by extract-text-webpack-plugin

/***/ }),

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

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 184:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
function injectStyle (ssrContext) {
  if (disposed) return
  __webpack_require__(152)
  __webpack_require__(151)
}
var Component = __webpack_require__(0)(
  /* script */
  __webpack_require__(124),
  /* template */
  __webpack_require__(205),
  /* styles */
  injectStyle,
  /* scopeId */
  "data-v-67c2937e",
  /* moduleIdentifier (server only) */
  null
)
Component.options.__file = "/Users/mac/Documents/work/PC_Component/src/components/mt-upload-pic-list/mt-upload-pic-list.vue"
if (Component.esModule && Object.keys(Component.esModule).some((function (key) {return key !== "default" && key.substr(0, 2) !== "__"}))) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] mt-upload-pic-list.vue: functional components are not supported with templates, they should use render functions.")}

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-67c2937e", Component.options)
  } else {
    hotAPI.reload("data-v-67c2937e", Component.options)
  }
  module.hot.dispose((function (data) {
    disposed = true
  }))
})()}

module.exports = Component.exports


/***/ }),

/***/ 205:
/***/ (function(module, exports, __webpack_require__) {

module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;
  return _c('div', [_c('el-upload', {
    staticClass: "mt-pic-upload-list",
    attrs: {
      "action": _vm.url + '/v1/files',
      "list-type": "picture-card",
      "on-preview": _vm.handlePictureCardPreview,
      "before-upload": _vm.beforeAvatarUpload,
      "on-change": _vm.update,
      "on-success": _vm.onSuccess,
      "on-error": _vm.onError,
      "file-list": _vm.value,
      "on-remove": _vm.handleRemove
    }
  }, [_c('i', {
    staticClass: "el-icon-plus"
  })]), _vm._v(" "), _c('el-dialog', {
    attrs: {
      "visible": _vm.dialogVisible,
      "size": "tiny",
      "append-to-body": ""
    },
    on: {
      "update:visible": function($event) {
        _vm.dialogVisible = $event
      }
    }
  }, [_c('img', {
    attrs: {
      "width": "100%",
      "src": _vm.dialogImageUrl,
      "alt": ""
    }
  })])], 1)
},staticRenderFns: []}
module.exports.render._withStripped = true
if (false) {
  module.hot.accept()
  if (module.hot.data) {
     require("vue-hot-reload-api").rerender("data-v-67c2937e", module.exports)
  }
}

/***/ }),

/***/ 263:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(98);


/***/ }),

/***/ 98:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = install;

var _mtUploadPicList = __webpack_require__(184);

var _mtUploadPicList2 = _interopRequireDefault(_mtUploadPicList);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function install(Vue) {
  Vue.component('mt-upload-pic-list', _mtUploadPicList2.default);
}
module.exports = exports['default'];

/***/ })

/******/ });
}));